-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
487 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,2 @@ | ||
branches: | ||
main: | ||
regex: ^master$|^main$ | ||
mode: ContinuousDelivery | ||
tag: 'rc' | ||
increment: Patch | ||
prevent-increment-of-merged-branch-version: true | ||
track-merge-target: false | ||
source-branches: [ 'develop', 'release' ] | ||
tracks-release-branches: false | ||
is-release-branch: false | ||
is-mainline: true | ||
pre-release-weight: 55000 | ||
develop: | ||
regex: ^dev(elop)?(ment)?$ | ||
mode: ContinuousDeployment | ||
tag: alpha | ||
increment: Minor | ||
prevent-increment-of-merged-branch-version: false | ||
track-merge-target: true | ||
source-branches: [] | ||
tracks-release-branches: true | ||
is-release-branch: false | ||
is-mainline: false | ||
pre-release-weight: 0 | ||
mode: ContinuousDeployment | ||
branches: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions
12
src/SourceGenerator.Foundations.Shared/Polyfills/InitProperties/IsExternalInit.poly.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace System.Runtime.CompilerServices | ||
{ | ||
using System.ComponentModel; | ||
/// <summary> | ||
/// Reserved to be used by the compiler for tracking metadata. | ||
/// This class should not be used by developers in source code. | ||
/// </summary> | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
internal static class IsExternalInit | ||
{ | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/SourceGenerator.Foundations.Shared/Polyfills/Nullable/AllowNullAttribute.poly.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#nullable enable | ||
#pragma warning disable | ||
namespace System.Diagnostics.CodeAnalysis | ||
{ | ||
using global::System; | ||
|
||
/// <summary> | ||
/// Specifies that <see langword="null"/> is allowed as an input even if the | ||
/// corresponding type disallows it. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property, Inherited = false)] | ||
[ExcludeFromCodeCoverage, DebuggerNonUserCode] | ||
internal sealed class AllowNullAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="AllowNullAttribute"/> class. | ||
/// </summary> | ||
public AllowNullAttribute() { } | ||
} | ||
} | ||
|
||
#pragma warning restore | ||
#nullable restore |
24 changes: 24 additions & 0 deletions
24
src/SourceGenerator.Foundations.Shared/Polyfills/Nullable/DisallowNullAttribute.poly.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#nullable enable | ||
#pragma warning disable | ||
|
||
namespace System.Diagnostics.CodeAnalysis | ||
{ | ||
using global::System; | ||
|
||
/// <summary> | ||
/// Specifies that <see langword="null"/> is disallowed as an input even if the | ||
/// corresponding type allows it. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property, Inherited = false)] | ||
[ExcludeFromCodeCoverage, DebuggerNonUserCode] | ||
internal sealed class DisallowNullAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="DisallowNullAttribute"/> class. | ||
/// </summary> | ||
public DisallowNullAttribute() { } | ||
} | ||
} | ||
|
||
#pragma warning restore | ||
#nullable restore |
22 changes: 22 additions & 0 deletions
22
src/SourceGenerator.Foundations.Shared/Polyfills/Nullable/DoesNotReturnAttribute.poly.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#nullable enable | ||
#pragma warning disable | ||
|
||
namespace System.Diagnostics.CodeAnalysis | ||
{ | ||
using global::System; | ||
|
||
/// <summary> | ||
/// Specifies that a method that will never return under any circumstance. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Method, Inherited = false)] | ||
[ExcludeFromCodeCoverage, DebuggerNonUserCode] | ||
internal sealed class DoesNotReturnAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="DoesNotReturnAttribute"/> class. | ||
/// </summary> | ||
public DoesNotReturnAttribute() { } | ||
} | ||
} | ||
#pragma warning restore | ||
#nullable restore |
37 changes: 37 additions & 0 deletions
37
src/SourceGenerator.Foundations.Shared/Polyfills/Nullable/DoesNotReturnIfAttribute.poly.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#nullable enable | ||
#pragma warning disable | ||
|
||
namespace System.Diagnostics.CodeAnalysis | ||
{ | ||
using global::System; | ||
|
||
/// <summary> | ||
/// Specifies that the method will not return if the associated <see cref="Boolean"/> | ||
/// parameter is passed the specified value. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)] | ||
[ExcludeFromCodeCoverage, DebuggerNonUserCode] | ||
internal sealed class DoesNotReturnIfAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Gets the condition parameter value. Code after the method is considered unreachable | ||
/// by diagnostics if the argument to the associated parameter matches this value. | ||
/// </summary> | ||
public bool ParameterValue { get; } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="DoesNotReturnIfAttribute"/> | ||
/// class with the specified parameter value. | ||
/// </summary> | ||
/// <param name="parameterValue"> | ||
/// The condition parameter value. Code after the method is considered | ||
/// unreachable by diagnostics if the argument to the associated parameter matches this value. | ||
/// </param> | ||
public DoesNotReturnIfAttribute(bool parameterValue) | ||
{ | ||
} | ||
} | ||
} | ||
|
||
#pragma warning restore | ||
#nullable restore |
28 changes: 28 additions & 0 deletions
28
src/SourceGenerator.Foundations.Shared/Polyfills/Nullable/MaybeNullAttribute.poly.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#nullable enable | ||
#pragma warning disable | ||
|
||
namespace System.Diagnostics.CodeAnalysis | ||
{ | ||
using global::System; | ||
|
||
/// <summary> | ||
/// Specifies that an output may be <see langword="null"/> even if the | ||
/// corresponding type disallows it. | ||
/// </summary> | ||
[AttributeUsage( | ||
AttributeTargets.Field | AttributeTargets.Parameter | | ||
AttributeTargets.Property | AttributeTargets.ReturnValue, | ||
Inherited = false | ||
)] | ||
[ExcludeFromCodeCoverage, DebuggerNonUserCode] | ||
internal sealed class MaybeNullAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="MaybeNullAttribute"/> class. | ||
/// </summary> | ||
public MaybeNullAttribute() { } | ||
} | ||
} | ||
|
||
#pragma warning restore | ||
#nullable restore |
36 changes: 36 additions & 0 deletions
36
src/SourceGenerator.Foundations.Shared/Polyfills/Nullable/MaybeNullWhenAttribute.poly.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#nullable enable | ||
#pragma warning disable | ||
|
||
namespace System.Diagnostics.CodeAnalysis | ||
{ | ||
using global::System; | ||
|
||
/// <summary> | ||
/// Specifies that when a method returns <see cref="ReturnValue"/>, | ||
/// the parameter may be <see langword="null"/> even if the corresponding type disallows it. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)] | ||
[ExcludeFromCodeCoverage, DebuggerNonUserCode] | ||
internal sealed class MaybeNullWhenAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Gets the return value condition. | ||
/// If the method returns this value, the associated parameter may be <see langword="null"/>. | ||
/// </summary> | ||
public bool ReturnValue { get; } | ||
|
||
/// <summary> | ||
/// Initializes the attribute with the specified return value condition. | ||
/// </summary> | ||
/// <param name="returnValue"> | ||
/// The return value condition. | ||
/// If the method returns this value, the associated parameter may be <see langword="null"/>. | ||
/// </param> | ||
public MaybeNullWhenAttribute(bool returnValue) | ||
{ | ||
ReturnValue = returnValue; | ||
} | ||
} | ||
} | ||
#pragma warning restore | ||
#nullable restore |
46 changes: 46 additions & 0 deletions
46
src/SourceGenerator.Foundations.Shared/Polyfills/Nullable/MemberNotNullAttribute.poly.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#nullable enable | ||
#pragma warning disable | ||
|
||
namespace System.Diagnostics.CodeAnalysis | ||
{ | ||
using global::System; | ||
|
||
/// <summary> | ||
/// Specifies that the method or property will ensure that the listed field and property members have | ||
/// not-<see langword="null"/> values. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)] | ||
[ExcludeFromCodeCoverage, DebuggerNonUserCode] | ||
internal sealed class MemberNotNullAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Gets field or property member names. | ||
/// </summary> | ||
public string[] Members { get; } | ||
|
||
/// <summary> | ||
/// Initializes the attribute with a field or property member. | ||
/// </summary> | ||
/// <param name="member"> | ||
/// The field or property member that is promised to be not-null. | ||
/// </param> | ||
public MemberNotNullAttribute(string member) | ||
{ | ||
Members = new[] { member }; | ||
} | ||
|
||
/// <summary> | ||
/// Initializes the attribute with the list of field and property members. | ||
/// </summary> | ||
/// <param name="members"> | ||
/// The list of field and property members that are promised to be not-null. | ||
/// </param> | ||
public MemberNotNullAttribute(params string[] members) | ||
{ | ||
Members = members; | ||
} | ||
} | ||
} | ||
|
||
#pragma warning restore | ||
#nullable restore |
62 changes: 62 additions & 0 deletions
62
src/SourceGenerator.Foundations.Shared/Polyfills/Nullable/MemberNotNullWhenAttribute.poly.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#nullable enable | ||
#pragma warning disable | ||
|
||
namespace System.Diagnostics.CodeAnalysis | ||
{ | ||
using global::System; | ||
|
||
/// <summary> | ||
/// Specifies that the method or property will ensure that the listed field and property members have | ||
/// non-<see langword="null"/> values when returning with the specified return value condition. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)] | ||
[ExcludeFromCodeCoverage, DebuggerNonUserCode] | ||
internal sealed class MemberNotNullWhenAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Gets the return value condition. | ||
/// </summary> | ||
public bool ReturnValue { get; } | ||
|
||
/// <summary> | ||
/// Gets field or property member names. | ||
/// </summary> | ||
public string[] Members { get; } | ||
|
||
/// <summary> | ||
/// Initializes the attribute with the specified return value condition and a field or property member. | ||
/// </summary> | ||
/// <param name="returnValue"> | ||
/// The return value condition. If the method returns this value, | ||
/// the associated parameter will not be <see langword="null"/>. | ||
/// </param> | ||
/// <param name="member"> | ||
/// The field or property member that is promised to be not-<see langword="null"/>. | ||
/// </param> | ||
public MemberNotNullWhenAttribute(bool returnValue, string member) | ||
{ | ||
ReturnValue = returnValue; | ||
Members = new[] { member }; | ||
} | ||
|
||
/// <summary> | ||
/// Initializes the attribute with the specified return value condition and list | ||
/// of field and property members. | ||
/// </summary> | ||
/// <param name="returnValue"> | ||
/// The return value condition. If the method returns this value, | ||
/// the associated parameter will not be <see langword="null"/>. | ||
/// </param> | ||
/// <param name="members"> | ||
/// The list of field and property members that are promised to be not-null. | ||
/// </param> | ||
public MemberNotNullWhenAttribute(bool returnValue, params string[] members) | ||
{ | ||
ReturnValue = returnValue; | ||
Members = members; | ||
} | ||
} | ||
} | ||
|
||
#pragma warning restore | ||
#nullable restore |
Oops, something went wrong.