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

Support automatic registration of covariant implemented interfaces #6

Closed
kzu opened this issue Sep 26, 2022 · 0 comments · Fixed by #7
Closed

Support automatic registration of covariant implemented interfaces #6

kzu opened this issue Sep 26, 2022 · 0 comments · Fixed by #7
Labels
enhancement New feature or request

Comments

@kzu
Copy link
Contributor

kzu commented Sep 26, 2022

If a type implements a covariant interface, automatically register the
compatible covariant types for it.

For example, given:

public interface IEvent { }
public class BaseEvent : IEvent { }
public class MyEvent : BaseEvent { }
[Service]
public class ObservableService : IObservable<MyEvent>
{
}

Registrations should include: IObservable<MyEvent>, IObservable<BaseEvent> and
IObservable<IEvent>, since all of them can be used in a covariant way with the
same service implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant