Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal set properties on Channel model cannot be set by custom IMumbleProtocol implementations #56

Open
haydenmc opened this issue Mar 18, 2020 · 1 comment
Labels
good first issue Good for first time contributors Type: Enhancement

Comments

@haydenmc
Copy link

Some properties in the Channel model here have setters that are scoped as internal, so a developer writing code that lives outside of the MumbleSharp's assembly cannot manipulate them.

This makes it particularly difficult if you're trying to implement a custom IMumbleProtocol, since some of the methods implemented by the protocol necessitate changes to those fields (see here).

@martindevans
Copy link
Owner

That's a good point. The purpose of making those internal was so that people using the models can't fiddle with the values, but of course you're right that makes implementing a protocol impossible.

Perhaps the best way to handle this would be for there to be an immutable model interface with a mutable class, the protocol gets a reference to the class but it's publicly exposed through the interface.

e.g.

public interface IChannel {
    public uint parent { get; }
}

public class Channel : IChannel {
    public uint parent { get; set; }
}

Would you be interested in submitting a PR for something like this?

@Meetsch Meetsch added Type: Enhancement good first issue Good for first time contributors labels Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for first time contributors Type: Enhancement
Projects
None yet
Development

No branches or pull requests

3 participants