소스 검색

Merge pull request #347 from Reactive-Extensions/MoreNameOf

Using nameof in more places
Bart J.F. De Smet 8 년 전
부모
커밋
a341d2174f

+ 1 - 1
Rx.NET/Source/src/Microsoft.Reactive.Testing/MockObserver.cs

@@ -16,7 +16,7 @@ namespace Microsoft.Reactive.Testing
         public MockObserver(TestScheduler scheduler)
         {
             if (scheduler == null)
-                throw new ArgumentNullException("scheduler");
+                throw new ArgumentNullException(nameof(scheduler));
 
             this.scheduler = scheduler;
             this.messages = new List<Recorded<Notification<T>>>();

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

@@ -34,7 +34,7 @@ namespace System.Reactive.Concurrency
             // for more information.
             //
             if (period < TimeSpan.FromMilliseconds(1))
-                throw new ArgumentOutOfRangeException("period", Strings_PlatformServices.WINRT_NO_SUB1MS_TIMERS);
+                throw new ArgumentOutOfRangeException(nameof(period), Strings_PlatformServices.WINRT_NO_SUB1MS_TIMERS);
 
             var res = global::Windows.System.Threading.ThreadPoolTimer.CreatePeriodicTimer(
                 tpt =>

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

@@ -86,7 +86,7 @@ namespace System.Reactive.Concurrency
         public override IDisposable Schedule<TState>(TState state, Func<IScheduler, TState, IDisposable> action)
         {
             if (action == null)
-                throw new ArgumentNullException("action");
+                throw new ArgumentNullException(nameof(action));
 
             var d = new SingleAssignmentDisposable();
 
@@ -114,7 +114,7 @@ namespace System.Reactive.Concurrency
         public override IDisposable Schedule<TState>(TState state, TimeSpan dueTime, Func<IScheduler, TState, IDisposable> action)
         {
             if (action == null)
-                throw new ArgumentNullException("action");
+                throw new ArgumentNullException(nameof(action));
 
             var dt = Scheduler.Normalize(dueTime);
 
@@ -157,9 +157,9 @@ namespace System.Reactive.Concurrency
             // for more information.
             //
             if (period < TimeSpan.FromMilliseconds(1))
-                throw new ArgumentOutOfRangeException("period", Strings_PlatformServices.WINRT_NO_SUB1MS_TIMERS);
+                throw new ArgumentOutOfRangeException(nameof(period), Strings_PlatformServices.WINRT_NO_SUB1MS_TIMERS);
             if (action == null)
-                throw new ArgumentNullException("action");
+                throw new ArgumentNullException(nameof(action));
 
             var state1 = state;
             var gate = new AsyncLock();

+ 52 - 52
Rx.NET/Source/src/System.Reactive/Linq/Observable.Aggregates.cs

@@ -1786,11 +1786,11 @@ namespace System.Reactive.Linq
         public static IObservable<IList<TSource>> MinBy<TSource, TKey>(this IObservable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (keySelector == null)
-                throw new ArgumentNullException("keySelector");
+                throw new ArgumentNullException(nameof(keySelector));
             if (comparer == null)
-                throw new ArgumentNullException("comparer");
+                throw new ArgumentNullException(nameof(comparer));
 
             return s_impl.MinBy<TSource, TKey>(source, keySelector, comparer);
         }
@@ -1831,11 +1831,11 @@ namespace System.Reactive.Linq
         public static IObservable<bool> SequenceEqual<TSource>(this IObservable<TSource> first, IObservable<TSource> second, IEqualityComparer<TSource> comparer)
         {
             if (first == null)
-                throw new ArgumentNullException("first");
+                throw new ArgumentNullException(nameof(first));
             if (second == null)
-                throw new ArgumentNullException("second");
+                throw new ArgumentNullException(nameof(second));
             if (comparer == null)
-                throw new ArgumentNullException("comparer");
+                throw new ArgumentNullException(nameof(comparer));
 
             return s_impl.SequenceEqual<TSource>(first, second, comparer);
         }
@@ -1872,11 +1872,11 @@ namespace System.Reactive.Linq
         public static IObservable<bool> SequenceEqual<TSource>(this IObservable<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)
         {
             if (first == null)
-                throw new ArgumentNullException("first");
+                throw new ArgumentNullException(nameof(first));
             if (second == null)
-                throw new ArgumentNullException("second");
+                throw new ArgumentNullException(nameof(second));
             if (comparer == null)
-                throw new ArgumentNullException("comparer");
+                throw new ArgumentNullException(nameof(comparer));
 
             return s_impl.SequenceEqual<TSource>(first, second, comparer);
         }
@@ -1952,9 +1952,9 @@ namespace System.Reactive.Linq
         public static IObservable<TSource> SingleOrDefaultAsync<TSource>(this IObservable<TSource> source, Func<TSource, bool> predicate)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (predicate == null)
-                throw new ArgumentNullException("predicate");
+                throw new ArgumentNullException(nameof(predicate));
 
             return s_impl.SingleOrDefaultAsync<TSource>(source, predicate);
         }
@@ -2004,7 +2004,7 @@ namespace System.Reactive.Linq
         public static IObservable<decimal> Sum(this IObservable<decimal> source)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
 
             return s_impl.Sum(source);
         }
@@ -2020,7 +2020,7 @@ namespace System.Reactive.Linq
         public static IObservable<int> Sum(this IObservable<int> source)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
 
             return s_impl.Sum(source);
         }
@@ -2036,7 +2036,7 @@ namespace System.Reactive.Linq
         public static IObservable<long> Sum(this IObservable<long> source)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
 
             return s_impl.Sum(source);
         }
