mirror of
https://github.com/icsharpcode/ILSpy.git
synced 2026-10-12 11:09:54 +00:00
Backfills the standard MIT X11 header on hand-written files that never got one, attributing each to its first-commit author and year from git history. Code vendored from dotnet/runtime and Humanizr/Humanizer gets its origin's license lines and a provenance note instead. Generated files (Resources.Designer.cs, the version-info template), tool-managed suppression files, and BAML test-case fixtures intentionally stay header-less. Assisted-by: Claude:claude-fable-5:Claude Code
44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
// Licensed to the .NET Foundation under one or more agreements.
|
|
// The .NET Foundation licenses this file to you under the MIT license.
|
|
//
|
|
// Nullable-annotation attribute polyfills from dotnet/runtime, for target frameworks
|
|
// that lack them.
|
|
|
|
#if !NETCORE
|
|
|
|
#nullable enable
|
|
|
|
namespace System.Diagnostics.CodeAnalysis
|
|
{
|
|
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true)]
|
|
internal sealed class NotNullIfNotNullAttribute : Attribute
|
|
{
|
|
public string ParameterName { get; }
|
|
|
|
public NotNullIfNotNullAttribute(string parameterName)
|
|
{
|
|
ParameterName = parameterName;
|
|
}
|
|
}
|
|
|
|
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
|
|
internal sealed class NotNullWhenAttribute : Attribute
|
|
{
|
|
public NotNullWhenAttribute(bool returnValue)
|
|
{
|
|
ReturnValue = returnValue;
|
|
}
|
|
|
|
public bool ReturnValue { get; }
|
|
}
|
|
|
|
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
|
|
internal sealed class DoesNotReturnIfAttribute : Attribute
|
|
{
|
|
public DoesNotReturnIfAttribute(bool parameterValue) => ParameterValue = parameterValue;
|
|
|
|
public bool ParameterValue { get; }
|
|
}
|
|
}
|
|
#endif
|