From: Santiago Fernandez Madero Date: Wed, 19 Jun 2019 17:32:59 +0000 (-0700) Subject: Add nullable annotations to System.Runtime.InteropServices.WindowsRuntime ref (dotnet... X-Git-Tag: submit/tizen/20210909.063632~11031^2~1242 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bab4abe5e808dbbd7f55e2841299331a9fd70c7e;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Add nullable annotations to System.Runtime.InteropServices.WindowsRuntime ref (dotnet/corefx#38003) * Add nullable annotations to System.Runtime.InteropServices.WindowsRuntime ref * Apply nullable attributes Commit migrated from https://github.com/dotnet/corefx/commit/36ff261d4ec19933dde77c11c78256f62a5a4487 --- diff --git a/src/libraries/System.Runtime.InteropServices.WindowsRuntime/ref/System.Runtime.InteropServices.WindowsRuntime.cs b/src/libraries/System.Runtime.InteropServices.WindowsRuntime/ref/System.Runtime.InteropServices.WindowsRuntime.cs index e531b50..edd4a16 100644 --- a/src/libraries/System.Runtime.InteropServices.WindowsRuntime/ref/System.Runtime.InteropServices.WindowsRuntime.cs +++ b/src/libraries/System.Runtime.InteropServices.WindowsRuntime/ref/System.Runtime.InteropServices.WindowsRuntime.cs @@ -16,7 +16,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public partial struct EventRegistrationToken { private int _dummyPrimitive; - public override bool Equals(object obj) { throw null; } + public override bool Equals(object? obj) { throw null; } public override int GetHashCode() { throw null; } public static bool operator ==(System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken left, System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken right) { throw null; } public static bool operator !=(System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken left, System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken right) { throw null; } @@ -24,9 +24,10 @@ namespace System.Runtime.InteropServices.WindowsRuntime public sealed partial class EventRegistrationTokenTable where T : class { public EventRegistrationTokenTable() { } + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute] public T InvocationList { get { throw null; } set { } } public System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken AddEventHandler(T handler) { throw null; } - public static System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable GetOrCreateEventRegistrationTokenTable(ref System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable refEventTable) { throw null; } + public static System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable GetOrCreateEventRegistrationTokenTable(ref System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable? refEventTable) { throw null; } public void RemoveEventHandler(System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token) { } public void RemoveEventHandler(T handler) { } } diff --git a/src/libraries/System.Runtime.InteropServices.WindowsRuntime/ref/System.Runtime.InteropServices.WindowsRuntime.csproj b/src/libraries/System.Runtime.InteropServices.WindowsRuntime/ref/System.Runtime.InteropServices.WindowsRuntime.csproj index f0490a4..4fcf8b7 100644 --- a/src/libraries/System.Runtime.InteropServices.WindowsRuntime/ref/System.Runtime.InteropServices.WindowsRuntime.csproj +++ b/src/libraries/System.Runtime.InteropServices.WindowsRuntime/ref/System.Runtime.InteropServices.WindowsRuntime.csproj @@ -2,6 +2,7 @@ {DC485335-D0D7-4E28-9593-445B7B6BEFA7} netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release + enable