Revert "chore: remove unused attributes"
This reverts commit c87e23bd84
.
This commit is contained in:
Родитель
3d58e4a38f
Коммит
60c4dbd605
|
@ -12,8 +12,7 @@ jobs:
|
|||
BuildConfiguration: Release
|
||||
ANDROID_NDK_HOME: C:\Microsoft\AndroidNDK64\android-ndk-r16b
|
||||
ANDROID_NDK_PATH: C:\Microsoft\AndroidNDK64\android-ndk-r16b
|
||||
AndroidNdkDirectory: C:\Microsoft\AndroidNDK64\android-ndk-r16b
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
AndroidNdkDirectory: C:\Microsoft\AndroidNDK64\android-ndk-r16b
|
||||
|
||||
steps:
|
||||
|
||||
|
@ -86,7 +85,6 @@ jobs:
|
|||
|
||||
variables:
|
||||
NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// 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.
|
||||
|
||||
#if !NETSTANDARD2_1_OR_GREATER
|
||||
|
||||
namespace System.Diagnostics.CodeAnalysis
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies that the output will be non-null if the named parameter is non-null.
|
||||
/// </summary>
|
||||
/// <remarks>Internal copy from the BCL attribute.</remarks>
|
||||
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)]
|
||||
internal sealed class NotNullIfNotNullAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NotNullIfNotNullAttribute"/> class.
|
||||
/// </summary>
|
||||
/// <param name="parameterName">The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null.</param>
|
||||
public NotNullIfNotNullAttribute(string parameterName) => ParameterName = parameterName;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the associated parameter name.
|
||||
/// </summary>
|
||||
public string ParameterName { get; }
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
|
@ -0,0 +1,29 @@
|
|||
// 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.
|
||||
|
||||
#if !NETSTANDARD2_1_OR_GREATER
|
||||
|
||||
namespace System.Diagnostics.CodeAnalysis
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies that when a method returns <see cref="ReturnValue"/>, the parameter will not be null even if the corresponding type allows it.
|
||||
/// </summary>
|
||||
/// <remarks>Internal copy from the BCL attribute.</remarks>
|
||||
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
|
||||
internal sealed class NotNullWhenAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NotNullWhenAttribute"/> class.
|
||||
/// </summary>
|
||||
/// <param name="returnValue">The return value condition. If the method returns this value, the associated parameter will not be null.</param>
|
||||
public NotNullWhenAttribute(bool returnValue) => ReturnValue = returnValue;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the annotated variable is not <see langword="null"/>.
|
||||
/// </summary>
|
||||
public bool ReturnValue { get; }
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Загрузка…
Ссылка в новой задаче