Bläddra i källkod

Exposing the .NET 4.6 overload for TrySetCanceled through enlightenments.

Bart De Smet 10 år sedan
förälder
incheckning
a3e9907d13

+ 5 - 5
Rx.NET/Source/System.Reactive.Core/Reactive/Internal/TaskServices.cs

@@ -36,12 +36,12 @@ namespace System.Reactive.PlatformServices
     public interface ITaskServices
     {
         /// <summary>
-        /// 
+        /// Attempts to transition the underlying Task{T} into the Canceled state.
         /// </summary>
-        /// <typeparam name="T"></typeparam>
-        /// <param name="tcs"></param>
-        /// <param name="token"></param>
-        /// <returns></returns>
+        /// <typeparam name="T">Type of the result of the underlying task.</typeparam>
+        /// <param name="tcs">Task completion source whose underlying task to transition into the Canceled state.</param>
+        /// <param name="token">Cancellation token that triggered the cancellation.</param>
+        /// <returns>True if the operation was successful; false if the operation was unsuccessful or the object has already been disposed.</returns>
         bool TrySetCanceled<T>(TaskCompletionSource<T> tcs, CancellationToken token);
     }
 }

+ 2 - 2
Rx.NET/Source/System.Reactive.PlatformServices/Reactive/Internal/PlatformEnlightenmentProvider.cs

@@ -70,9 +70,9 @@ namespace System.Reactive.PlatformServices
 #endif
 
 #if HAS_TPL46
-            if (t == typeof(IExceptionServices))
+            if (t == typeof(ITaskServices))
             {
-                return (T)(object)new ExceptionServicesImpl();
+                return (T)(object)new TaskServicesImpl();
             }
 #endif
 

+ 1 - 1
Rx.NET/Source/System.Reactive.PlatformServices/Reactive/Internal/TaskServicesImpl.cs

@@ -11,7 +11,7 @@ namespace System.Reactive.PlatformServices
     //          Another copy is kept in System.Reactive.PlatformServices to enlighten the default lowest common denominator
     //          behavior of Rx for PLIB when used on a more capable platform.
     //
-    internal class DefaultTaskServices/*Impl*/ : ITaskServices
+    internal class /*Default*/TaskServicesImpl : ITaskServices
     {
         public bool TrySetCanceled<T>(TaskCompletionSource<T> tcs, CancellationToken token)
         {