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

IObservedChange <TSender,TValue> why not covariant now? #73

Closed
DamianReeves opened this issue Jul 18, 2012 · 3 comments
Closed

IObservedChange <TSender,TValue> why not covariant now? #73

DamianReeves opened this issue Jul 18, 2012 · 3 comments
Labels

Comments

@DamianReeves
Copy link

There is a comment in the code (see below) saying that in the future IObservedChanged will be covariant, why in the future and now now?

    /// <summary>
    /// IObservedChange is a generic interface that replaces the non-generic
    /// PropertyChangedEventArgs. Note that it is used for both Changing (i.e.
    /// 'before change') and Changed Observables. In the future, this interface
    /// will be Covariant which will allow simpler casting between specific and
    /// generic changes.
    /// </summary>
    public interface IObservedChange<TSender, TValue> {...}
@anaisbetts
Copy link
Member

Because in WP7 IObservable isn't Covariant, so it breaks everything. IObservable is Covariant on some platforms and not others. lolmicrosoft.

@DamianReeves
Copy link
Author

That is horrible. So, in theory if I only cared about WPF, I could change this to covariant in my own fork just for WPF.

@anaisbetts
Copy link
Member

@DamianReeves Sure, I don't think it would make your life harder wrt merging things from upstream either. Go for it.

@lock lock bot added the outdated label Jun 26, 2019
@lock lock bot locked and limited conversation to collaborators Jun 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants