瀏覽代碼

Remove obsolete #if directives (#1915)

Ian Griffiths 2 年之前
父節點
當前提交
5ed1a30c34
共有 59 個文件被更改,包括 30 次插入917 次删除
  1. 3 13
      Rx.NET/Source/facades/GlobalAssemblyVersion.cs
  2. 0 2
      Rx.NET/Source/src/Microsoft.Reactive.Testing/Recorded.cs
  3. 0 2
      Rx.NET/Source/src/Microsoft.Reactive.Testing/Subscription.cs
  4. 0 15
      Rx.NET/Source/src/System.Reactive.Observable.Aliases/ExcludeFromCodeCoverageAttribute.cs
  5. 0 84
      Rx.NET/Source/src/System.Reactive/Concurrency/ConcurrencyAbstractionLayerImpl.Windows.cs
  6. 0 2
      Rx.NET/Source/src/System.Reactive/Concurrency/ConcurrencyAbstractionLayerImpl.cs
  7. 0 5
      Rx.NET/Source/src/System.Reactive/Concurrency/EventLoopScheduler.cs
  8. 0 5
      Rx.NET/Source/src/System.Reactive/Concurrency/NewThreadScheduler.cs
  9. 0 32
      Rx.NET/Source/src/System.Reactive/Concurrency/Thread.Stub.cs
  10. 1 1
      Rx.NET/Source/src/System.Reactive/Concurrency/ThreadPoolScheduler.cs
  11. 0 15
      Rx.NET/Source/src/System.Reactive/ExcludeFromCodeCoverageAttribute.cs
  12. 0 2
      Rx.NET/Source/src/System.Reactive/Internal/CurrentPlatformEnlightenmentProvider.cs
  13. 0 2
      Rx.NET/Source/src/System.Reactive/Internal/HalfSerializer.cs
  14. 0 4
      Rx.NET/Source/src/System.Reactive/Internal/ReflectionUtils.cs
  15. 0 6
      Rx.NET/Source/src/System.Reactive/Internal/Stubs.cs
  16. 0 334
      Rx.NET/Source/src/System.Reactive/Linq/Qbservable.Generated.cs
  17. 0 18
      Rx.NET/Source/src/System.Reactive/Linq/Qbservable.Joins.cs
  18. 0 8
      Rx.NET/Source/src/System.Reactive/Linq/Qbservable.cs
  19. 0 50
      Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Generated.cs
  20. 1 123
      Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.NAry.cs
  21. 0 10
      Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.NAry.tt
  22. 0 8
      Rx.NET/Source/src/System.Reactive/Notification.cs
  23. 0 17
      Rx.NET/Source/src/System.Reactive/ObservableQuery.cs
  24. 0 15
      Rx.NET/Source/src/System.Reactive/Platforms/Desktop/Linq/Observable.Remoting.cs
  25. 0 2
      Rx.NET/Source/src/System.Reactive/TimeInterval.cs
  26. 0 2
      Rx.NET/Source/src/System.Reactive/Timestamped.cs
  27. 0 2
      Rx.NET/Source/src/System.Reactive/Unit.cs
  28. 2 4
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/CurrentThreadSchedulerTest.cs
  29. 1 2
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/DefaultSchedulerTest.cs
  30. 0 4
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/EventLoopSchedulerTest.cs
  31. 2 4
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/ImmediateSchedulerTest.cs
  32. 1 6
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/NewThreadSchedulerTest.cs
  33. 3 10
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/SchedulerTest.cs
  34. 0 4
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/SynchronizationContextSchedulerTest.cs
  35. 0 4
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/TaskPoolSchedulerTest.cs
  36. 0 2
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/ThreadPoolSchedulerTest.cs
  37. 1 4
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/VirtualSchedulerTest.cs
  38. 0 4
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/DefaultConcurrencyAbstractionLayerTest.cs
  39. 1 4
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/AverageTest.cs
  40. 1 1
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/CatchTest.cs
  41. 0 2
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/ConcatTest.cs
  42. 2 4
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/CountTest.cs
  43. 0 8
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/DelayTest.cs
  44. 0 2
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/FirstOrDefaultTest.cs
  45. 0 3
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/ForEachAsyncTest.cs
  46. 1 2
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/FromEventTest.cs
  47. 2 2
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/LongCountTest.cs
  48. 0 3
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/NextTest.cs
  49. 6 8
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/ObserveOnTest.cs
  50. 1 1
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/OnErrorResumeNextTest.cs
  51. 0 3
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/SynchronizeTest.cs
  52. 0 3
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/TimerTest.cs
  53. 0 5
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/WaitTest.cs
  54. 1 10
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/QbservableTest.cs
  55. 0 5
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Subjects/AsyncSubjectTest.cs
  56. 0 2
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Subjects/SubjectTest.cs
  57. 0 2
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/ObserverTest.cs
  58. 0 4
      Rx.NET/Source/tests/Tests.System.Reactive/Tests/RegressionTest.cs
  59. 0 16
      Rx.NET/tools/HomoIcon/Program.cs

+ 3 - 13
Rx.NET/Source/facades/GlobalAssemblyVersion.cs

@@ -1,4 +1,4 @@
-// Licensed to the .NET Foundation under one or more agreements.
+// Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the MIT License.
 // See the LICENSE file in the project root for more information.
 
@@ -6,19 +6,9 @@
 using System.Reflection;
 
 
-#if NETSTANDARD1_0 || WP8
-[assembly: AssemblyVersion("3.0.0.0")]
-#elif NETSTANDARD1_1 || WINDOWS8 || NET45 || NETCORE45
-[assembly: AssemblyVersion("3.0.1000.0")]
-#elif NETSTANDARD1_2 || WINDOWS81 || NET451 || NETCORE451 || WPA81
-[assembly: AssemblyVersion("3.0.2000.0")]
-#elif NETSTANDARD1_3 || NET46
-[assembly: AssemblyVersion("3.0.3000.0")]
-#elif NETSTANDARD1_4 || UAP10_0 || WINDOWS_UWP || NETCORE50 || NET461
+#if WINDOWS_UWP
 [assembly: AssemblyVersion("3.0.4000.0")]
-#elif NETSTANDARD1_5 || NET462
-[assembly: AssemblyVersion("3.0.5000.0")]
-#elif NETSTANDARD1_6 || NETCOREAPP1_0 || NET463 || NET472 || NETSTANDARD2_0
+#elif NET472 || NETSTANDARD2_0
 [assembly: AssemblyVersion("3.0.6000.0")]
 #else // this is here to prevent the build system from complaining. It should never be hit
 [assembly: AssemblyVersion("invalid")]

+ 0 - 2
Rx.NET/Source/src/Microsoft.Reactive.Testing/Recorded.cs

@@ -14,9 +14,7 @@ namespace Microsoft.Reactive.Testing
     /// </summary>
     /// <typeparam name="T">Type of the value.</typeparam>
     [DebuggerDisplay("{Value}@{Time}")]
-#if !NO_SERIALIZABLE
     [Serializable]
-#endif
     public readonly struct Recorded<T> : IEquatable<Recorded<T>>
     {
         // NB: Keep these fields for compat with serialized state.

+ 0 - 2
Rx.NET/Source/src/Microsoft.Reactive.Testing/Subscription.cs

@@ -12,9 +12,7 @@ namespace Microsoft.Reactive.Testing
     /// Records information about subscriptions to and unsubscriptions from observable sequences.
     /// </summary>
     [DebuggerDisplay("({Subscribe}, {Unsubscribe})")]
-#if !NO_SERIALIZABLE
     [Serializable]
-#endif
     public readonly struct Subscription : IEquatable<Subscription>
     {
         /// <summary>

+ 0 - 15
Rx.NET/Source/src/System.Reactive.Observable.Aliases/ExcludeFromCodeCoverageAttribute.cs

@@ -1,15 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT License.
-// See the LICENSE file in the project root for more information. 
-
-#if NO_CODE_COVERAGE_ATTRIBUTE
-
-namespace System.Diagnostics.CodeAnalysis
-{
-    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event, Inherited = false)]
-    internal sealed class ExcludeFromCodeCoverageAttribute : Attribute
-    {
-    }
-}
-
-#endif

+ 0 - 84
Rx.NET/Source/src/System.Reactive/Concurrency/ConcurrencyAbstractionLayerImpl.Windows.cs