@@ -2051,7 +2051,7 @@ namespace System.Reactive.Linq
         public static IObservable<double?> Sum(this IObservable<double?> source)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
 
             return s_impl.Sum(source);
         }
@@ -2066,7 +2066,7 @@ namespace System.Reactive.Linq
         public static IObservable<float?> Sum(this IObservable<float?> source)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
 
             return s_impl.Sum(source);
         }
@@ -2082,7 +2082,7 @@ namespace System.Reactive.Linq
         public static IObservable<decimal?> Sum(this IObservable<decimal?> source)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
 
             return s_impl.Sum(source);
         }
@@ -2098,7 +2098,7 @@ namespace System.Reactive.Linq
         public static IObservable<int?> Sum(this IObservable<int?> source)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
 
             return s_impl.Sum(source);
         }
@@ -2114,7 +2114,7 @@ namespace System.Reactive.Linq
         public static IObservable<long?> Sum(this IObservable<long?> source)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
 
             return s_impl.Sum(source);
         }
@@ -2131,9 +2131,9 @@ namespace System.Reactive.Linq
         public static IObservable<double> Sum<TSource>(this IObservable<TSource> source, Func<TSource, double> selector)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (selector == null)
-                throw new ArgumentNullException("selector");
+                throw new ArgumentNullException(nameof(selector));
 
             return s_impl.Sum<TSource>(source, selector);
         }
@@ -2150,9 +2150,9 @@ namespace System.Reactive.Linq
         public static IObservable<float> Sum<TSource>(this IObservable<TSource> source, Func<TSource, float> selector)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (selector == null)
-                throw new ArgumentNullException("selector");
+                throw new ArgumentNullException(nameof(selector));
 
             return s_impl.Sum<TSource>(source, selector);
         }
@@ -2170,9 +2170,9 @@ namespace System.Reactive.Linq
         public static IObservable<decimal> Sum<TSource>(this IObservable<TSource> source, Func<TSource, decimal> selector)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (selector == null)
-                throw new ArgumentNullException("selector");
+                throw new ArgumentNullException(nameof(selector));
 
             return s_impl.Sum<TSource>(source, selector);
         }
@@ -2190,9 +2190,9 @@ namespace System.Reactive.Linq
         public static IObservable<int> Sum<TSource>(this IObservable<TSource> source, Func<TSource, int> selector)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (selector == null)
-                throw new ArgumentNullException("selector");
+                throw new ArgumentNullException(nameof(selector));
 
             return s_impl.Sum<TSource>(source, selector);
         }
@@ -2210,9 +2210,9 @@ namespace System.Reactive.Linq
         public static IObservable<long> Sum<TSource>(this IObservable<TSource> source, Func<TSource, long> selector)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (selector == null)
-                throw new ArgumentNullException("selector");
+                throw new ArgumentNullException(nameof(selector));
 
             return s_impl.Sum<TSource>(source, selector);
         }
@@ -2229,9 +2229,9 @@ namespace System.Reactive.Linq
         public static IObservable<double?> Sum<TSource>(this IObservable<TSource> source, Func<TSource, double?> selector)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (selector == null)
