瀏覽代碼

#ifdef cleanup of unused symbols

Oren Novotny 9 年之前
父節點
當前提交
f8a3d25c4e

+ 0 - 46
Ix.NET/Source/System.Interactive.Providers/QueryableEx.cs

@@ -1425,50 +1425,6 @@ namespace System.Linq
         }
 #pragma warning restore 1591
 
-#if NO_ZIP
-        /// <summary>
-        /// Merges two sequences by applying the specified selector function on index-based corresponding element pairs from both sequences.
-        /// </summary>
-        /// <typeparam name="TFirst">The type of the elements of the first input sequence.</typeparam>
-        /// <typeparam name="TSecond">The type of the elements of the second input sequence.</typeparam>
-        /// <typeparam name="TResult">The type of the elements of the result sequence.</typeparam>
-        /// <param name="first">The first sequence to merge.</param>
-        /// <param name="second">The second sequence to merge.</param>
-        /// <param name="resultSelector">Function to apply to each pair of elements from both sequences.</param>
-        /// <returns>Sequence consisting of the result of pairwise application of the selector function over pairs of elements from the source sequences.</returns>
-        public static IQueryable<TResult> Zip<TFirst, TSecond, TResult>(this IQueryable<TFirst> first, IEnumerable<TSecond> second, Expression<Func<TFirst, TSecond, TResult>> resultSelector)
-        {
-            if (first == null)
-                throw new ArgumentNullException("first");
-            if (second == null)
-                throw new ArgumentNullException("second");
-            if (resultSelector == null)
-                throw new ArgumentNullException("resultSelector");
-
-            return first.Provider.CreateQuery<TResult>(
-                Expression.Call(
-                    null,
-#if CRIPPLED_REFLECTION
-                    InfoOf(() => QueryableEx.Zip<TFirst, TSecond, TResult>(default(IQueryable<TFirst>), default(IEnumerable<TSecond>), default(Expression<Func<TFirst, TSecond, TResult>>))),
-#else
-                    ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TResult)),
-#endif
-                    first.Expression,
-                    GetSourceExpression(second),
-                    resultSelector
-                )
-            );
-        }
-
-#pragma warning disable 1591
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public static IEnumerable<TResult> Zip<TFirst, TSecond, TResult>(IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector)
-        {
-            return EnumerableEx.Zip(first, second, resultSelector);
-        }
-#pragma warning restore 1591
-#endif
-
         /// <summary>
         /// Hides the enumerable sequence object identity.
         /// </summary>
@@ -1662,7 +1618,6 @@ namespace System.Linq
         }
 #pragma warning restore 1591
 
-#if !NO_RXINTERFACES
         /// <summary>
         /// Lazily invokes observer methods for each value in the sequence, and upon successful or exceptional termination.
         /// </summary>
@@ -1698,7 +1653,6 @@ namespace System.Linq
             return EnumerableEx.Do(source, observer);
         }
 #pragma warning restore 1591
-#endif
 
         /// <summary>
         /// Generates a sequence of non-overlapping adjacent buffers over the source sequence.

+ 1 - 3
Ix.NET/Source/Tests/AsyncQueryableTests.Generated.cs

@@ -2,7 +2,6 @@
 // The .NET Foundation licenses this file to you under the Apache 2.0 License.
 // See the LICENSE file in the project root for more information. 
 #define DEBUG // for Debug.WriteLine
-#if !SILVERLIGHTM7 && !PORTABLE
 
 using System;
 using System.Collections.Generic;
@@ -3377,5 +3376,4 @@ namespace Tests
 		}
 
 	}
-}
-#endif
+}

+ 1 - 4
Ix.NET/Source/Tests/AsyncTests.Aggregates.cs

@@ -1,7 +1,6 @@
 // Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the Apache 2.0 License.
 // See the LICENSE file in the project root for more information. 
-#if !NO_TPL
 
 using System;
 using System.Collections.Generic;
@@ -2170,6 +2169,4 @@ namespace Tests
             AssertThrows<Exception>(() => xs.Wait(WaitTimeoutMs), ex_ => ((AggregateException)ex_).Flatten().InnerExceptions.Single() == ex);
         }
     }
-}
-
-#endif
+}

+ 2 - 4
Ix.NET/Source/Tests/AsyncTests.Bugs.cs

@@ -1,7 +1,7 @@
 // Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the Apache 2.0 License.
 // See the LICENSE file in the project root for more information. 
-#if !NO_TPL
+
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -326,6 +326,4 @@ namespace Tests
         }
 
     }
-}
-
-#endif
+}

+ 2 - 6
Ix.NET/Source/Tests/AsyncTests.Conversions.cs

@@ -1,7 +1,7 @@
 // Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the Apache 2.0 License.
 // See the LICENSE file in the project root for more information. 
-#if !NO_TPL
+
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -194,7 +194,6 @@ namespace Tests
             AssertThrows<Exception>(() => xs.GetEnumerator().MoveNext(), ex_ => ((AggregateException)ex_).InnerExceptions.Single() == ex);
         }
 
-#if !NO_RXINTERFACES
         [Fact]
         public void ToObservable_Null()
         {
@@ -345,8 +344,5 @@ namespace Tests
                 _onNext(value);
             }
         }
-#endif
     }
-}
-
-#endif
+}

+ 1 - 4
Ix.NET/Source/Tests/AsyncTests.Creation.cs

@@ -1,7 +1,6 @@
 // Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the Apache 2.0 License.
 // See the LICENSE file in the project root for more information. 
-#if !NO_TPL
 
 using System;
 using System.Collections.Generic;
@@ -413,6 +412,4 @@ namespace Tests
             }
         }
     }
-}
-
-#endif
+}

+ 0 - 3
Ix.NET/Source/Tests/AsyncTests.Exceptions.cs

@@ -1,7 +1,6 @@
 // Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the Apache 2.0 License.
 // See the LICENSE file in the project root for more information. 
-#if !NO_TPL
 
 using System;
 using System.Collections.Generic;
@@ -549,5 +548,3 @@ namespace Tests
         }
     }
 }
-
-#endif

+ 0 - 3
Ix.NET/Source/Tests/AsyncTests.Multiple.cs

@@ -1,7 +1,6 @@
 // Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the Apache 2.0 License.
 // See the LICENSE file in the project root for more information. 
-#if !NO_TPL
 
 using System;
 using System.Collections.Generic;
@@ -786,5 +785,3 @@ namespace Tests
         }
     }
 }
-
-#endif

+ 1 - 4
Ix.NET/Source/Tests/AsyncTests.Single.cs

@@ -1,7 +1,6 @@
 // Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the Apache 2.0 License.
 // See the LICENSE file in the project root for more information. 
-#if !NO_TPL
 
 using System;
 using System.Collections.Generic;
@@ -2471,6 +2470,4 @@ namespace Tests
             NoNext(e);
         }
     }
-}
-
-#endif
+}

+ 1 - 4
Ix.NET/Source/Tests/AsyncTests.cs

@@ -1,7 +1,6 @@
 // Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the Apache 2.0 License.
 // See the LICENSE file in the project root for more information. 
-#if !NO_TPL
 
 using System;
 using System.Collections.Generic;
@@ -60,6 +59,4 @@ namespace Tests
             Assert.Equal(value, e.Current);
         }
     }
-}
-
-#endif
+}

+ 0 - 3
Ix.NET/Source/Tests/Tests.Qbservable.cs

@@ -1,7 +1,6 @@
 // Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the Apache 2.0 License.
 // See the LICENSE file in the project root for more information. 
-#if !SILVERLIGHTM7 && !PORTABLE
 
 using System;
 using System.Collections.Generic;
@@ -145,5 +144,3 @@ namespace Tests
         }
     }
 }
-
-#endif

+ 0 - 4
Ix.NET/Source/Tests/Tests.Single.cs

@@ -139,10 +139,8 @@ namespace Tests
             AssertThrows<ArgumentNullException>(() => EnumerableEx.Do<int>(new[] { 1 }, _ => { }, _ => { }, default(Action)));
             AssertThrows<ArgumentNullException>(() => EnumerableEx.Do<int>(new[] { 1 }, default(Action<int>), _ => { }));
             AssertThrows<ArgumentNullException>(() => EnumerableEx.Do<int>(new[] { 1 }, _ => { }, default(Action<Exception>)));
-#if !NO_RXINTERFACES
             AssertThrows<ArgumentNullException>(() => EnumerableEx.Do<int>(null, new MyObserver()));
             AssertThrows<ArgumentNullException>(() => EnumerableEx.Do<int>(new[] { 1 }, default(IObserver<int>)));
-#endif
         }
 
         [Fact]
@@ -172,7 +170,6 @@ namespace Tests
             Assert.True(ok);
         }
 
-#if !NO_RXINTERFACES
         [Fact]
         public void Do4()
         {
@@ -203,7 +200,6 @@ namespace Tests
                 Sum += value;
             }
         }
-#endif
 
         [Fact]
         public void Do5()