From 8b1cda520247884d62ce609956d41b5ae5dd3940 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Thu, 13 Jun 2019 20:16:26 -0700 Subject: [PATCH] Add nullable annotations to System.Threading.Timer ref assembly (dotnet/corefx#38284) Commit migrated from https://github.com/dotnet/corefx/commit/c3f4524c785a226bae79cc82a96f7525460e2b5e --- .../System.Threading.Timer/ref/System.Threading.Timer.cs | 12 ++++++------ .../System.Threading.Timer/ref/System.Threading.Timer.csproj | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/libraries/System.Threading.Timer/ref/System.Threading.Timer.cs b/src/libraries/System.Threading.Timer/ref/System.Threading.Timer.cs index 7f660bb..9f98ec7 100644 --- a/src/libraries/System.Threading.Timer/ref/System.Threading.Timer.cs +++ b/src/libraries/System.Threading.Timer/ref/System.Threading.Timer.cs @@ -10,20 +10,20 @@ namespace System.Threading public sealed partial class Timer : System.MarshalByRefObject, System.IAsyncDisposable, System.IDisposable { public Timer(System.Threading.TimerCallback callback) { } - public Timer(System.Threading.TimerCallback callback, object state, int dueTime, int period) { } - public Timer(System.Threading.TimerCallback callback, object state, long dueTime, long period) { } - public Timer(System.Threading.TimerCallback callback, object state, System.TimeSpan dueTime, System.TimeSpan period) { } + public Timer(System.Threading.TimerCallback callback, object? state, int dueTime, int period) { } + public Timer(System.Threading.TimerCallback callback, object? state, long dueTime, long period) { } + public Timer(System.Threading.TimerCallback callback, object? state, System.TimeSpan dueTime, System.TimeSpan period) { } [System.CLSCompliantAttribute(false)] - public Timer(System.Threading.TimerCallback callback, object state, uint dueTime, uint period) { } + public Timer(System.Threading.TimerCallback callback, object? state, uint dueTime, uint period) { } + public static long ActiveCount { get { throw null; } } public bool Change(int dueTime, int period) { throw null; } public bool Change(long dueTime, long period) { throw null; } public bool Change(System.TimeSpan dueTime, System.TimeSpan period) { throw null; } [System.CLSCompliantAttribute(false)] public bool Change(uint dueTime, uint period) { throw null; } - public static long ActiveCount { get { throw null; } } public void Dispose() { } public bool Dispose(System.Threading.WaitHandle notifyObject) { throw null; } public System.Threading.Tasks.ValueTask DisposeAsync() { throw null; } } - public delegate void TimerCallback(object state); + public delegate void TimerCallback(object? state); } diff --git a/src/libraries/System.Threading.Timer/ref/System.Threading.Timer.csproj b/src/libraries/System.Threading.Timer/ref/System.Threading.Timer.csproj index c4b5835..214b18b 100644 --- a/src/libraries/System.Threading.Timer/ref/System.Threading.Timer.csproj +++ b/src/libraries/System.Threading.Timer/ref/System.Threading.Timer.csproj @@ -2,6 +2,7 @@ {DC78B562-4F74-49C2-9766-3B65CD610CCC} netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release + enable -- 2.7.4