-                throw new ArgumentNullException("selector");
+                throw new ArgumentNullException(nameof(selector));
 
             return s_impl.Sum<TSource>(source, selector);
         }
@@ -2248,9 +2248,9 @@ namespace System.Reactive.Linq
         public static IObservable<float?> Sum<TSource>(this IObservable<TSource> source, Func<TSource, float?> selector)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (selector == null)
-                throw new ArgumentNullException("selector");
+                throw new ArgumentNullException(nameof(selector));
 
             return s_impl.Sum<TSource>(source, selector);
         }
@@ -2268,9 +2268,9 @@ namespace System.Reactive.Linq
         public static IObservable<decimal?> Sum<TSource>(this IObservable<TSource> source, Func<TSource, decimal?> selector)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (selector == null)
-                throw new ArgumentNullException("selector");
+                throw new ArgumentNullException(nameof(selector));
 
             return s_impl.Sum<TSource>(source, selector);
         }
@@ -2288,9 +2288,9 @@ namespace System.Reactive.Linq
         public static IObservable<int?> Sum<TSource>(this IObservable<TSource> source, Func<TSource, int?> selector)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (selector == null)
-                throw new ArgumentNullException("selector");
+                throw new ArgumentNullException(nameof(selector));
 
             return s_impl.Sum<TSource>(source, selector);
         }
@@ -2308,9 +2308,9 @@ namespace System.Reactive.Linq
         public static IObservable<long?> Sum<TSource>(this IObservable<TSource> source, Func<TSource, long?> selector)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (selector == null)
-                throw new ArgumentNullException("selector");
+                throw new ArgumentNullException(nameof(selector));
 
             return s_impl.Sum<TSource>(source, selector);
         }
@@ -2330,7 +2330,7 @@ namespace System.Reactive.Linq
         public static IObservable<TSource[]> ToArray<TSource>(this IObservable<TSource> source)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
 
             return s_impl.ToArray<TSource>(source);
         }
@@ -2352,9 +2352,9 @@ namespace System.Reactive.Linq
         public static IObservable<IDictionary<TKey, TSource>> ToDictionary<TSource, TKey>(this IObservable<TSource> source, Func<TSource, TKey> keySelector)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (keySelector == null)
-                throw new ArgumentNullException("keySelector");
+                throw new ArgumentNullException(nameof(keySelector));
 
             return s_impl.ToDictionary<TSource, TKey>(source, keySelector);
         }
@@ -2373,11 +2373,11 @@ namespace System.Reactive.Linq
         public static IObservable<IDictionary<TKey, TSource>> ToDictionary<TSource, TKey>(this IObservable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (keySelector == null)
-                throw new ArgumentNullException("keySelector");
+                throw new ArgumentNullException(nameof(keySelector));
             if (comparer == null)
-                throw new ArgumentNullException("comparer");
+                throw new ArgumentNullException(nameof(comparer));
 
             return s_impl.ToDictionary<TSource, TKey>(source, keySelector, comparer);
         }
@@ -2397,11 +2397,11 @@ namespace System.Reactive.Linq
         public static IObservable<IDictionary<TKey, TElement>> ToDictionary<TSource, TKey, TElement>(this IObservable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (keySelector == null)
-                throw new ArgumentNullException("keySelector");
+                throw new ArgumentNullException(nameof(keySelector));
             if (elementSelector == null)
-                throw new ArgumentNullException("elementSelector");
+                throw new ArgumentNullException(nameof(elementSelector));
 
             return s_impl.ToDictionary<TSource, TKey, TElement>(source, keySelector, elementSelector);
         }
@@ -2422,13 +2422,13 @@ namespace System.Reactive.Linq
         public static IObservable<IDictionary<TKey, TElement>> ToDictionary<TSource, TKey, TElement>(this IObservable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (keySelector == null)
-                throw new ArgumentNullException("keySelector");
+                throw new ArgumentNullException(nameof(keySelector));
             if (elementSelector == null)
-                throw new ArgumentNullException("elementSelector");
+                throw new ArgumentNullException(nameof(elementSelector));
             if (comparer == null)
-                throw new ArgumentNullException("comparer");
+                throw new ArgumentNullException(nameof(comparer));
 
             return s_impl.ToDictionary<TSource, TKey, TElement>(source, keySelector, elementSelector, comparer);
         }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 152 - 152
Rx.NET/Source/src/System.Reactive/Linq/Observable.Async.cs


