I have a base interface
public interface IBase
{
public IReadOnlyReactiveProperty<bool> BaseBool { get; }
}
Then i inheritance this interface
public interface IDoSomething1 : IBase
{
}
public interface IDoSomething2 : IBase
{
}
Then i implementing this two interfaces
public class Implementation : IDoSomething1, IDoSomething2
{
public IReadOnlyReactiveProperty<bool> BaseBool { get; }
}
And I get that these two interfaces have the same “BaseBool” implementation, but they need to have different implementations since the activation logic of these two interfaces may be different.
Because in another class I’m looking for all the “IBase” type interfaces and subscribe to “BaseBool”.
And in the current form, it turns out that I cannot separate the interfaces “IDoSomething1” and “IDoSomething2” since they have the same name of the base variable. I need to separate these two interfaces somehow. These interfaces should remain in the same class
I expecting
public class Implementation : IDoSomething1, IDoSomething2
{
public IReadOnlyReactiveProperty<bool> IDoSomething1.BaseBool { get; }
public IReadOnlyReactiveProperty<bool> IDoSomething2.BaseBool { get; }
}
But its dont work.
Zack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.