@@ -1,84 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT License.
-// See the LICENSE file in the project root for more information. 
-
-#if NO_THREAD && WINDOWS
-using System.Threading;
-
-namespace System.Reactive.Concurrency
-{
-    internal sealed class /*Default*/ConcurrencyAbstractionLayerImpl : IConcurrencyAbstractionLayer
-    {
-        public IDisposable StartTimer(Action<object?> action, object? state, TimeSpan dueTime)
-        {
-            var res = global::Windows.System.Threading.ThreadPoolTimer.CreateTimer(
-                tpt =>
-                {
-                    action(state);
-                },
-                Normalize(dueTime)
-            );
-
-            return res.AsDisposable();
-        }
-
-        public IDisposable StartPeriodicTimer(Action action, TimeSpan period)
-        {
-            //
-            // The WinRT thread pool is based on the Win32 thread pool and cannot handle
-            // sub-1ms resolution. When passing a lower period, we get single-shot
-            // timer behavior instead. See MSDN documentation for CreatePeriodicTimer
-            // for more information.
-            //
-            if (period < TimeSpan.FromMilliseconds(1))
-                throw new ArgumentOutOfRangeException(nameof(period), Strings_PlatformServices.WINRT_NO_SUB1MS_TIMERS);
-
-            var res = global::Windows.System.Threading.ThreadPoolTimer.CreatePeriodicTimer(
-                tpt =>
-                {
-                    action();
-                },
-                period
-            );
-
-            return res.AsDisposable();
-        }
-
-        public IDisposable QueueUserWorkItem(Action<object?> action, object? state)
-        {
-            var res = global::Windows.System.Threading.ThreadPool.RunAsync(iaa =>
-            {
-                action(state);
-            });
-
-            return res.AsDisposable();
-        }
-        
-        public void Sleep(TimeSpan timeout)
-        {
-            var e = new ManualResetEventSlim();
-
-            global::Windows.System.Threading.ThreadPoolTimer.CreateTimer(
-                tpt =>
-                {
-                    e.Set();
-                },
-                Normalize(timeout)
-            );
-
-            e.Wait();
-        }
-
-        public IStopwatch StartStopwatch() => new StopwatchImpl();
-
-        public bool SupportsLongRunning => false;
-
-        public void StartThread(Action<object?> action, object? state)
-        {
-            throw new NotSupportedException();
-        }
-
-        private TimeSpan Normalize(TimeSpan dueTime) => dueTime < TimeSpan.Zero ? TimeSpan.Zero : dueTime;
-    }
-}
-#endif

+ 0 - 2
Rx.NET/Source/src/System.Reactive/Concurrency/ConcurrencyAbstractionLayerImpl.cs

@@ -2,7 +2,6 @@
 // The .NET Foundation licenses this file to you under the MIT License.
 // See the LICENSE file in the project root for more information. 
 
-#if !NO_THREAD
 using System.Reactive.Disposables;
 using System.Threading;
 
@@ -251,4 +250,3 @@ namespace System.Reactive.Concurrency
         }
     }
 }
-#endif

+ 0 - 5
Rx.NET/Source/src/System.Reactive/Concurrency/EventLoopScheduler.cs

@@ -86,7 +86,6 @@ namespace System.Reactive.Concurrency
         {
         }
 
-#if !NO_THREAD
         /// <summary>
         /// Creates an object that schedules units of work on a designated thread, using the specified factory to control thread creation options.
         /// </summary>
@@ -94,10 +93,6 @@ namespace System.Reactive.Concurrency
         /// <exception cref="ArgumentNullException"><paramref name="threadFactory"/> is <c>null</c>.</exception>
         public EventLoopScheduler(Func<ThreadStart, Thread> threadFactory)
         {
-#else
-        internal EventLoopScheduler(Func<ThreadStart, Thread> threadFactory)
-        {
-#endif
             _threadFactory = threadFactory ?? throw new ArgumentNullException(nameof(threadFactory));
             _stopwatch = ConcurrencyAbstractionLayer.Current.StartStopwatch();
 

+ 0 - 5
Rx.NET/Source/src/System.Reactive/Concurrency/NewThreadScheduler.cs

@@ -29,7 +29,6 @@ namespace System.Reactive.Concurrency
         /// </summary>
         public static NewThreadScheduler Default => Instance.Value;
 
-#if !NO_THREAD
         /// <summary>
         /// Creates an object that schedules each unit of work on a separate thread.
         /// </summary>
@@ -37,10 +36,6 @@ namespace System.Reactive.Concurrency
         /// <exception cref="ArgumentNullException"><paramref name="threadFactory"/> is <c>null</c>.</exception>
         public NewThreadScheduler(Func<ThreadStart, Thread> threadFactory)
         {
-#else
-        private NewThreadScheduler(Func<ThreadStart, Thread> threadFactory)
-        {
-#endif
             _threadFactory = threadFactory ?? throw new ArgumentNullException(nameof(threadFactory));
         }
 

+ 0 - 32
Rx.NET/Source/src/System.Reactive/Concurrency/Thread.Stub.cs

@@ -1,32 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT License.
-// See the LICENSE file in the project root for more information. 
-
-#if NO_THREAD
-using System.Threading.Tasks;
-
-namespace System.Reactive.Concurrency
-{
-    internal sealed class Thread
-    {
-        private readonly ThreadStart _start;
-
-        public Thread(ThreadStart start)
-        {
-            _start = start;
-        }
-
-        public string Name { get; set; }
-        public bool IsBackground { get; set; }
-
-        public void Start()
-        {
-            Task.Factory.StartNew(Run, TaskCreationOptions.LongRunning);
-        }
-
-        private void Run() => _start();
-    }
-
-    internal delegate void ThreadStart();
-}
-#endif

+ 1 - 1
Rx.NET/Source/src/System.Reactive/Concurrency/ThreadPoolScheduler.cs

@@ -2,7 +2,7 @@
 // The .NET Foundation licenses this file to you under the MIT License.
 // See the LICENSE file in the project root for more information. 
 
-#if !LEGACY_WINRT && !NO_THREAD
+#if !LEGACY_WINRT
 using System.Reactive.Disposables;
 using System.Threading;
 

+ 0 - 15
Rx.NET/Source/src/System.Reactive/ExcludeFromCodeCoverageAttribute.cs

@@ -1,15 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT License.
-// See the LICENSE file in the project root for more information. 
-
-#if NO_CODE_COVERAGE_ATTRIBUTE
-
-namespace System.Diagnostics.CodeAnalysis
-{
-    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event, Inherited = false)]
-    internal sealed class ExcludeFromCodeCoverageAttribute : Attribute
-    {
-    }
-}
-
-#endif

+ 0 - 2
Rx.NET/Source/src/System.Reactive/Internal/CurrentPlatformEnlightenmentProvider.cs

@@ -34,12 +34,10 @@ namespace System.Reactive.PlatformServices
                 return (T)(object)new ExceptionServicesImpl();
             }
 
-#if !NO_THREAD || LEGACY_WINRT
             if (t == typeof(IConcurrencyAbstractionLayer))
             {
                 return (T)(object)new ConcurrencyAbstractionLayerImpl();
             }
-#endif
 
             if (t == typeof(IScheduler) && args != null)
             {

+ 0 - 2
Rx.NET/Source/src/System.Reactive/Internal/HalfSerializer.cs

@@ -49,10 +49,8 @@ namespace System.Reactive
                     }
                 }
             }
-#if !NO_TRACE
             else if (error == null)
                 Trace.TraceWarning("OnNext called while another OnNext call was in progress on the same Observer.");
-#endif
         }
 
         /// <summary>

+ 0 - 4
Rx.NET/Source/src/System.Reactive/Internal/ReflectionUtils.cs

@@ -114,10 +114,6 @@ namespace System.Reactive
             }
         }
 
-#if (CRIPPLED_REFLECTION && HAS_WINRT)
-        public static MethodInfo GetMethod(this Type type, string name) => type.GetTypeInfo().GetDeclaredMethod(name);
-#endif
-
         /// <summary>
         /// Determine whether a type represents a WinRT event registration token
         /// (https://learn.microsoft.com/en-us/uwp/api/windows.foundation.eventregistrationtoken).

+ 0 - 6
Rx.NET/Source/src/System.Reactive/Internal/Stubs.cs

@@ -16,15 +16,9 @@ namespace System.Reactive
         public static readonly Action<Exception> Throw = static ex => { ex.Throw(); };
     }
 
-#if !NO_THREAD
     internal static class TimerStubs
     {
-#if NETSTANDARD1_3
-        public static readonly System.Threading.Timer Never = new System.Threading.Timer(static _ => { }, null, System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite);
-#else
         public static readonly System.Threading.Timer Never = new System.Threading.Timer(static _ => { });
-#endif
     }
-#endif
 }
 

File diff suppressed because it is too large
+ 0 - 334
Rx.NET/Source/src/System.Reactive/Linq/Qbservable.Generated.cs


+ 0 - 18
Rx.NET/Source/src/System.Reactive/Linq/Qbservable.Joins.cs

@@ -8,9 +8,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Linq.Expressions;
 using System.Reactive.Joins;
-#if !CRIPPLED_REFLECTION
 using System.Reflection;
-#endif
 
 namespace System.Reactive.Linq
 {
@@ -42,13 +40,9 @@ namespace System.Reactive.Linq
             return new QueryablePattern<TLeft, TRight>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => And<TLeft, TRight>(default, default)),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodBase.GetCurrentMethod()!).MakeGenericMethod(typeof(TLeft), typeof(TRight)),
 #pragma warning restore IL2060
-#endif
                     left.Expression,
                     GetSourceExpression(right)
                 )
@@ -79,13 +73,9 @@ namespace System.Reactive.Linq
             return new QueryablePlan<TResult>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Then<TSource, TResult>(default, default)),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodBase.GetCurrentMethod()!).MakeGenericMethod(typeof(TSource), typeof(TResult)),
 #pragma warning restore IL2060
-#endif
                     source.Expression,
                     selector
                 )
@@ -115,13 +105,9 @@ namespace System.Reactive.Linq
             return provider.CreateQuery<TResult>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => When<TResult>(default, default)),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodBase.GetCurrentMethod()!).MakeGenericMethod(typeof(TResult)),
 #pragma warning restore IL2060
-#endif
                     Expression.Constant(provider, typeof(IQbservableProvider)),
                     Expression.NewArrayInit(
                         typeof(QueryablePlan<TResult>),
@@ -154,13 +140,9 @@ namespace System.Reactive.Linq
             return provider.CreateQuery<TResult>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => When(default, default(IEnumerable<QueryablePlan<TResult>>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodBase.GetCurrentMethod()!).MakeGenericMethod(typeof(TResult)),
 #pragma warning restore IL2060
-#endif
                     Expression.Constant(provider, typeof(IQbservableProvider)),
                     Expression.Constant(plans, typeof(IEnumerable<QueryablePlan<TResult>>))
                 )

+ 0 - 8
Rx.NET/Source/src/System.Reactive/Linq/Qbservable.cs

@@ -53,13 +53,9 @@ namespace System.Reactive.Linq
             return ((IQbservableProvider)source.Provider).CreateQuery<TSource>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => ToQbservable<TSource>(default)),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodBase.GetCurrentMethod()!).MakeGenericMethod(typeof(TSource)),
 #pragma warning restore IL2060
-#endif
                     source.Expression
                 )
             );
@@ -89,13 +85,9 @@ namespace System.Reactive.Linq
             return ((IQbservableProvider)source.Provider).CreateQuery<TSource>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => ToQbservable<TSource>(default)),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodBase.GetCurrentMethod()!).MakeGenericMethod(typeof(TSource)),
 #pragma warning restore IL2060
-#endif
                     source.Expression,
                     Expression.Constant(scheduler)
                 )

+ 0 - 50
Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Generated.cs

@@ -8,9 +8,7 @@
 using System.Collections.Generic;
 using System.Linq.Expressions;
 using System.Reactive.Concurrency;
-#if !CRIPPLED_REFLECTION
 using System.Reflection;
-#endif
 
 namespace System.Reactive.Linq
 {
@@ -36,11 +34,7 @@ namespace System.Reactive.Linq
             return provider.CreateQuery<Unit>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => QbservableEx.Create(default(IQbservableProvider), default(Expression<Func<IEnumerable<IObservable<object>>>>))),
-#else
                     (MethodInfo)MethodInfo.GetCurrentMethod(),
-#endif
                     Expression.Constant(provider, typeof(IQbservableProvider)),
                     iteratorMethod
                 )
@@ -69,11 +63,7 @@ namespace System.Reactive.Linq
             return provider.CreateQuery<TResult>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => QbservableEx.Create<TResult>(default(IQbservableProvider), default(Expression<Func<IObserver<TResult>, IEnumerable<IObservable<object>>>>))),
-#else
                     ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TResult)),
-#endif
                     Expression.Constant(provider, typeof(IQbservableProvider)),
                     iteratorMethod
                 )
@@ -102,11 +92,7 @@ namespace System.Reactive.Linq
             return source.Provider.CreateQuery<TSource>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => QbservableEx.Expand<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, IObservable<TSource>>>))),
-#else
                     ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
-#endif
                     source.Expression,
                     selector
                 )
@@ -138,11 +124,7 @@ namespace System.Reactive.Linq
             return source.Provider.CreateQuery<TSource>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => QbservableEx.Expand<TSource>(default(IQbservable<TSource>), default(Expression<Func<TSource, IObservable<TSource>>>), default(IScheduler))),
-#else
                     ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
-#endif
                     source.Expression,
                     selector,
                     Expression.Constant(scheduler, typeof(IScheduler))
@@ -172,11 +154,7 @@ namespace System.Reactive.Linq
             return provider.CreateQuery<TSource[]>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => QbservableEx.ForkJoin<TSource>(default(IQbservableProvider), default(IObservable<TSource>[]))),
-#else
                     ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
-#endif
                     Expression.Constant(provider, typeof(IQbservableProvider)),
                     GetSourceExpression(sources)
                 )
@@ -205,11 +183,7 @@ namespace System.Reactive.Linq
             return provider.CreateQuery<TSource[]>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => QbservableEx.ForkJoin<TSource>(default(IQbservableProvider), default(IEnumerable<IObservable<TSource>>))),
-#else
                     ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
-#endif
                     Expression.Constant(provider, typeof(IQbservableProvider)),
                     GetSourceExpression(sources)
                 )
@@ -243,11 +217,7 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<TResult>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => QbservableEx.ForkJoin<TSource1, TSource2, TResult>(default(IQbservable<TSource1>), default(IObservable<TSource2>), default(Expression<Func<TSource1, TSource2, TResult>>))),
-#else
                     ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource1), typeof(TSource2), typeof(TResult)),
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     resultSelector
@@ -279,11 +249,7 @@ namespace System.Reactive.Linq
             return source.Provider.CreateQuery<TResult>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => QbservableEx.Let<TSource, TResult>(default(IQbservable<TSource>), default(Expression<Func<IObservable<TSource>, IObservable<TResult>>>))),
-#else
                     ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)),
-#endif
                     source.Expression,
                     selector
                 )
@@ -306,11 +272,7 @@ namespace System.Reactive.Linq
             return source.Provider.CreateQuery<TResult>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => QbservableEx.ManySelect<TSource, TResult>(default(IQbservable<TSource>), default(Expression<Func<IObservable<TSource>, TResult>>))),
-#else
                     ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)),
-#endif
                     source.Expression,
                     selector
                 )
@@ -335,11 +297,7 @@ namespace System.Reactive.Linq
             return source.Provider.CreateQuery<TResult>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => QbservableEx.ManySelect<TSource, TResult>(default(IQbservable<TSource>), default(Expression<Func<IObservable<TSource>, TResult>>), default(IScheduler))),
-#else
                     ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)),
-#endif
                     source.Expression,
                     selector,
                     Expression.Constant(scheduler, typeof(IScheduler))
@@ -367,11 +325,7 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => QbservableEx.WithLatestFrom<TFirst, TSecond>(default(IQbservable<TFirst>), default(IObservable<TSecond>))),
-#else
                     ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TFirst), typeof(TSecond)),
-#endif
                     first.Expression,
                     GetSourceExpression(second)
                 )
@@ -397,11 +351,7 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => QbservableEx.Zip<TFirst, TSecond>(default(IQbservable<TFirst>), default(IEnumerable<TSecond>))),
-#else
                     ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TFirst), typeof(TSecond)),
-#endif
                     first.Expression,
                     GetSourceExpression(second)
                 )

+ 1 - 123
Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.NAry.cs

@@ -2,12 +2,10 @@
 // The .NET Foundation licenses this file to you under the MIT License.
 // See the LICENSE file in the project root for more information. 
 
-// This code was generated by a T4 template at 10/05/2020 15:28:51.
+// This code was generated by a T4 template at 04/19/2023 18:04:44.
 
 using System.Linq.Expressions;
-#if !CRIPPLED_REFLECTION
 using System.Reflection;
-#endif
 
 namespace System.Reactive.Linq
 {
@@ -32,12 +30,8 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.CombineLatest<TFirst, TSecond>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond)),
-#endif
                     first.Expression,
                     GetSourceExpression(second)
                 )
@@ -68,13 +62,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.CombineLatest<TFirst, TSecond, TThird>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third)
@@ -109,13 +99,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.CombineLatest<TFirst, TSecond, TThird, TFourth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -155,13 +141,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -206,13 +188,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -262,13 +240,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -323,13 +297,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -389,13 +359,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -460,13 +426,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -536,13 +498,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth, TEleventh>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -617,13 +575,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth, TEleventh, TTwelfth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -703,13 +657,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth, TEleventh, TTwelfth, TThirteenth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth), typeof(TThirteenth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -794,13 +744,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth, TEleventh, TTwelfth, TThirteenth, TFourteenth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth), typeof(TThirteenth), typeof(TFourteenth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -890,13 +836,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth, TFifteenth Fifteenth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth, TEleventh, TTwelfth, TThirteenth, TFourteenth, TFifteenth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth), typeof(TThirteenth), typeof(TFourteenth), typeof(TFifteenth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -991,13 +933,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth, TFifteenth Fifteenth, TSixteenth Sixteenth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth, TEleventh, TTwelfth, TThirteenth, TFourteenth, TFifteenth, TSixteenth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth), typeof(TThirteenth), typeof(TFourteenth), typeof(TFifteenth), typeof(TSixteenth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -1037,13 +975,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.Zip<TFirst, TSecond>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second)
                 )
@@ -1073,13 +1007,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.Zip<TFirst, TSecond, TThird>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third)
@@ -1114,13 +1044,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.Zip<TFirst, TSecond, TThird, TFourth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -1160,13 +1086,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.Zip<TFirst, TSecond, TThird, TFourth, TFifth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -1211,13 +1133,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -1267,13 +1185,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -1328,13 +1242,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -1394,13 +1304,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -1465,13 +1371,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -1541,13 +1443,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth, TEleventh>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -1622,13 +1520,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth, TEleventh, TTwelfth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -1708,13 +1602,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth, TEleventh, TTwelfth, TThirteenth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth), typeof(TThirteenth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -1799,13 +1689,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth, TEleventh, TTwelfth, TThirteenth, TFourteenth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth), typeof(TThirteenth), typeof(TFourteenth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -1895,13 +1781,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth, TFifteenth Fifteenth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth, TEleventh, TTwelfth, TThirteenth, TFourteenth, TFifteenth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth), typeof(TThirteenth), typeof(TFourteenth), typeof(TFifteenth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),
@@ -1996,13 +1878,9 @@ namespace System.Reactive.Linq
             return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth, TFifteenth Fifteenth, TSixteenth Sixteenth)>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.Zip<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth, TEleventh, TTwelfth, TThirteenth, TFourteenth, TFifteenth, TSixteenth>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TThird), typeof(TFourth), typeof(TFifth), typeof(TSixth), typeof(TSeventh), typeof(TEighth), typeof(TNinth), typeof(TTenth), typeof(TEleventh), typeof(TTwelfth), typeof(TThirteenth), typeof(TFourteenth), typeof(TFifteenth), typeof(TSixteenth)),
 #pragma warning restore IL2060
-#endif
                     first.Expression,
                     GetSourceExpression(second),
                     GetSourceExpression(third),

+ 0 - 10
Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.NAry.tt

@@ -11,9 +11,7 @@
 // This code was generated by a T4 template at <#=DateTime.Now#>.
 
 using System.Linq.Expressions;
-#if !CRIPPLED_REFLECTION
 using System.Reflection;
-#endif
 
 namespace System.Reactive.Linq
 {
@@ -71,11 +69,7 @@ for (int j = 1; j <= i; j++)
             return first.Provider.CreateQuery<<#=tuple#>>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.CombineLatest<<#=genArgs#>>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(<#=typeofGenArgs#>),
-#endif
                     first.Expression,
 <#
 for (int j = 2; j <= i; j++)
@@ -139,11 +133,7 @@ for (int j = 1; j <= i; j++)
             return first.Provider.CreateQuery<<#=tuple#>>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => Qbservable.Zip<<#=genArgs#>>(default(IQbservable<TSource1>), default(IObservable<TSource2>))),
-#else
                     ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(<#=typeofGenArgs#>),
-#endif
                     first.Expression,
 <#
 for (int j = 2; j <= i; j++)

+ 0 - 8
Rx.NET/Source/src/System.Reactive/Notification.cs

@@ -37,9 +37,7 @@ namespace System.Reactive
     /// Represents a notification to an observer.
     /// </summary>
     /// <typeparam name="T">The type of the elements received by the observer.</typeparam>
-#if !NO_SERIALIZABLE
     [Serializable]
-#endif
     [Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2218:OverrideGetHashCodeOnOverridingEquals", Justification = "Resembles a discriminated union with finite number of subclasses (external users shouldn't create their own subtypes), each of which does override GetHashCode itself.")]
     public abstract class Notification<T> : IEquatable<Notification<T>>
     {
@@ -74,9 +72,7 @@ namespace System.Reactive
         /// Represents an OnNext notification to an observer.
         /// </summary>
         [DebuggerDisplay("OnNext({Value})")]
-#if !NO_SERIALIZABLE
         [Serializable]
-#endif
         internal sealed class OnNextNotification : Notification<T>
         {
             /// <summary>
@@ -227,9 +223,7 @@ namespace System.Reactive
         /// Represents an OnError notification to an observer.
         /// </summary>
         [DebuggerDisplay("OnError({Exception})")]
-#if !NO_SERIALIZABLE
         [Serializable]
-#endif
         internal sealed class OnErrorNotification : Notification<T>
         {
             /// <summary>
@@ -380,9 +374,7 @@ namespace System.Reactive
         /// Represents an OnCompleted notification to an observer.
         /// </summary>
         [DebuggerDisplay("OnCompleted()")]
-#if !NO_SERIALIZABLE
         [Serializable]
-#endif
         internal sealed class OnCompletedNotification : Notification<T>
         {
             /// <summary>

+ 0 - 17
Rx.NET/Source/src/System.Reactive/ObservableQuery.cs

@@ -194,11 +194,7 @@ namespace System.Reactive
             {
                 var method = node.Method;
                 var declaringType = method.DeclaringType;
-#if (CRIPPLED_REFLECTION && HAS_WINRT)
-                var baseType = declaringType?.GetTypeInfo().BaseType;
-#else
                 var baseType = declaringType?.BaseType;
-#endif
                 if (baseType == typeof(QueryablePattern))
                 {
                     if (method.Name == "Then")
@@ -386,20 +382,11 @@ namespace System.Reactive
                 {
                     targetType = method.DeclaringType!; // NB: These methods were found from a declaring type.
 
-#if (CRIPPLED_REFLECTION && HAS_WINRT)
-                    var typeInfo = targetType.GetTypeInfo();
-                    if (typeInfo.IsDefined(typeof(LocalQueryMethodImplementationTypeAttribute), false))
-                    {
-                        var mapping = (LocalQueryMethodImplementationTypeAttribute)typeInfo.GetCustomAttributes(typeof(LocalQueryMethodImplementationTypeAttribute), false).Single();
-                        targetType = mapping.TargetType;
-                    }
-#else
                     if (targetType.IsDefined(typeof(LocalQueryMethodImplementationTypeAttribute), false))
                     {
                         var mapping = (LocalQueryMethodImplementationTypeAttribute)targetType.GetCustomAttributes(typeof(LocalQueryMethodImplementationTypeAttribute), false)[0];
                         targetType = mapping.TargetType;
                     }
-#endif
 
                     methods = GetMethods(targetType);
                 }
@@ -439,11 +426,7 @@ namespace System.Reactive
 
             private static ILookup<string, MethodInfo> GetMethods(Type type)
             {
-#if !(CRIPPLED_REFLECTION && HAS_WINRT)
-                return type.GetMethods(BindingFlags.Static | BindingFlags.Public).ToLookup(m => m.Name);
-#else
                 return type.GetTypeInfo().DeclaredMethods.Where(m => m.IsStatic && m.IsPublic).ToLookup(m => m.Name);
-#endif
             }
 
             private static bool ArgsMatch(MethodInfo method, IList<Expression> arguments, Type[]? typeArgs)

+ 0 - 15
Rx.NET/Source/src/System.Reactive/Platforms/Desktop/Linq/Observable.Remoting.cs

@@ -71,13 +71,9 @@ namespace System.Reactive.Linq
             return source.Provider.CreateQuery<TSource>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => RemotingObservable.Remotable<TSource>(default(IQbservable<TSource>))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
 #pragma warning restore IL2060
-#endif
                     source.Expression
                 )
             );
@@ -102,26 +98,15 @@ namespace System.Reactive.Linq
             return source.Provider.CreateQuery<TSource>(
                 Expression.Call(
                     null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => RemotingObservable.Remotable<TSource>(default(IQbservable<TSource>), default(ILease))),
-#else
 #pragma warning disable IL2060 // ('System.Reflection.MethodInfo.MakeGenericMethod' can not be statically analyzed.) This gets the MethodInfo for the method running right now, so it can't have been trimmed
                     ((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
 #pragma warning restore IL2060
-#endif
                     source.Expression,
                     Expression.Constant(lease, typeof(ILease))
                 )
             );
         }
 
-#if CRIPPLED_REFLECTION
-        internal static MethodInfo InfoOf<R>(Expression<Func<R>> f)
-        {
-            return ((MethodCallExpression)f.Body).Method;
-        }
-#endif
-
         #endregion
     }
 }

+ 0 - 2
Rx.NET/Source/src/System.Reactive/TimeInterval.cs

@@ -12,9 +12,7 @@ namespace System.Reactive
     /// The time interval can represent the time it took to produce the value, the interval relative to a previous value, the value's delivery time relative to a base, etc.
     /// </summary>
     /// <typeparam name="T">The type of the value being annotated with time interval information.</typeparam>
-#if !NO_SERIALIZABLE
     [Serializable]
-#endif
     public readonly struct TimeInterval<T> : IEquatable<TimeInterval<T>>
     {
         /// <summary>

+ 0 - 2
Rx.NET/Source/src/System.Reactive/Timestamped.cs

@@ -12,9 +12,7 @@ namespace System.Reactive
     /// The timestamp typically represents the time the value was received, using an IScheduler's clock to obtain the current time.
     /// </summary>
     /// <typeparam name="T">The type of the value being timestamped.</typeparam>
-#if !NO_SERIALIZABLE
     [Serializable]
-#endif
     [Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Timestamped", Justification = "Reviewed and agreed upon.")]
     public readonly struct Timestamped<T> : IEquatable<Timestamped<T>>
     {

+ 0 - 2
Rx.NET/Source/src/System.Reactive/Unit.cs

@@ -7,9 +7,7 @@ namespace System.Reactive
     /// <summary>
     /// Represents a type with a single value. This type is often used to denote the successful completion of a void-returning method (C#) or a Sub procedure (Visual Basic).
     /// </summary>
-#if !NO_SERIALIZABLE
     [Serializable]
-#endif
     public readonly struct Unit : IEquatable<Unit>
     {
         /// <summary>

+ 2 - 4
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/CurrentThreadSchedulerTest.cs

@@ -31,7 +31,6 @@ namespace ReactiveTests.Tests
             Assert.True(res.Seconds < 1);
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void CurrentThread_ScheduleAction()
         {
@@ -40,7 +39,6 @@ namespace ReactiveTests.Tests
             Scheduler.CurrentThread.Schedule(() => { Assert.Equal(id, Thread.CurrentThread.ManagedThreadId); ran = true; });
             Assert.True(ran);
         }
-#endif
 
         [TestMethod]
         public void CurrentThread_ScheduleActionError()
@@ -57,7 +55,7 @@ namespace ReactiveTests.Tests
                 Assert.Same(e, ex);
             }
         }
-#if !NO_THREAD
+
         [TestMethod]
         public void CurrentThread_ScheduleActionNested()
         {
@@ -110,7 +108,7 @@ namespace ReactiveTests.Tests
             });
             Assert.True(ran, "ran");
         }
-#endif
+
         [TestMethod]
         public void CurrentThread_EnsureTrampoline()
         {

+ 1 - 2
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/DefaultSchedulerTest.cs

@@ -31,7 +31,7 @@ namespace ReactiveTests.Tests
             var res = DefaultScheduler.Instance.Now - DateTime.Now;
             Assert.True(res.Seconds < 1);
         }
-#if !NO_THREAD
+
         [TestMethod]
         public void ScheduleAction()
         {
@@ -94,7 +94,6 @@ namespace ReactiveTests.Tests
 
             Assert.False(fail);
         }
-#endif
 #if DESKTOPCLR
         [TestCategory("SkipCI")]
         [TestMethod]

+ 0 - 4
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/EventLoopSchedulerTest.cs

@@ -29,9 +29,7 @@ namespace ReactiveTests.Tests
         {
             using var el = new EventLoopScheduler();
 
-#if !NO_THREAD
             ReactiveAssert.Throws<ArgumentNullException>(() => new EventLoopScheduler(null));
-#endif
             ReactiveAssert.Throws<ArgumentNullException>(() => el.Schedule(42, default));
             ReactiveAssert.Throws<ArgumentNullException>(() => el.Schedule(42, DateTimeOffset.Now, default));
             ReactiveAssert.Throws<ArgumentNullException>(() => el.Schedule(42, TimeSpan.Zero, default));
@@ -76,7 +74,6 @@ namespace ReactiveTests.Tests
             Assert.True(ran);
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void EventLoop_DifferentThread()
         {
@@ -91,7 +88,6 @@ namespace ReactiveTests.Tests
             Assert.True(gate.WaitOne(MaxWaitTime), "Timeout!");
             Assert.NotEqual(Thread.CurrentThread.ManagedThreadId, id);
         }
-#endif
 
         [TestMethod]
         public void EventLoop_ScheduleOrderedActions()

+ 2 - 4
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/ImmediateSchedulerTest.cs

@@ -22,8 +22,9 @@ namespace ReactiveTests.Tests
         {
             var res = Scheduler.Immediate.Now - DateTime.Now;
             Assert.True(res.Seconds < 1);
+
         }
-#if !NO_THREAD
+
         [TestMethod]
         public void Immediate_ScheduleAction()
         {
@@ -32,7 +33,6 @@ namespace ReactiveTests.Tests
             Scheduler.Immediate.Schedule(() => { Assert.Equal(id, Thread.CurrentThread.ManagedThreadId); ran = true; });
             Assert.True(ran);
         }
-#endif
 
         [TestMethod]
         public void Immediate_ScheduleActionError()
@@ -146,7 +146,6 @@ namespace ReactiveTests.Tests
             });
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void Immediate_ScheduleActionDue()
         {
@@ -155,6 +154,5 @@ namespace ReactiveTests.Tests
             Scheduler.Immediate.Schedule(TimeSpan.FromSeconds(0.2), () => { Assert.Equal(id, Thread.CurrentThread.ManagedThreadId); ran = true; });
             Assert.True(ran, "ran");
         }
-#endif
     }
 }

+ 1 - 6
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/NewThreadSchedulerTest.cs

@@ -13,7 +13,6 @@ using Assert = Xunit.Assert;
 
 namespace ReactiveTests.Tests
 {
-#if !NO_THREAD
     [TestClass]
     public class NewThreadSchedulerTest
     {
@@ -35,7 +34,7 @@ namespace ReactiveTests.Tests
             var res = NewThreadScheduler.Default.Now - DateTime.Now;
             Assert.True(res.Seconds < 1);
         }
-#if !NO_THREAD
+
         [TestMethod]
         public void NewThread_ScheduleAction()
         {
@@ -55,7 +54,6 @@ namespace ReactiveTests.Tests
             nt.Schedule(TimeSpan.FromSeconds(0.2), () => { Assert.NotEqual(id, Thread.CurrentThread.ManagedThreadId); evt.Set(); });
             evt.WaitOne();
         }
-#endif
 
 #if !NO_PERF
         [TestMethod]
@@ -87,7 +85,6 @@ namespace ReactiveTests.Tests
             d.Dispose();
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void NewThread_Periodic_NonReentrant()
         {
@@ -118,7 +115,5 @@ namespace ReactiveTests.Tests
 
             Assert.False(fail);
         }
-#endif
     }
-#endif
 }

+ 3 - 10
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/SchedulerTest.cs

@@ -220,14 +220,12 @@ namespace ReactiveTests.Tests
                 e.WaitOne();
             }
 
-#if !NO_THREAD
             // NewThread
             {
                 var e = new ManualResetEvent(false);
                 Scheduler.NewThread.Schedule(() => e.Set());
                 e.WaitOne();
             }
-#endif
 
             // TaskPool
             {
@@ -243,7 +241,7 @@ namespace ReactiveTests.Tests
 
 #if !NO_PERF
 
-#if !WINDOWS && !NO_THREAD
+#if !WINDOWS
         [TestMethod]
         public void Scheduler_LongRunning_ArgumentChecking()
         {
@@ -336,7 +334,7 @@ namespace ReactiveTests.Tests
 
 #if !NO_PERF
 
-#if !WINDOWS && !NO_THREAD
+#if !WINDOWS
         [TestMethod]
         public void Scheduler_Periodic1()
         {
@@ -482,7 +480,7 @@ namespace ReactiveTests.Tests
         {
             ReactiveAssert.Throws<ArgumentNullException>(() => Scheduler.DisableOptimizations(default));
             ReactiveAssert.Throws<ArgumentNullException>(() => Scheduler.DisableOptimizations(default, new Type[0]));
-#if !WINDOWS && !NO_THREAD
+#if !WINDOWS
             ReactiveAssert.Throws<ArgumentNullException>(() => Scheduler.DisableOptimizations(ThreadPoolScheduler.Instance, default));
 #endif
             ReactiveAssert.Throws<ArgumentNullException>(() => Scheduler.DisableOptimizations(Scheduler.Default).Schedule(42, default));
@@ -1504,8 +1502,6 @@ namespace ReactiveTests.Tests
             e.WaitOne();
         }
 
-#if !NO_SYNCCTX
-
         [TestMethod]
         public void SchedulerAsync_ScheduleAsync_SyncCtx()
         {
@@ -1567,8 +1563,5 @@ namespace ReactiveTests.Tests
                 d(state);
             }
         }
-
-#endif
-
     }
 }

+ 0 - 4
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/SynchronizationContextSchedulerTest.cs

@@ -172,7 +172,6 @@ namespace ReactiveTests.Tests
             Assert.True(ran);
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void SynchronizationContext_DontPost_Same()
         {
@@ -196,7 +195,6 @@ namespace ReactiveTests.Tests
             Assert.True(count == 0 /* no post */);
             Assert.True(ran);
         }
-#endif
 
         [TestMethod]
         public void SynchronizationContext_AlwaysPost_Different()
@@ -210,7 +208,6 @@ namespace ReactiveTests.Tests
             Assert.True(ran);
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void SynchronizationContext_AlwaysPost_Same()
         {
@@ -234,6 +231,5 @@ namespace ReactiveTests.Tests
             Assert.True(count == 1 /* post */);
             Assert.True(ran);
         }
-#endif
     }
 }

