From 9972bf87b4f27d9c8f358ef8414ac1ab957a2f0f Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Wed, 19 Feb 2014 22:12:43 +0000 Subject: Imported Upstream version 3.2.8+dfsg --- .../Microsoft.Reactive.Testing/ReactiveTest.cs | 26 +++++++++------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'external/rx/Rx/NET/Source/Microsoft.Reactive.Testing/ReactiveTest.cs') diff --git a/external/rx/Rx/NET/Source/Microsoft.Reactive.Testing/ReactiveTest.cs b/external/rx/Rx/NET/Source/Microsoft.Reactive.Testing/ReactiveTest.cs index 37ff279696..45d8424647 100644 --- a/external/rx/Rx/NET/Source/Microsoft.Reactive.Testing/ReactiveTest.cs +++ b/external/rx/Rx/NET/Source/Microsoft.Reactive.Testing/ReactiveTest.cs @@ -65,15 +65,13 @@ namespace Microsoft.Reactive.Testing } /// - /// Factory method for an OnCompleted notification record at a given time. + /// Factory method for an OnCompleted notification record at a given time, using inference to determine the type of . /// /// The element type for the resulting notification object. - /// An unused instance of type T, to force the compiler to infer that T as part of the method's return value. /// Recorded virtual time the OnCompleted notification occurs. + /// Object solely used to infer the type of the type parameter. This parameter is typically used when creating a sequence of anonymously typed elements. /// Recorded OnCompleted notification. - /// This overload is used for anonymous types - by passing in an instance of the type, the compiler can infer the - /// anonymous type without you having to try naming the type. - public static Recorded> OnCompleted(T dummy, long ticks) + public static Recorded> OnCompleted(long ticks, T witness) { return new Recorded>(ticks, Notification.CreateOnCompleted()); } @@ -109,19 +107,17 @@ namespace Microsoft.Reactive.Testing return new Recorded>(ticks, new OnErrorPredicate(predicate)); } - + /// - /// Factory method for an OnError notification record at a given time with a given error. + /// Factory method for an OnError notification record at a given time with a given error, using inference to determine the type of . /// /// The element type for the resulting notification object. - /// An unused instance of type T, to force the compiler to infer that T as part of the method's return value. /// Recorded virtual time the OnError notification occurs. /// Recorded exception stored in the OnError notification. + /// Object solely used to infer the type of the type parameter. This parameter is typically used when creating a sequence of anonymously typed elements. /// Recorded OnError notification. /// is null. - /// This overload is used for anonymous types - by passing in an instance of the type, the compiler can infer the - /// anonymous type without you having to try naming the type. - public static Recorded> OnError(T dummy, long ticks, Exception exception) + public static Recorded> OnError(long ticks, Exception exception, T witness) { if (exception == null) throw new ArgumentNullException("exception"); @@ -130,17 +126,15 @@ namespace Microsoft.Reactive.Testing } /// - /// Factory method for writing an assert that checks for an OnError notification record at a given time, using the specified predicate to check the exception. + /// Factory method for writing an assert that checks for an OnError notification record at a given time, using the specified predicate to check the exception and inference to determine the type of . /// /// The element type for the resulting notification object. - /// An unused instance of type T, to force the compiler to infer that T as part of the method's return value. /// Recorded virtual time the OnError notification occurs. /// Predicate function to check the OnError notification value against an expected exception. + /// Object solely used to infer the type of the type parameter. This parameter is typically used when creating a sequence of anonymously typed elements. /// Recorded OnError notification with a predicate to assert a given exception. /// is null. - /// This overload is used for anonymous types - by passing in an instance of the type, the compiler can infer the - /// anonymous type without you having to try naming the type. - public static Recorded> OnError(T dummy, long ticks, Func predicate) + public static Recorded> OnError(long ticks, Func predicate, T witness) { if (predicate == null) throw new ArgumentNullException("predicate"); -- cgit v1.2.3