+ 15 - 15
Rx.NET/Source/src/System.Reactive/Linq/Observable.Events.cs

@@ -48,9 +48,9 @@ namespace System.Reactive.Linq
         public static IObservable<EventPattern<EventArgs>> FromEventPattern(Action<EventHandler> addHandler, Action<EventHandler> removeHandler)
         {
             if (addHandler == null)
-                throw new ArgumentNullException("addHandler");
+                throw new ArgumentNullException(nameof(addHandler));
             if (removeHandler == null)
-                throw new ArgumentNullException("removeHandler");
+                throw new ArgumentNullException(nameof(removeHandler));
 
             return s_impl.FromEventPattern(addHandler, removeHandler);
         }
@@ -96,11 +96,11 @@ namespace System.Reactive.Linq
         public static IObservable<EventPattern<EventArgs>> FromEventPattern(Action<EventHandler> addHandler, Action<EventHandler> removeHandler, IScheduler scheduler)
         {
             if (addHandler == null)
-                throw new ArgumentNullException("addHandler");
+                throw new ArgumentNullException(nameof(addHandler));
             if (removeHandler == null)
-                throw new ArgumentNullException("removeHandler");
+                throw new ArgumentNullException(nameof(removeHandler));
             if (scheduler == null)
-                throw new ArgumentNullException("scheduler");
+                throw new ArgumentNullException(nameof(scheduler));
 
             return s_impl.FromEventPattern(addHandler, removeHandler, scheduler);
         }
@@ -521,9 +521,9 @@ namespace System.Reactive.Linq
         public static IObservable<EventPattern<EventArgs>> FromEventPattern(object target, string eventName)
         {
             if (target == null)
-                throw new ArgumentNullException("target");
+                throw new ArgumentNullException(nameof(target));
             if (eventName == null)
-                throw new ArgumentNullException("eventName");
+                throw new ArgumentNullException(nameof(eventName));
 
             return s_impl.FromEventPattern(target, eventName);
         }
@@ -571,11 +571,11 @@ namespace System.Reactive.Linq
         public static IObservable<EventPattern<EventArgs>> FromEventPattern(object target, string eventName, IScheduler scheduler)
         {
             if (target == null)
-                throw new ArgumentNullException("target");
+                throw new ArgumentNullException(nameof(target));
             if (eventName == null)
-                throw new ArgumentNullException("eventName");
+                throw new ArgumentNullException(nameof(eventName));
             if (scheduler == null)
-                throw new ArgumentNullException("scheduler");
+                throw new ArgumentNullException(nameof(scheduler));
 
             return s_impl.FromEventPattern(target, eventName, scheduler);
         }
@@ -812,9 +812,9 @@ namespace System.Reactive.Linq
         public static IObservable<EventPattern<EventArgs>> FromEventPattern(Type type, string eventName)
         {
             if (type == null)
-                throw new ArgumentNullException("type");
+                throw new ArgumentNullException(nameof(type));
             if (eventName == null)
-                throw new ArgumentNullException("eventName");
+                throw new ArgumentNullException(nameof(eventName));
 
             return s_impl.FromEventPattern(type, eventName);
         }
@@ -862,11 +862,11 @@ namespace System.Reactive.Linq
         public static IObservable<EventPattern<EventArgs>> FromEventPattern(Type type, string eventName, IScheduler scheduler)
         {
             if (type == null)
-                throw new ArgumentNullException("type");
+                throw new ArgumentNullException(nameof(type));
             if (eventName == null)
-                throw new ArgumentNullException("eventName");
+                throw new ArgumentNullException(nameof(eventName));
             if (scheduler == null)
-                throw new ArgumentNullException("scheduler");
+                throw new ArgumentNullException(nameof(scheduler));
 
             return s_impl.FromEventPattern(type, eventName, scheduler);
         }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 203 - 203
Rx.NET/Source/src/System.Reactive/Linq/Qbservable.Generated.cs


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

