From 75a04100ec11e61595e5a9131504d76712d2a0a4 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Fri, 21 Oct 2022 16:23:17 +0200 Subject: [PATCH] Add NotNullAttribute polyfill in ComputeSharp.D2D1 --- .../ComputeSharp.D2D1.NetStandard.projitems | 1 + .../Diagnostics.CodeAnalysis/NotNullAttribute.cs | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 src/ComputeSharp.D2D1.NetStandard/System/Diagnostics.CodeAnalysis/NotNullAttribute.cs diff --git a/src/ComputeSharp.D2D1.NetStandard/ComputeSharp.D2D1.NetStandard.projitems b/src/ComputeSharp.D2D1.NetStandard/ComputeSharp.D2D1.NetStandard.projitems index ab355d3f..e130179f 100644 --- a/src/ComputeSharp.D2D1.NetStandard/ComputeSharp.D2D1.NetStandard.projitems +++ b/src/ComputeSharp.D2D1.NetStandard/ComputeSharp.D2D1.NetStandard.projitems @@ -11,6 +11,7 @@ + diff --git a/src/ComputeSharp.D2D1.NetStandard/System/Diagnostics.CodeAnalysis/NotNullAttribute.cs b/src/ComputeSharp.D2D1.NetStandard/System/Diagnostics.CodeAnalysis/NotNullAttribute.cs new file mode 100644 index 00000000..ca082723 --- /dev/null +++ b/src/ComputeSharp.D2D1.NetStandard/System/Diagnostics.CodeAnalysis/NotNullAttribute.cs @@ -0,0 +1,15 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Diagnostics.CodeAnalysis; + +/// +/// Specifies that an output will not be null even if the corresponding type allows it. +/// Specifies that an input argument was not null when the call returns. +/// +/// Internal copy from the BCL attribute. +[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, Inherited = false)] +internal sealed class NotNullAttribute : Attribute +{ +} \ No newline at end of file