Add nullable annotations to System.Threading.Tasks ref assembly (dotnet/corefx#38265)
authorSantiago Fernandez Madero <safern@microsoft.com>
Fri, 14 Jun 2019 03:13:21 +0000 (20:13 -0700)
committerStephen Toub <stoub@microsoft.com>
Fri, 14 Jun 2019 03:13:21 +0000 (23:13 -0400)
Commit migrated from https://github.com/dotnet/corefx/commit/3f94d610c133440eeb06f418540be6d8fd782ca0

src/libraries/System.Threading.Tasks/ref/System.Threading.Tasks.cs
src/libraries/System.Threading.Tasks/ref/System.Threading.Tasks.csproj

index 1ef7aea..5834278 100644 (file)
@@ -11,10 +11,10 @@ namespace System
     {
         public OperationCanceledException() { }
         protected OperationCanceledException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
-        public OperationCanceledException(string message) { }
-        public OperationCanceledException(string message, System.Exception innerException) { }
-        public OperationCanceledException(string message, System.Exception innerException, System.Threading.CancellationToken token) { }
-        public OperationCanceledException(string message, System.Threading.CancellationToken token) { }
+        public OperationCanceledException(string? message) { }
+        public OperationCanceledException(string? message, System.Exception? innerException) { }
+        public OperationCanceledException(string? message, System.Exception? innerException, System.Threading.CancellationToken token) { }
+        public OperationCanceledException(string? message, System.Threading.CancellationToken token) { }
         public OperationCanceledException(System.Threading.CancellationToken token) { }
         public System.Threading.CancellationToken CancellationToken { get { throw null; } }
     }
@@ -130,17 +130,17 @@ namespace System.Threading.Tasks
     {
         public TaskCanceledException() { }
         protected TaskCanceledException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
-        public TaskCanceledException(string message) { }
-        public TaskCanceledException(string message, System.Exception innerException) { }
-        public TaskCanceledException(string message, System.Exception innerException, System.Threading.CancellationToken token) { }
-        public TaskCanceledException(System.Threading.Tasks.Task task) { }
-        public System.Threading.Tasks.Task Task { get { throw null; } }
+        public TaskCanceledException(string? message) { }
+        public TaskCanceledException(string? message, System.Exception? innerException) { }
+        public TaskCanceledException(string? message, System.Exception? innerException, System.Threading.CancellationToken token) { }
+        public TaskCanceledException(System.Threading.Tasks.Task? task) { }
+        public System.Threading.Tasks.Task? Task { get { throw null; } }
     }
     public partial class TaskCompletionSource<TResult>
     {
         public TaskCompletionSource() { }
-        public TaskCompletionSource(object state) { }
-        public TaskCompletionSource(object state, System.Threading.Tasks.TaskCreationOptions creationOptions) { }
+        public TaskCompletionSource(object? state) { }
+        public TaskCompletionSource(object? state, System.Threading.Tasks.TaskCreationOptions creationOptions) { }
         public TaskCompletionSource(System.Threading.Tasks.TaskCreationOptions creationOptions) { }
         public System.Threading.Tasks.Task<TResult> Task { get { throw null; } }
         public void SetCanceled() { }
@@ -161,9 +161,9 @@ namespace System.Threading.Tasks
     public partial class TaskSchedulerException : System.Exception
     {
         public TaskSchedulerException() { }
-        public TaskSchedulerException(System.Exception innerException) { }
+        public TaskSchedulerException(System.Exception? innerException) { }
         protected TaskSchedulerException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
-        public TaskSchedulerException(string message) { }
-        public TaskSchedulerException(string message, System.Exception innerException) { }
+        public TaskSchedulerException(string? message) { }
+        public TaskSchedulerException(string? message, System.Exception? innerException) { }
     }
 }
index 0797d87..2fba1ad 100644 (file)
@@ -2,6 +2,7 @@
   <PropertyGroup>
     <ProjectGuid>{27675CCE-B6F9-4E2F-9BF2-5E623173BD5C}</ProjectGuid>
     <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+    <Nullable>enable</Nullable>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="System.Threading.Tasks.cs" />