summaryrefslogtreecommitdiff
path: root/external/rx/Rx/NET/Source/Microsoft.Reactive.Testing
diff options
context:
space:
mode:
authorJo Shields <directhex@apebox.org>2014-02-19 22:12:43 +0000
committerJo Shields <directhex@apebox.org>2014-02-19 22:12:43 +0000
commit9972bf87b4f27d9c8f358ef8414ac1ab957a2f0f (patch)
tree5bb230c1d698659115f918e243c1d4b0aa4c7f51 /external/rx/Rx/NET/Source/Microsoft.Reactive.Testing
parentd0a215f5626219ff7927f576588a777e5331c7be (diff)
downloadmono-upstream/3.2.8+dfsg.tar.gz
Imported Upstream version 3.2.8+dfsgupstream/3.2.8+dfsg
Diffstat (limited to 'external/rx/Rx/NET/Source/Microsoft.Reactive.Testing')
-rw-r--r--external/rx/Rx/NET/Source/Microsoft.Reactive.Testing/Properties/AssemblyInfo.cs12
-rw-r--r--external/rx/Rx/NET/Source/Microsoft.Reactive.Testing/ReactiveTest.cs26
2 files changed, 18 insertions, 20 deletions
diff --git a/external/rx/Rx/NET/Source/Microsoft.Reactive.Testing/Properties/AssemblyInfo.cs b/external/rx/Rx/NET/Source/Microsoft.Reactive.Testing/Properties/AssemblyInfo.cs
index 826b2c0764..fb122f2c85 100644
--- a/external/rx/Rx/NET/Source/Microsoft.Reactive.Testing/Properties/AssemblyInfo.cs
+++ b/external/rx/Rx/NET/Source/Microsoft.Reactive.Testing/Properties/AssemblyInfo.cs
@@ -17,7 +17,11 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
-//
-// Note: Assembly (file) version numbers get inserted by the build system on the fly. Inspect the Team Build workflows
-// and the custom activity in Source/Build/Activities/AppendVersionInfo.cs for more information.
-//
+// ===========================================================================
+// DO NOT EDIT OR REMOVE ANYTHING BELOW THIS COMMENT.
+// Version numbers are automatically generated in the msbuild files based on regular expressions
+// ===========================================================================
+
+[assembly: AssemblyVersion("2.2.0.0")]
+[assembly: AssemblyFileVersion("2.2.0.0")]
+[assembly: AssemblyInformationalVersion("2.2.0.0")]
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
}
/// <summary>
- /// 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 <typeparamref name="T"/>.
/// </summary>
/// <typeparam name="T">The element type for the resulting notification object.</typeparam>
- /// <param name="dummy">An unused instance of type T, to force the compiler to infer that T as part of the method's return value.</param>
/// <param name="ticks">Recorded virtual time the OnCompleted notification occurs.</param>
+ /// <param name="witness">Object solely used to infer the type of the <typeparamref name="T"/> type parameter. This parameter is typically used when creating a sequence of anonymously typed elements.</param>
/// <returns>Recorded OnCompleted notification.</returns>
- /// <remarks>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.</remarks>
- public static Recorded<Notification<T>> OnCompleted<T>(T dummy, long ticks)
+ public static Recorded<Notification<T>> OnCompleted<T>(long ticks, T witness)
{
return new Recorded<Notification<T>>(ticks, Notification.CreateOnCompleted<T>());
}
@@ -109,19 +107,17 @@ namespace Microsoft.Reactive.Testing
return new Recorded<Notification<T>>(ticks, new OnErrorPredicate<T>(predicate));
}
-
+
/// <summary>
- /// 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 <typeparamref name="T"/>.
/// </summary>
/// <typeparam name="T">The element type for the resulting notification object.</typeparam>
- /// <param name="dummy">An unused instance of type T, to force the compiler to infer that T as part of the method's return value.</param>
/// <param name="ticks">Recorded virtual time the OnError notification occurs.</param>
/// <param name="exception">Recorded exception stored in the OnError notification.</param>
+ /// <param name="witness">Object solely used to infer the type of the <typeparamref name="T"/> type parameter. This parameter is typically used when creating a sequence of anonymously typed elements.</param>
/// <returns>Recorded OnError notification.</returns>
/// <exception cref="ArgumentNullException"><paramref name="exception"/> is null.</exception>
- /// <remarks>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.</remarks>
- public static Recorded<Notification<T>> OnError<T>(T dummy, long ticks, Exception exception)
+ public static Recorded<Notification<T>> OnError<T>(long ticks, Exception exception, T witness)
{
if (exception == null)
throw new ArgumentNullException("exception");
@@ -130,17 +126,15 @@ namespace Microsoft.Reactive.Testing
}
/// <summary>
- /// 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 <typeparamref name="T"/>.
/// </summary>
/// <typeparam name="T">The element type for the resulting notification object.</typeparam>
- /// <param name="dummy">An unused instance of type T, to force the compiler to infer that T as part of the method's return value.</param>
/// <param name="ticks">Recorded virtual time the OnError notification occurs.</param>
/// <param name="predicate">Predicate function to check the OnError notification value against an expected exception.</param>
+ /// <param name="witness">Object solely used to infer the type of the <typeparamref name="T"/> type parameter. This parameter is typically used when creating a sequence of anonymously typed elements.</param>
/// <returns>Recorded OnError notification with a predicate to assert a given exception.</returns>
/// <exception cref="ArgumentNullException"><paramref name="predicate"/> is null.</exception>
- /// <remarks>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.</remarks>
- public static Recorded<Notification<T>> OnError<T>(T dummy, long ticks, Func<Exception, bool> predicate)
+ public static Recorded<Notification<T>> OnError<T>(long ticks, Func<Exception, bool> predicate, T witness)
{
if (predicate == null)
throw new ArgumentNullException("predicate");