+ 0 - 4
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/TaskPoolSchedulerTest.cs

@@ -33,7 +33,6 @@ namespace ReactiveTests.Tests
             Assert.True(res.Seconds < 1);
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void TaskPool_ScheduleAction()
         {
@@ -116,7 +115,6 @@ namespace ReactiveTests.Tests
             Assert.True(n >= 0);
         }
 #endif
-#endif
 
 #if !NO_PERF
         [TestMethod]
@@ -148,7 +146,6 @@ namespace ReactiveTests.Tests
             d.Dispose();
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void TaskPool_Periodic_NonReentrant()
         {
@@ -179,7 +176,6 @@ namespace ReactiveTests.Tests
 
             Assert.False(fail);
         }
-#endif
 
         [TestMethod]
         public void TaskPool_Delay_LargerThanIntMaxValue()

+ 0 - 2
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/ThreadPoolSchedulerTest.cs

@@ -2,7 +2,6 @@
 // The .NET Foundation licenses this file to you under the MIT License.
 // See the LICENSE file in the project root for more information. 
 
-#if !NO_THREAD
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -338,4 +337,3 @@ namespace ReactiveTests.Tests
 #endif
     }
 }
-#endif

+ 1 - 4
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/VirtualSchedulerTest.cs

@@ -52,7 +52,7 @@ namespace ReactiveTests.Tests
             var res = new VirtualSchedulerTestScheduler().Now - DateTime.Now;
             Assert.True(res.Seconds < 1);
         }
-#if !NO_THREAD
+
         [TestMethod]
         public void Virtual_ScheduleAction()
         {
@@ -63,7 +63,6 @@ namespace ReactiveTests.Tests
             scheduler.Start();
             Assert.True(ran);
         }
-#endif
 
         [TestMethod]
         public void Virtual_ScheduleActionError()
@@ -114,7 +113,6 @@ namespace ReactiveTests.Tests
             ReactiveAssert.Throws<ArgumentNullException>(() => new HistoricalScheduler().ScheduleRelative(42, TimeSpan.FromSeconds(1), default));
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void Virtual_ScheduleActionDue()
         {
@@ -125,7 +123,6 @@ namespace ReactiveTests.Tests
             scheduler.Start();
             Assert.True(ran, "ran");
         }
-#endif
 
         [TestMethod]
         [TestCategory("SkipCI")]

+ 0 - 4
Rx.NET/Source/tests/Tests.System.Reactive/Tests/DefaultConcurrencyAbstractionLayerTest.cs

@@ -260,7 +260,6 @@ namespace ReactiveTests.Tests
                 }
 
                 state.Value.Set();
-#if !NO_THREAD
                 var w = new ManualResetEvent(false);
 
                 var d = slr.ScheduleLongRunning(cancel =>
@@ -276,9 +275,6 @@ namespace ReactiveTests.Tests
                 Thread.Sleep(50);
                 d.Dispose();
                 w.WaitOne();
-#else
-                state.Value.Set();
-#endif
             });
 
             e.Value.WaitOne();

+ 1 - 4
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/AverageTest.cs

@@ -1287,7 +1287,6 @@ namespace ReactiveTests.Tests
         }
 
 #if !NO_PERF
-#if !NO_THREAD
         [TestMethod]
         public void Average_InjectOverflow_Int32()
         {
@@ -1387,8 +1386,7 @@ namespace ReactiveTests.Tests
 
             ReactiveAssert.Throws<OverflowException>(() => res.ForEach(_ => { }));
         }
-#endif
-#if !CRIPPLED_REFLECTION || NETCOREAPP1_1 || NETCOREAPP1_0
+
         private class OverflowInjection<T> : IObservable<T>
         {
             private readonly IObservable<T> _source;
@@ -1408,7 +1406,6 @@ namespace ReactiveTests.Tests
                 return _source.Subscribe(observer);
             }
         }
-#endif
 #endif
 
         [TestMethod]

+ 1 - 1
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/CatchTest.cs

@@ -958,7 +958,7 @@ namespace ReactiveTests.Tests
             res.Messages.AssertEqual(expected);
         }
 
-#if HAS_STACKTRACE && !NO_THREAD
+#if HAS_STACKTRACE
         [TestMethod]
         public void Catch_TailRecursive2()
         {

+ 0 - 2
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/ConcatTest.cs

@@ -922,7 +922,6 @@ namespace ReactiveTests.Tests
             res.Messages.AssertEqual(expected);
         }
 
-#if !NO_THREAD && !NETCOREAPP1_1 && !NETCOREAPP1_0
         [TestMethod]
         public void Concat_TailRecursive2()
         {
@@ -932,7 +931,6 @@ namespace ReactiveTests.Tests
 
             Assert.True(lst.Last() - lst.First() < 10);
         }
-#endif
 #endif
 
         [TestMethod]

+ 2 - 4
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/CountTest.cs

@@ -145,7 +145,7 @@ namespace ReactiveTests.Tests
             );
         }
 
-#if !NO_PERF && !NO_THREAD
+#if !NO_PERF
         [TestMethod]
         public void Count_InjectOverflow()
         {
@@ -442,7 +442,7 @@ namespace ReactiveTests.Tests
             );
         }
 
-#if !NO_PERF && !NO_THREAD && !CRIPPLED_REFLECTION
+#if !NO_PERF
 
         [TestMethod]
         public void Count_Predicate_InjectOverflow()
@@ -457,7 +457,6 @@ namespace ReactiveTests.Tests
 
     }
 
-#if !CRIPPLED_REFLECTION || NETCOREAPP1_1 || NETCOREAPP1_0
     internal class OverflowInjection<T> : IObservable<T>
     {
         private readonly IObservable<T> _source;
@@ -477,5 +476,4 @@ namespace ReactiveTests.Tests
             return _source.Subscribe(observer);
         }
     }
-#endif
 }

+ 0 - 8
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/DelayTest.cs

