diff --git a/Rx.NET/Source/src/System.Reactive/IEventPattern.cs b/Rx.NET/Source/src/System.Reactive/IEventPattern.cs index dfa32c5c92..2a5e8498cf 100644 --- a/Rx.NET/Source/src/System.Reactive/IEventPattern.cs +++ b/Rx.NET/Source/src/System.Reactive/IEventPattern.cs @@ -15,13 +15,7 @@ namespace System.Reactive /// The type of the event data generated by the event. /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. /// - public interface IEventPattern< -#if !NO_VARIANCE - out TSender, out TEventArgs -#else - TSender, TEventArgs -#endif - > + public interface IEventPattern #if !NO_EVENTARGS_CONSTRAINT where TEventArgs : EventArgs #endif diff --git a/Rx.NET/Source/src/System.Reactive/IEventSource.cs b/Rx.NET/Source/src/System.Reactive/IEventSource.cs index fe43ecc5af..0e1a2449e8 100644 --- a/Rx.NET/Source/src/System.Reactive/IEventSource.cs +++ b/Rx.NET/Source/src/System.Reactive/IEventSource.cs @@ -11,11 +11,7 @@ namespace System.Reactive /// The type of the event data generated by the event. /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. /// - public interface IEventSource< -#if !NO_VARIANCE && !SILVERLIGHT4 // SL4 doesn't mark Action as contravariant! - out -#endif - T> + public interface IEventSource { /// /// Event signaling the next element in the data stream. diff --git a/Rx.NET/Source/src/System.Reactive/IObserver.Result.cs b/Rx.NET/Source/src/System.Reactive/IObserver.Result.cs index 3daad127cf..8449ada22c 100644 --- a/Rx.NET/Source/src/System.Reactive/IObserver.Result.cs +++ b/Rx.NET/Source/src/System.Reactive/IObserver.Result.cs @@ -15,11 +15,7 @@ namespace System.Reactive /// The type of the result returned from the observer's notification handlers. /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. /// -#if !NO_VARIANCE public interface IObserver -#else - public interface IObserver -#endif { /// /// Notifies the observer of a new element in the sequence. diff --git a/Rx.NET/Source/src/System.Reactive/Internal/Producer.cs b/Rx.NET/Source/src/System.Reactive/Internal/Producer.cs index fb7dbdeb62..38cd088450 100644 --- a/Rx.NET/Source/src/System.Reactive/Internal/Producer.cs +++ b/Rx.NET/Source/src/System.Reactive/Internal/Producer.cs @@ -12,11 +12,7 @@ namespace System.Reactive /// Interface with variance annotation; allows for better type checking when detecting capabilities in SubscribeSafe. /// /// Type of the resulting sequence's elements. - internal interface IProducer< -#if !NO_VARIANCE - out -#endif - TSource> : IObservable + internal interface IProducer : IObservable { IDisposable SubscribeRaw(IObserver observer, bool enableSafeguard); } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/IGroupedObservable.cs b/Rx.NET/Source/src/System.Reactive/Linq/IGroupedObservable.cs index 023598a08f..b19fa27070 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/IGroupedObservable.cs +++ b/Rx.NET/Source/src/System.Reactive/Linq/IGroupedObservable.cs @@ -15,11 +15,7 @@ namespace System.Reactive.Linq /// The type of the elements in the group. /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. /// -#if !NO_VARIANCE public interface IGroupedObservable : IObservable -#else - public interface IGroupedObservable : IObservable -#endif { /// /// Gets the common key. diff --git a/Rx.NET/Source/src/System.Reactive/Linq/IQbservable.cs b/Rx.NET/Source/src/System.Reactive/Linq/IQbservable.cs index b781ed41b4..b33a3e03e5 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/IQbservable.cs +++ b/Rx.NET/Source/src/System.Reactive/Linq/IQbservable.cs @@ -15,11 +15,7 @@ namespace System.Reactive.Linq /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Qbservable", Justification = "What a pleasure to write 'by design' here.")] - public interface IQbservable< -#if !NO_VARIANCE - out -#endif - T> : IQbservable, IObservable + public interface IQbservable : IQbservable, IObservable { } diff --git a/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Conversions.cs b/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Conversions.cs index 69693cb093..295697c7c2 100644 --- a/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Conversions.cs +++ b/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Conversions.cs @@ -118,11 +118,7 @@ public virtual IEventPatternSource ToEventPattern(IObser #endif { return new EventPatternSource( -#if !NO_VARIANCE source, -#else - source.Select(x => (EventPattern)x), -#endif (h, evt) => h(evt.Sender, evt.EventArgs) ); } diff --git a/Rx.NET/Source/src/System.Reactive/Subjects/IConnectableObservable.cs b/Rx.NET/Source/src/System.Reactive/Subjects/IConnectableObservable.cs index 4172e60c9d..d3a13ea99d 100644 --- a/Rx.NET/Source/src/System.Reactive/Subjects/IConnectableObservable.cs +++ b/Rx.NET/Source/src/System.Reactive/Subjects/IConnectableObservable.cs @@ -11,11 +11,7 @@ namespace System.Reactive.Subjects /// The type of the elements in the sequence. /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. /// -#if !NO_VARIANCE public interface IConnectableObservable : IObservable -#else - public interface IConnectableObservable : IObservable -#endif { /// /// Connects the observable wrapper to its source. All subscribed observers will receive values from the underlying observable sequence as long as the connection is established. diff --git a/Rx.NET/Source/src/System.Reactive/Subjects/ISubject.Multi.cs b/Rx.NET/Source/src/System.Reactive/Subjects/ISubject.Multi.cs index 4c29bf4c48..950f172759 100644 --- a/Rx.NET/Source/src/System.Reactive/Subjects/ISubject.Multi.cs +++ b/Rx.NET/Source/src/System.Reactive/Subjects/ISubject.Multi.cs @@ -15,11 +15,7 @@ namespace System.Reactive.Subjects /// The type of the elements produced by the subject. /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. /// -#if !NO_VARIANCE public interface ISubject : IObserver, IObservable -#else - public interface ISubject : IObserver, IObservable -#endif { } } diff --git a/Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/QbservableTest.cs b/Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/QbservableTest.cs index 1d7621733c..a57cb817db 100644 --- a/Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/QbservableTest.cs +++ b/Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/QbservableTest.cs @@ -1893,11 +1893,7 @@ public void Qbservable_Extensibility_Missing() [Fact] public void Qbservable_HigherOrder() { -#if NO_VARIANCE - var res = Qbservable.Return(Qbservable.Provider, 42).Select(_ => (IObservable)Qbservable.Return(Qbservable.Provider, 42)).Switch().Single(); -#else var res = Qbservable.Return(Qbservable.Provider, 42).Select(_ => Qbservable.Return(Qbservable.Provider, 42)).Switch().Single(); -#endif Assert.Equal(42, res); } }