@@ -41,9 +41,9 @@ namespace System.Reactive.Linq
         public static IQbservable<Unit> Create(this IQbservableProvider provider, Expression<Func<IEnumerable<IObservable<object>>>> iteratorMethod)
         {
             if (provider == null)
-                throw new ArgumentNullException("provider");
+                throw new ArgumentNullException(nameof(provider));
             if (iteratorMethod == null)
-                throw new ArgumentNullException("iteratorMethod");
+                throw new ArgumentNullException(nameof(iteratorMethod));
             
             return provider.CreateQuery<Unit>(
                 Expression.Call(
@@ -74,9 +74,9 @@ namespace System.Reactive.Linq
         public static IQbservable<TResult> Create<TResult>(this IQbservableProvider provider, Expression<Func<IObserver<TResult>, IEnumerable<IObservable<object>>>> iteratorMethod)
         {
             if (provider == null)
-                throw new ArgumentNullException("provider");
+                throw new ArgumentNullException(nameof(provider));
             if (iteratorMethod == null)
-                throw new ArgumentNullException("iteratorMethod");
+                throw new ArgumentNullException(nameof(iteratorMethod));
             
             return provider.CreateQuery<TResult>(
                 Expression.Call(
@@ -107,9 +107,9 @@ namespace System.Reactive.Linq
         public static IQbservable<TSource> Expand<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, IObservable<TSource>>> selector)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (selector == null)
-                throw new ArgumentNullException("selector");
+                throw new ArgumentNullException(nameof(selector));
             
             return source.Provider.CreateQuery<TSource>(
                 Expression.Call(
@@ -141,11 +141,11 @@ namespace System.Reactive.Linq
         public static IQbservable<TSource> Expand<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, IObservable<TSource>>> selector, IScheduler scheduler)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (selector == null)
-                throw new ArgumentNullException("selector");
+                throw new ArgumentNullException(nameof(selector));
             if (scheduler == null)
-                throw new ArgumentNullException("scheduler");
+                throw new ArgumentNullException(nameof(scheduler));
             
             return source.Provider.CreateQuery<TSource>(
                 Expression.Call(
@@ -177,9 +177,9 @@ namespace System.Reactive.Linq
         public static IQbservable<TSource[]> ForkJoin<TSource>(this IQbservableProvider provider, params IObservable<TSource>[] sources)
         {
             if (provider == null)
-                throw new ArgumentNullException("provider");
+                throw new ArgumentNullException(nameof(provider));
             if (sources == null)
-                throw new ArgumentNullException("sources");
+                throw new ArgumentNullException(nameof(sources));
             
             return provider.CreateQuery<TSource[]>(
                 Expression.Call(
@@ -210,9 +210,9 @@ namespace System.Reactive.Linq
         public static IQbservable<TSource[]> ForkJoin<TSource>(this IQbservableProvider provider, IEnumerable<IObservable<TSource>> sources)
         {
             if (provider == null)
-                throw new ArgumentNullException("provider");
+                throw new ArgumentNullException(nameof(provider));
             if (sources == null)
-                throw new ArgumentNullException("sources");
+                throw new ArgumentNullException(nameof(sources));
             
             return provider.CreateQuery<TSource[]>(
                 Expression.Call(
@@ -246,11 +246,11 @@ namespace System.Reactive.Linq
         public static IQbservable<TResult> ForkJoin<TSource1, TSource2, TResult>(this IQbservable<TSource1> first, IObservable<TSource2> second, Expression<Func<TSource1, TSource2, TResult>> resultSelector)
         {
             if (first == null)
-                throw new ArgumentNullException("first");
+                throw new ArgumentNullException(nameof(first));
             if (second == null)
-                throw new ArgumentNullException("second");
+                throw new ArgumentNullException(nameof(second));
             if (resultSelector == null)
-                throw new ArgumentNullException("resultSelector");
+                throw new ArgumentNullException(nameof(resultSelector));
             
             return first.Provider.CreateQuery<TResult>(
                 Expression.Call(
@@ -284,9 +284,9 @@ namespace System.Reactive.Linq
         public static IQbservable<TResult> Let<TSource, TResult>(this IQbservable<TSource> source, Expression<Func<IObservable<TSource>, IObservable<TResult>>> selector)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (selector == null)
-                throw new ArgumentNullException("selector");
+                throw new ArgumentNullException(nameof(selector));
             
             return source.Provider.CreateQuery<TResult>(
                 Expression.Call(
@@ -311,9 +311,9 @@ namespace System.Reactive.Linq
         public static IQbservable<TResult> ManySelect<TSource, TResult>(this IQbservable<TSource> source, Expression<Func<IObservable<TSource>, TResult>> selector)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (selector == null)
-                throw new ArgumentNullException("selector");
+                throw new ArgumentNullException(nameof(selector));
             
             return source.Provider.CreateQuery<TResult>(
                 Expression.Call(
@@ -338,11 +338,11 @@ namespace System.Reactive.Linq
         public static IQbservable<TResult> ManySelect<TSource, TResult>(this IQbservable<TSource> source, Expression<Func<IObservable<TSource>, TResult>> selector, IScheduler scheduler)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (selector == null)
-                throw new ArgumentNullException("selector");
+                throw new ArgumentNullException(nameof(selector));
             if (scheduler == null)
-                throw new ArgumentNullException("scheduler");
+                throw new ArgumentNullException(nameof(scheduler));
             
             return source.Provider.CreateQuery<TResult>(
                 Expression.Call(

+ 6 - 6
Rx.NET/Source/src/System.Reactive/Platforms/Windows/Concurrency/CoreDispatcherScheduler.cs

@@ -32,7 +32,7 @@ namespace System.Reactive.Concurrency
         public CoreDispatcherScheduler(CoreDispatcher dispatcher)
         {
             if (dispatcher == null)
-                throw new ArgumentNullException("dispatcher");
+                throw new ArgumentNullException(nameof(dispatcher));
 
             _dispatcher = dispatcher;
             _priority = CoreDispatcherPriority.Normal;
@@ -47,7 +47,7 @@ namespace System.Reactive.Concurrency
         public CoreDispatcherScheduler(CoreDispatcher dispatcher, CoreDispatcherPriority priority)
         {
             if (dispatcher == null)
-                throw new ArgumentNullException("dispatcher");
+                throw new ArgumentNullException(nameof(dispatcher));
 
             _dispatcher = dispatcher;
             _priority = priority;
@@ -95,7 +95,7 @@ namespace System.Reactive.Concurrency
         public override IDisposable Schedule<TState>(TState state, Func<IScheduler, TState, IDisposable> action)
         {
             if (action == null)
-                throw new ArgumentNullException("action");
+                throw new ArgumentNullException(nameof(action));
 
             var d = new SingleAssignmentDisposable();
 
@@ -151,7 +151,7 @@ namespace System.Reactive.Concurrency
         public override IDisposable Schedule<TState>(TState state, TimeSpan dueTime, Func<IScheduler, TState, IDisposable> action)
         {
             if (action == null)
-                throw new ArgumentNullException("action");
+                throw new ArgumentNullException(nameof(action));
 
             var dt = Scheduler.Normalize(dueTime);
             if (dt.Ticks == 0)
@@ -211,9 +211,9 @@ namespace System.Reactive.Concurrency
             // Empirical observation - negative values seem to be normalized to TimeSpan.Zero, but let's not go there.
             //
             if (period < TimeSpan.Zero)
-                throw new ArgumentOutOfRangeException("period");
+                throw new ArgumentOutOfRangeException(nameof(period));
             if (action == null)
-                throw new ArgumentNullException("action");
+                throw new ArgumentNullException(nameof(action));
 
             var timer = new DispatcherTimer();
 

+ 20 - 20
Rx.NET/Source/src/System.Reactive/Platforms/Windows/Linq/CoreDispatcherObservable.cs

@@ -28,9 +28,9 @@ namespace System.Reactive.Linq
         public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, CoreDispatcher dispatcher)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (dispatcher == null)
-                throw new ArgumentNullException("dispatcher");
+                throw new ArgumentNullException(nameof(dispatcher));
 
             return Synchronization.ObserveOn(source, new CoreDispatcherScheduler(dispatcher));
         }
@@ -47,9 +47,9 @@ namespace System.Reactive.Linq
         public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, CoreDispatcher dispatcher, CoreDispatcherPriority priority)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (dispatcher == null)
-                throw new ArgumentNullException("dispatcher");
+                throw new ArgumentNullException(nameof(dispatcher));
 
             return Synchronization.ObserveOn(source, new CoreDispatcherScheduler(dispatcher, priority));
         }
@@ -65,9 +65,9 @@ namespace System.Reactive.Linq
         public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, DependencyObject dependencyObject)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (dependencyObject == null)
-                throw new ArgumentNullException("dependencyObject");
+                throw new ArgumentNullException(nameof(dependencyObject));
 
             return Synchronization.ObserveOn(source, new CoreDispatcherScheduler(dependencyObject.Dispatcher));
         }
@@ -84,9 +84,9 @@ namespace System.Reactive.Linq
         public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, DependencyObject dependencyObject, CoreDispatcherPriority priority)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (dependencyObject == null)
-                throw new ArgumentNullException("dependencyObject");
+                throw new ArgumentNullException(nameof(dependencyObject));
 
             return Synchronization.ObserveOn(source, new CoreDispatcherScheduler(dependencyObject.Dispatcher, priority));
         }
@@ -101,7 +101,7 @@ namespace System.Reactive.Linq
         public static IObservable<TSource> ObserveOnDispatcher<TSource>(this IObservable<TSource> source)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
 
             return Synchronization.ObserveOn(source, CoreDispatcherScheduler.Current);
         }
@@ -117,7 +117,7 @@ namespace System.Reactive.Linq
         public static IObservable<TSource> ObserveOnDispatcher<TSource>(this IObservable<TSource> source, CoreDispatcherPriority priority)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
 
             return Synchronization.ObserveOn(source, new CoreDispatcherScheduler(CoreDispatcherScheduler.Current.Dispatcher, priority));
         }
@@ -141,9 +141,9 @@ namespace System.Reactive.Linq
         public static IObservable<TSource> SubscribeOn<TSource>(this IObservable<TSource> source, CoreDispatcher dispatcher)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (dispatcher == null)
-                throw new ArgumentNullException("dispatcher");
+                throw new ArgumentNullException(nameof(dispatcher));
 
             return Synchronization.SubscribeOn(source, new CoreDispatcherScheduler(dispatcher));
         }
@@ -164,9 +164,9 @@ namespace System.Reactive.Linq
         public static IObservable<TSource> SubscribeOn<TSource>(this IObservable<TSource> source, CoreDispatcher dispatcher, CoreDispatcherPriority priority)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (dispatcher == null)
-                throw new ArgumentNullException("dispatcher");
+                throw new ArgumentNullException(nameof(dispatcher));
 
             return Synchronization.SubscribeOn(source, new CoreDispatcherScheduler(dispatcher, priority));
         }
@@ -186,9 +186,9 @@ namespace System.Reactive.Linq
         public static IObservable<TSource> SubscribeOn<TSource>(this IObservable<TSource> source, DependencyObject dependencyObject)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (dependencyObject == null)
-                throw new ArgumentNullException("dependencyObject");
+                throw new ArgumentNullException(nameof(dependencyObject));
 
             return Synchronization.SubscribeOn(source, new CoreDispatcherScheduler(dependencyObject.Dispatcher));
         }
@@ -209,9 +209,9 @@ namespace System.Reactive.Linq
         public static IObservable<TSource> SubscribeOn<TSource>(this IObservable<TSource> source, DependencyObject dependencyObject, CoreDispatcherPriority priority)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
             if (dependencyObject == null)
-                throw new ArgumentNullException("dependencyObject");
+                throw new ArgumentNullException(nameof(dependencyObject));
 
             return Synchronization.SubscribeOn(source, new CoreDispatcherScheduler(dependencyObject.Dispatcher, priority));
         }
@@ -230,7 +230,7 @@ namespace System.Reactive.Linq
         public static IObservable<TSource> SubscribeOnDispatcher<TSource>(this IObservable<TSource> source)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
 
             return Synchronization.SubscribeOn(source, CoreDispatcherScheduler.Current);
         }
@@ -250,7 +250,7 @@ namespace System.Reactive.Linq
         public static IObservable<TSource> SubscribeOnDispatcher<TSource>(this IObservable<TSource> source, CoreDispatcherPriority priority)
         {
             if (source == null)
-                throw new ArgumentNullException("source");
+                throw new ArgumentNullException(nameof(source));
 
             return Synchronization.SubscribeOn(source, new CoreDispatcherScheduler(CoreDispatcherScheduler.Current.Dispatcher, priority));
         }

+ 2 - 2
Rx.NET/Source/src/System.Reactive/Subjects/Subject.cs

@@ -300,7 +300,7 @@ namespace System.Reactive.Subjects
         public void OnError(Exception error)
         {
             if (error == null)
-                throw new ArgumentNullException("error");
+                throw new ArgumentNullException(nameof(error));
 
             var os = default(IObserver<T>[]);
             lock (gate)
@@ -352,7 +352,7 @@ namespace System.Reactive.Subjects
         public IDisposable Subscribe(IObserver<T> observer)
         {
             if (observer == null)
-                throw new ArgumentNullException("observer");
+                throw new ArgumentNullException(nameof(observer));
 
             lock (gate)
             {

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.