@@ -447,7 +447,6 @@ namespace ReactiveTests.Tests
             );
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void Delay_TimeSpan_Real_Simple1()
         {
@@ -459,7 +458,6 @@ namespace ReactiveTests.Tests
         {
             Delay_TimeSpan_Real_Simple1_Impl(ThreadPoolScheduler.Instance);
         }
-#endif
 
         private void Delay_TimeSpan_Real_Simple1_Impl(IScheduler scheduler)
         {
@@ -483,7 +481,6 @@ namespace ReactiveTests.Tests
             Assert.True(new[] { 1, 2, 3 }.SequenceEqual(lst));
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void Delay_TimeSpan_Real_Error1()
         {
@@ -495,7 +492,6 @@ namespace ReactiveTests.Tests
         {
             Delay_TimeSpan_Real_Error1_Impl(ThreadPoolScheduler.Instance);
         }
-#endif
 
         private void Delay_TimeSpan_Real_Error1_Impl(IScheduler scheduler)
         {
@@ -521,7 +517,6 @@ namespace ReactiveTests.Tests
             Assert.Same(ex, err);
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void Delay_TimeSpan_Real_Error2()
         {
@@ -533,7 +528,6 @@ namespace ReactiveTests.Tests
         {
             Delay_TimeSpan_Real_Error2_Impl(ThreadPoolScheduler.Instance);
         }
-#endif
 
         private void Delay_TimeSpan_Real_Error2_Impl(IScheduler scheduler)
         {
@@ -560,7 +554,6 @@ namespace ReactiveTests.Tests
             Assert.Same(ex, err);
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void Delay_TimeSpan_Real_Error3()
         {
@@ -572,7 +565,6 @@ namespace ReactiveTests.Tests
         {
             Delay_TimeSpan_Real_Error3_Impl(ThreadPoolScheduler.Instance);
         }
-#endif
 
         private void Delay_TimeSpan_Real_Error3_Impl(IScheduler scheduler)
         {

+ 0 - 2
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/FirstOrDefaultTest.cs

@@ -64,7 +64,6 @@ namespace ReactiveTests.Tests
             Assert.Equal(value, Observable.Range(value, 10).FirstOrDefault());
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void FirstOrDefault_NoDoubleSet()
         {
@@ -97,7 +96,6 @@ namespace ReactiveTests.Tests
 
             o.Done();
         }
-#endif
 
         private class O : IObservable<int>
         {

+ 0 - 3
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/ForEachAsyncTest.cs

@@ -509,7 +509,6 @@ namespace ReactiveTests.Tests
             }
         }
 
-#if !NO_THREAD
         [TestMethod]
         [TestCategory("SkipCI")]
         public void ForEachAsync_DisposeThrows()
@@ -593,7 +592,5 @@ namespace ReactiveTests.Tests
                 Assert.Same(ex, err.InnerExceptions[0]);
             }
         }
-#endif
-
     }
 }

+ 1 - 2
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/FromEventTest.cs

@@ -240,7 +240,7 @@ namespace ReactiveTests.Tests
             Assert.True(snd.SequenceEqual(new[] { 43, 44 }));
             Assert.True(thd.SequenceEqual(new[] { 44, 45 }));
         }
-#if !NO_THREAD
+
         [TestMethod]
         public void FromEvent_SynchronizationContext()
         {
@@ -337,7 +337,6 @@ namespace ReactiveTests.Tests
             t.Start();
             t.Join();
         }
-#endif
 
         [TestMethod]
         public void FromEvent_Scheduler1()

+ 2 - 2
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/LongCountTest.cs

@@ -146,7 +146,7 @@ namespace ReactiveTests.Tests
             );
         }
 
-#if !NO_PERF && !NO_THREAD
+#if !NO_PERF
         [TestMethod]
         public void LongCount_InjectOverflow()
         {
@@ -443,7 +443,7 @@ namespace ReactiveTests.Tests
             );
         }
 
-#if !NO_PERF && !NO_THREAD && !CRIPPLED_REFLECTION
+#if !NO_PERF
         [TestMethod]
         public void LongCount_Predicate_InjectOverflow()
         {

+ 0 - 3
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/NextTest.cs

@@ -135,7 +135,6 @@ namespace ReactiveTests.Tests
             Assert.True(res.Count == res.Distinct().Count());
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void Next_Error()
         {
@@ -171,7 +170,5 @@ namespace ReactiveTests.Tests
 
             ReactiveAssert.Throws(ex, () => res.MoveNext());
         }
-#endif
-
     }
 }

+ 6 - 8
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/ObserveOnTest.cs

@@ -60,7 +60,7 @@ namespace ReactiveTests.Tests
         [TestMethod]
         public void ObserveOn_Control()
         {
-            bool okay = true;
+            var okay = true;
 
             using (WinFormsTestUtils.RunTest(out var lbl))
             {
@@ -81,7 +81,7 @@ namespace ReactiveTests.Tests
         [TestMethod]
         public void ObserveOn_ControlScheduler()
         {
-            bool okay = true;
+            var okay = true;
 
             using (WinFormsTestUtils.RunTest(out var lbl))
             {
@@ -108,7 +108,7 @@ namespace ReactiveTests.Tests
             {
                 RunAsync(evt =>
                 {
-                    bool okay = true;
+                    var okay = true;
                     Observable.Range(0, 10, NewThreadScheduler.Default).ObserveOn(dispatcher).Subscribe(x =>
                     {
                         okay &= (SynchronizationContext.Current is System.Windows.Threading.DispatcherSynchronizationContext);
@@ -129,7 +129,7 @@ namespace ReactiveTests.Tests
             {
                 RunAsync(evt =>
                 {
-                    bool okay = true;
+                    var okay = true;
                     Observable.Range(0, 10, NewThreadScheduler.Default).ObserveOn(new DispatcherScheduler(dispatcher)).Subscribe(x =>
                     {
                         okay &= (SynchronizationContext.Current is System.Windows.Threading.DispatcherSynchronizationContext);
@@ -150,7 +150,7 @@ namespace ReactiveTests.Tests
             {
                 RunAsync(evt =>
                 {
-                    bool okay = true;
+                    var okay = true;
                     dispatcher.BeginInvoke(new Action(() =>
                     {
                         Observable.Range(0, 10, NewThreadScheduler.Default).ObserveOnDispatcher().Subscribe(x =>
@@ -175,7 +175,7 @@ namespace ReactiveTests.Tests
                 RunAsync(evt =>
                 {
                     var ex = new Exception();
-                    bool okay = true;
+                    var okay = true;
 
                     dispatcher.BeginInvoke(new Action(() =>
                     {
@@ -468,7 +468,6 @@ namespace ReactiveTests.Tests
             Assert.Same(ex_, err);
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void ObserveOn_LongRunning_TimeVariance()
         {
@@ -500,7 +499,6 @@ namespace ReactiveTests.Tests
 
             end.WaitOne();
         }
-#endif
 
         [TestMethod]
         public void ObserveOn_LongRunning_HoldUpDuringDispatchAndFail()

+ 1 - 1
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/OnErrorResumeNextTest.cs

@@ -670,7 +670,7 @@ namespace ReactiveTests.Tests
             res.Messages.AssertEqual(expected);
         }
 
-#if HAS_STACKTRACE && !NO_THREAD
+#if HAS_STACKTRACE
         [TestMethod]
         public void OnErrorResumeNext_TailRecursive2()
         {

+ 0 - 3
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/SynchronizeTest.cs

@@ -28,7 +28,6 @@ namespace ReactiveTests.Tests
             ReactiveAssert.Throws<ArgumentNullException>(() => Observable.Synchronize(someObservable, null));
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void Synchronize_Range()
         {
@@ -127,7 +126,5 @@ namespace ReactiveTests.Tests
 
             Assert.Equal(Enumerable.Range(0, 200).Sum(), sum);
         }
-#endif
-
     }
 }

+ 0 - 3
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/TimerTest.cs

@@ -673,7 +673,6 @@ namespace ReactiveTests.Tests
             );
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void RepeatingTimer_Start_CatchUp()
         {
@@ -733,8 +732,6 @@ namespace ReactiveTests.Tests
 
             Assert.Same(err, ex);
         }
-#endif
-
     }
 
     internal class SchedulerWithCatch : IServiceProvider, IScheduler

+ 0 - 5
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/WaitTest.cs

@@ -22,7 +22,6 @@ namespace ReactiveTests.Tests
             ReactiveAssert.Throws<ArgumentNullException>(() => Observable.Wait(default(IObservable<int>)));
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void Wait_Return()
         {
@@ -31,7 +30,6 @@ namespace ReactiveTests.Tests
             var res = xs.Wait();
             Assert.Equal(x, res);
         }
-#endif
 
         [TestMethod]
         public void Wait_Empty()
@@ -49,7 +47,6 @@ namespace ReactiveTests.Tests
             ReactiveAssert.Throws(ex, () => xs.Wait());
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void Wait_Range()
         {
@@ -58,7 +55,5 @@ namespace ReactiveTests.Tests
             var res = xs.Wait();
             Assert.Equal(n, res);
         }
-#endif
-
     }
 }

+ 1 - 10
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/QbservableTest.cs

@@ -1872,7 +1872,6 @@ namespace ReactiveTests.Tests
             Assert.Equal("***", res2);
         }
 
-#if !CRIPPLED_REFLECTION
         [TestMethod]
         public void Qbservable_Extensibility_Constructor()
         {
@@ -1894,7 +1893,6 @@ namespace ReactiveTests.Tests
 
             Assert.True(false);
         }
-#endif
 
         [TestMethod]
         public void Qbservable_HigherOrder()
@@ -1906,7 +1904,6 @@ namespace ReactiveTests.Tests
 
     public static class MyExt
     {
-#if !CRIPPLED_REFLECTION
         public static IQbservable<R> Foo<T, R>(this IQbservable<T> source, Expression<Func<T, R>> f)
         {
             return source.Provider.CreateQuery<R>(
@@ -1917,13 +1914,12 @@ namespace ReactiveTests.Tests
                 )
             );
         }
-#endif
 
         public static IObservable<R> Foo<T, R>(this IObservable<T> source, Func<T, R> f)
         {
             return source.Select(f);
         }
-#if !CRIPPLED_REFLECTION
+
         public static IQbservable<string> Bar(this IQbservable<int> source)
         {
             return source.Provider.CreateQuery<string>(
@@ -1934,13 +1930,11 @@ namespace ReactiveTests.Tests
             );
         }
 
-#endif
         public static IObservable<string> Bar(this IObservable<int> source)
         {
             return source.Select(x => new string('*', x));
         }
 
-#if !CRIPPLED_REFLECTION
         public static IQbservable<T> Qux<T>(this IQbservableProvider provider, T value)
         {
             return provider.CreateQuery<T>(
@@ -1951,14 +1945,12 @@ namespace ReactiveTests.Tests
                 )
             );
         }
-#endif
 
         public static IObservable<T> Qux<T>(T value)
         {
             return Observable.Return(value);
         }
 
-#if !CRIPPLED_REFLECTION
         public static IQbservable<R> Baz<T, R>(this IQbservable<T> source, Expression<Func<T, R>> f)
         {
             return source.Provider.CreateQuery<R>(
@@ -1969,7 +1961,6 @@ namespace ReactiveTests.Tests
                 )
             );
         }
-#endif
     }
 
     internal class MyQbservable<T> : IQbservable<T>

+ 0 - 5
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Subjects/AsyncSubjectTest.cs

@@ -304,8 +304,6 @@ namespace ReactiveTests.Tests
             );
         }
 
-
-#if !NO_THREAD
         [TestMethod]
         public void Await_Blocking()
         {
@@ -319,7 +317,6 @@ namespace ReactiveTests.Tests
             var s = new AsyncSubject<int>();
             GetResult_Blocking_ThrowImpl(s.GetAwaiter());
         }
-#endif
 
         [TestMethod]
         public void GetResult_Empty()
@@ -329,7 +326,6 @@ namespace ReactiveTests.Tests
             ReactiveAssert.Throws<InvalidOperationException>(() => s.GetResult());
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void GetResult_Blocking()
         {
@@ -401,7 +397,6 @@ namespace ReactiveTests.Tests
             Assert.Same(ex, y);
             Assert.True(s.IsCompleted);
         }
-#endif
 
         [TestMethod]
         public void GetResult_Context()

+ 0 - 2
Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Subjects/SubjectTest.cs

@@ -446,7 +446,6 @@ namespace ReactiveTests.Tests
             ReactiveAssert.Throws<ArgumentNullException>(() => Subject.Synchronize(s, null));
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void Subject_Synchronize1()
         {
@@ -501,7 +500,6 @@ namespace ReactiveTests.Tests
 
             Assert.Equal(Enumerable.Range(0, N).Sum(), y);
         }
-#endif
 
         [TestMethod]
         public void HasObservers()

+ 0 - 2
Rx.NET/Source/tests/Tests.System.Reactive/Tests/ObserverTest.cs

@@ -734,7 +734,6 @@ namespace ReactiveTests.Tests
             ReactiveAssert.Throws<ArgumentNullException>(() => Observer.NotifyOn(new MyObserver(), default(SynchronizationContext)));
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void NotifyOn_Scheduler_OnCompleted()
         {
@@ -799,7 +798,6 @@ namespace ReactiveTests.Tests
             e.WaitOne();
             Assert.Equal(N, c);
         }
-#endif
 
         [TestMethod]
         public void NotifyOn_SyncCtx()

+ 0 - 4
Rx.NET/Source/tests/Tests.System.Reactive/Tests/RegressionTest.cs

@@ -112,7 +112,6 @@ namespace ReactiveTests.Tests
             Assert.Null(xs as ISubject<int, int>);
         }
 
-#if !NO_THREAD
         [TestMethod]
         public void Bug_1286()
         {
@@ -127,7 +126,6 @@ namespace ReactiveTests.Tests
             //if the first doesn't this one always
             disp.Dispose();
         }
-#endif
 
         [TestMethod]
         public void Bug_1287()
@@ -138,7 +136,6 @@ namespace ReactiveTests.Tests
             Assert.True(flag);
         }
 
-#if !NO_THREAD
         private static IEnumerable<int> Bug_1333_Enumerable(AsyncSubject<IDisposable> s, Semaphore sema)
         {
             var d = s.First();
@@ -159,7 +156,6 @@ namespace ReactiveTests.Tests
             d.OnCompleted();
             sema.WaitOne();
         }
-#endif
 
         [TestMethod]
         public void Bug_1295_Completed()

+ 0 - 16
Rx.NET/tools/HomoIcon/Program.cs

@@ -419,14 +419,10 @@ using System.Threading.Tasks;
                     Indent();
                     WriteLine("null,");
                     var cma = args.Count > 0 ? "," : "";
-                    WriteLine("#if CRIPPLED_REFLECTION", true);
-                    WriteLine("InfoOf(() => " + typeName + "." + name + g + "(" + string.Join(", ", ptps.Select(pt => "default(" + pt + ")")) + "))" + cma);
-                    WriteLine("#else", true);
                     if (!m.IsGenericMethod)
                         WriteLine("(MethodInfo)MethodInfo.GetCurrentMethod()!" + cma);
                     else
                         WriteLine("((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(" + string.Join(", ", m.GetGenericArguments().Select(ga => "typeof(" + ga.Name + ")").ToArray()) + ")" + cma);
-                    WriteLine("#endif", true);
                     for (int j = 0; j < args.Count; j++)
                         WriteLine(args[j] + (j < args.Count - 1 ? "," : ""));
                     Outdent();
@@ -605,17 +601,10 @@ using System.Threading.Tasks;
                         }
 
                         WriteLine("");
-                        WriteLine("#if CRIPPLED_REFLECTION", true);
-                        var aprs = new List<string> { "IQbservableProvider", actType };
-                        if (withScheduler)
-                            aprs.Add("IScheduler");
-                        WriteLine("var m = InfoOf(() => " + typeName + ".ToAsync" + genArgss + "(" + string.Join(", ", aprs.Select(pt => "default(" + pt + ")")) + "));");
-                        WriteLine("#else", true);
                         if (genArgs.Length == 0)
                             WriteLine("var m = (MethodInfo)MethodInfo.GetCurrentMethod()!;");
                         else
                             WriteLine("var m = ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(" + string.Join(", ", genArgs.Select(a => "typeof(" + a + ")").ToArray()) + ");");
-                        WriteLine("#endif", true);
 
                         WriteLine("return (" + string.Join(", ", lamPars) + ") => provider.CreateQuery<" + ret + ">(");
                         Indent();
@@ -744,15 +733,10 @@ using System.Threading.Tasks;
 
                     WriteLine("");
 
-                    WriteLine("#if CRIPPLED_REFLECTION", true);
-                    var aprs = new List<string> { "IQbservableProvider", begType, endType };
-                    WriteLine("var m = InfoOf(() => " + typeName + ".FromAsyncPattern" + genArgss + "(" + string.Join(", ", aprs.Select(pt => "default(" + pt + ")")) + "));");
-                    WriteLine("#else", true);
                     if (genArgs.Length == 0)
                         WriteLine("var m = (MethodInfo)MethodInfo.GetCurrentMethod()!;");
                     else
                         WriteLine("var m = ((MethodInfo)MethodInfo.GetCurrentMethod()!).MakeGenericMethod(" + string.Join(", ", genArgs.Select(a => "typeof(" + a + ")").ToArray()) + ");");
-                    WriteLine("#endif", true);
 
                     WriteLine("return (" + string.Join(", ", lamPars) + ") => provider.CreateQuery<" + ret + ">(");
                     Indent();

Some files were not shown because too many files changed in this diff