From a6261f8742e9093b36e94c5ab95d200d37bdcb9a Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Thu, 14 Nov 2024 13:47:19 +1100 Subject: [PATCH] Remove link attribute and use a comment instead (#248) --- contributing.md | 16 ++++----- readme.md | 2 +- src/ApiBuilderTests/BuildApiTest.cs | 22 ++++++++---- .../CallerArgumentExpressionAttribute.cs | 2 +- src/Polyfill/CollectionBuilderAttribute.cs | 2 +- .../CompilerFeatureRequiredAttribute.cs | 2 +- src/Polyfill/ConstantExpectedAttribute.cs | 2 +- src/Polyfill/DateTimeOffsetPolyfill.cs | 12 +++---- src/Polyfill/DateTimePolyfill.cs | 12 +++---- .../DisableRuntimeMarshallingAttribute.cs | 2 +- src/Polyfill/EnumPolyfill.cs | 18 +++++----- src/Polyfill/ExperimentalAttribute.cs | 2 +- src/Polyfill/GuidPolyfill.cs | 8 ++--- src/Polyfill/Lock.cs | 2 +- src/Polyfill/ModuleInitializerAttribute.cs | 2 +- src/Polyfill/Nullability/NullabilityInfo.cs | 2 +- src/Polyfill/Numbers/BytePolyfill.cs | 14 ++++---- src/Polyfill/Numbers/DoublePolyfill.cs | 14 ++++---- src/Polyfill/Numbers/IntPolyfill.cs | 14 ++++---- src/Polyfill/Numbers/LongPolyfill.cs | 14 ++++---- src/Polyfill/Numbers/SBytePolyfill.cs | 14 ++++---- src/Polyfill/Numbers/ShortPolyfill.cs | 14 ++++---- src/Polyfill/Numbers/UIntPolyfill.cs | 14 ++++---- src/Polyfill/Numbers/ULongPolyfill.cs | 14 ++++---- src/Polyfill/Numbers/UShortPolyfill.cs | 14 ++++---- .../OverloadResolutionPriorityAttribute.cs | 2 +- src/Polyfill/Polyfill_CancellationToken.cs | 6 ++-- .../Polyfill_CancellationTokenSource.cs | 2 +- src/Polyfill/Polyfill_ConcurrentBag.cs | 2 +- src/Polyfill/Polyfill_ConcurrentDictionary.cs | 2 +- src/Polyfill/Polyfill_ConcurrentQueue.cs | 2 +- src/Polyfill/Polyfill_Dictionary.cs | 6 ++-- src/Polyfill/Polyfill_HashSet.cs | 2 +- src/Polyfill/Polyfill_HttpClient.cs | 12 +++---- src/Polyfill/Polyfill_HttpContent.cs | 6 ++-- .../Polyfill_IEnumerable_AggregateBy.cs | 4 +-- src/Polyfill/Polyfill_IEnumerable_Append.cs | 2 +- src/Polyfill/Polyfill_IEnumerable_Chunk.cs | 2 +- src/Polyfill/Polyfill_IEnumerable_CountBy.cs | 2 +- .../Polyfill_IEnumerable_DistinctBy.cs | 4 +-- .../Polyfill_IEnumerable_ElementAt.cs | 4 +-- src/Polyfill/Polyfill_IEnumerable_Except.cs | 12 +++---- .../Polyfill_IEnumerable_FirstOrDefault.cs | 4 +-- src/Polyfill/Polyfill_IEnumerable_Index.cs | 2 +- .../Polyfill_IEnumerable_LastOrDefault.cs | 4 +-- src/Polyfill/Polyfill_IEnumerable_Max.cs | 2 +- src/Polyfill/Polyfill_IEnumerable_MaxBy.cs | 4 +-- src/Polyfill/Polyfill_IEnumerable_Min.cs | 2 +- src/Polyfill/Polyfill_IEnumerable_MinBy.cs | 4 +-- .../Polyfill_IEnumerable_SingleOrDefault.cs | 4 +-- src/Polyfill/Polyfill_IEnumerable_SkipLast.cs | 2 +- src/Polyfill/Polyfill_IEnumerable_Take.cs | 2 +- src/Polyfill/Polyfill_IEnumerable_TakeLast.cs | 2 +- .../Polyfill_IEnumerable_ToHashSet.cs | 2 +- ...ll_IEnumerable_TryGetNonEnumeratedCount.cs | 2 +- src/Polyfill/Polyfill_IEnumerable_Zip.cs | 4 +-- src/Polyfill/Polyfill_IReadOnlyDictionary.cs | 4 +-- src/Polyfill/Polyfill_KeyValuePair.cs | 2 +- src/Polyfill/Polyfill_List.cs | 8 ++--- src/Polyfill/Polyfill_Memory.cs | 16 ++++----- src/Polyfill/Polyfill_Memory_EndsWith.cs | 6 ++-- src/Polyfill/Polyfill_Memory_SpanSplit.cs | 8 ++--- .../Polyfill_Memory_SpanSplitEnumerator.cs | 2 +- src/Polyfill/Polyfill_Memory_StartsWith.cs | 6 ++-- src/Polyfill/Polyfill_MicroNanosecond.cs | 24 ++++++------- src/Polyfill/Polyfill_MicroNanosecondAdd.cs | 4 +-- src/Polyfill/Polyfill_Process.cs | 2 +- src/Polyfill/Polyfill_Random.cs | 6 ++-- src/Polyfill/Polyfill_SortedList.cs | 4 +-- src/Polyfill/Polyfill_Stream.cs | 6 ++-- src/Polyfill/Polyfill_Stream_DisposeAsync.cs | 2 +- src/Polyfill/Polyfill_String.cs | 18 +++++----- src/Polyfill/Polyfill_StringBuilder.cs | 6 ++-- src/Polyfill/Polyfill_StringBuilder_Append.cs | 18 +++++----- .../Polyfill_StringBuilder_AppendJoin.cs | 12 +++---- src/Polyfill/Polyfill_StringBuilder_CopyTo.cs | 2 +- .../Polyfill_StringBuilder_GetChunks.cs | 2 +- src/Polyfill/Polyfill_Task.cs | 12 +++---- src/Polyfill/Polyfill_TaskCompletionSource.cs | 2 +- src/Polyfill/Polyfill_TextReader.cs | 6 ++-- src/Polyfill/Polyfill_TextWriter.cs | 14 ++++---- src/Polyfill/Polyfill_TryFormat.cs | 36 +++++++++---------- src/Polyfill/Polyfill_Type.cs | 10 +++--- src/Polyfill/Polyfill_XDocument.cs | 6 ++-- src/Polyfill/Regex/Polyfill_Regex.cs | 8 ++--- src/Polyfill/Regex/RegexPolyfill.cs | 12 +++---- .../RequiresPreviewFeaturesAttribute .cs | 2 +- src/Polyfill/SpanLineEnumerator.cs | 2 +- .../DefaultInterpolatedStringHandler.cs | 2 +- .../StringInterpolation/ISpanFormattable.cs | 2 +- ...erpolatedStringHandlerArgumentAttribute.cs | 2 +- .../InterpolatedStringHandlerAttribute.cs | 2 +- src/Polyfill/StringPolyfill.cs | 8 ++--- src/Polyfill/TaskCompletionSource.cs | 2 +- 94 files changed, 320 insertions(+), 312 deletions(-) diff --git a/contributing.md b/contributing.md index e54462a5..cd42526f 100644 --- a/contributing.md +++ b/contributing.md @@ -160,7 +160,7 @@ using Link = System.ComponentModel.DescriptionAttribute; /// The specification for module initializers in the .NET runtime can be found here: /// https://github.com/dotnet/runtime/blob/master/docs/design/specs/Ecma-335-Augments.md#module-initializer /// -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.moduleinitializerattribute")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.moduleinitializerattribute [ExcludeFromCodeCoverage] [DebuggerNonUserCode] [AttributeUsage( @@ -216,7 +216,7 @@ static partial class Polyfill /// A that represents the asynchronous flush operation. /// The text writer is disposed. /// The writer is currently in use by a previous write operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.flushasync#system-io-textwriter-flushasync(system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.flushasync#system-io-textwriter-flushasync(system-threading-cancellationtoken) public static Task FlushAsync(this TextWriter target, CancellationToken cancellationToken) { if (cancellationToken.IsCancellationRequested) @@ -236,7 +236,7 @@ static partial class Polyfill /// StringBuilder.GetChunks() method to avoid creating the intermediate string /// /// The string (as a StringBuilder) to write to the stream - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.write#system-io-textwriter-write(system-text-stringbuilder)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.write#system-io-textwriter-write(system-text-stringbuilder) public static void Write(this TextWriter target, StringBuilder? value) { if (value == null) @@ -260,7 +260,7 @@ static partial class Polyfill /// /// The string (as a StringBuilder) to write to the stream /// The token to monitor for cancellation requests. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.writeasync#system-io-textwriter-writeasync(system-readonlymemory((system-char))-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.writeasync#system-io-textwriter-writeasync(system-readonlymemory((system-char))-system-threading-cancellationtoken) public static Task WriteAsync(this TextWriter target, StringBuilder? value, CancellationToken cancellationToken = default) { if (cancellationToken.IsCancellationRequested) @@ -302,7 +302,7 @@ static partial class Polyfill /// The default value is . /// /// A task that represents the asynchronous write operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.writeasync#system-io-textwriter-writeasync(system-readonlymemory((system-char))-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.writeasync#system-io-textwriter-writeasync(system-readonlymemory((system-char))-system-threading-cancellationtoken) public static ValueTask WriteAsync( this TextWriter target, ReadOnlyMemory buffer, @@ -330,7 +330,7 @@ static partial class Polyfill /// The default value is . /// /// A task that represents the asynchronous write operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.writelineasync#system-io-textwriter-writelineasync(system-readonlymemory((system-char))-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.writelineasync#system-io-textwriter-writelineasync(system-readonlymemory((system-char))-system-threading-cancellationtoken) public static ValueTask WriteLineAsync( this TextWriter target, ReadOnlyMemory buffer, @@ -355,7 +355,7 @@ static partial class Polyfill /// Writes a character span to the text stream. /// /// The character span to write. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.write#system-io-textwriter-write(system-readonlyspan((system-char)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.write#system-io-textwriter-write(system-readonlyspan((system-char))) public static void Write( this TextWriter target, ReadOnlySpan buffer) @@ -378,7 +378,7 @@ static partial class Polyfill /// Writes the text representation of a character span to the text stream, followed by a line terminator. /// /// The char span value to write to the text stream. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.writeline#system-io-textwriter-writeline(system-readonlyspan((system-char)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.writeline#system-io-textwriter-writeline(system-readonlyspan((system-char))) public static void WriteLine( this TextWriter target, ReadOnlySpan buffer) diff --git a/readme.md b/readme.md index 99a50283..2ff4bddd 100644 --- a/readme.md +++ b/readme.md @@ -478,7 +478,7 @@ The class `Polyfill` includes the following extension methods: #### ConcurrentBag - * `void Clear(ConcurrentBag)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.concurrent.concurrentbag-1.clear) + * `void Clear()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.concurrent.concurrentbag-1.clear) #### ConcurrentDictionary diff --git a/src/ApiBuilderTests/BuildApiTest.cs b/src/ApiBuilderTests/BuildApiTest.cs index 0316c007..bdfe79f6 100644 --- a/src/ApiBuilderTests/BuildApiTest.cs +++ b/src/ApiBuilderTests/BuildApiTest.cs @@ -1,3 +1,5 @@ +using Microsoft.CodeAnalysis; + [TestFixture] class BuildApiTest { @@ -204,16 +206,22 @@ static string BuildParameters(MethodDeclarationSyntax method) static bool TryGetReference(MethodDeclarationSyntax method, [NotNullWhen(true)] out string? reference) { - var descriptionAttribute = method.Attributes() - .SingleOrDefault(_ => _.Name.ToString() == "Link"); - if (descriptionAttribute == null) + var syntaxTrivia = method.GetLeadingTrivia(); + foreach (var trivia in syntaxTrivia) { - reference = null; - return false; + if (trivia.IsKind(SyntaxKind.SingleLineCommentTrivia)) + { + var comment = trivia.ToString(); + if (comment.StartsWith("//Link: ")) + { + reference = comment.Replace("//Link: ", string.Empty); + return true; + } + } } - reference = descriptionAttribute.ArgumentList!.Arguments.Single().Value().Trim('"'); - return true; + reference = null; + return false; } diff --git a/src/Polyfill/CallerArgumentExpressionAttribute.cs b/src/Polyfill/CallerArgumentExpressionAttribute.cs index c87fcce4..8c09018b 100644 --- a/src/Polyfill/CallerArgumentExpressionAttribute.cs +++ b/src/Polyfill/CallerArgumentExpressionAttribute.cs @@ -15,7 +15,7 @@ namespace System.Runtime.CompilerServices; [ExcludeFromCodeCoverage] [DebuggerNonUserCode] [AttributeUsage(AttributeTargets.Parameter)] -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.callerargumentexpressionattribute")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.callerargumentexpressionattribute #if PolyPublic public #endif diff --git a/src/Polyfill/CollectionBuilderAttribute.cs b/src/Polyfill/CollectionBuilderAttribute.cs index 7dd1a300..eb5b439c 100644 --- a/src/Polyfill/CollectionBuilderAttribute.cs +++ b/src/Polyfill/CollectionBuilderAttribute.cs @@ -12,7 +12,7 @@ namespace System.Runtime.CompilerServices; [ExcludeFromCodeCoverage] [DebuggerNonUserCode] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, Inherited = false)] -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.collectionbuilderattribute")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.collectionbuilderattribute #if PolyPublic public #endif diff --git a/src/Polyfill/CompilerFeatureRequiredAttribute.cs b/src/Polyfill/CompilerFeatureRequiredAttribute.cs index 5dc4c41d..7050a89e 100644 --- a/src/Polyfill/CompilerFeatureRequiredAttribute.cs +++ b/src/Polyfill/CompilerFeatureRequiredAttribute.cs @@ -18,7 +18,7 @@ namespace System.Runtime.CompilerServices; validOn: AttributeTargets.All, AllowMultiple = true, Inherited = false)] -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.compilerfeaturerequiredattribute")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.compilerfeaturerequiredattribute #if PolyPublic public #endif diff --git a/src/Polyfill/ConstantExpectedAttribute.cs b/src/Polyfill/ConstantExpectedAttribute.cs index 35fa0808..218dadbc 100644 --- a/src/Polyfill/ConstantExpectedAttribute.cs +++ b/src/Polyfill/ConstantExpectedAttribute.cs @@ -18,7 +18,7 @@ namespace System.Diagnostics.CodeAnalysis; [ExcludeFromCodeCoverage] [DebuggerNonUserCode] [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis.constantexpectedattribute")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis.constantexpectedattribute #if PolyPublic public #endif diff --git a/src/Polyfill/DateTimeOffsetPolyfill.cs b/src/Polyfill/DateTimeOffsetPolyfill.cs index 166e95f9..464e032c 100644 --- a/src/Polyfill/DateTimeOffsetPolyfill.cs +++ b/src/Polyfill/DateTimeOffsetPolyfill.cs @@ -21,7 +21,7 @@ static class DateTimeOffsetPolyfill /// /// Tries to parse a string into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparse#system-datetimeoffset-tryparse(system-string-system-iformatprovider-system-datetimeoffset@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparse#system-datetimeoffset-tryparse(system-string-system-iformatprovider-system-datetimeoffset@) public static bool TryParse(string? target, IFormatProvider? provider, out DateTimeOffset result) => #if NET7_0_OR_GREATER DateTimeOffset.TryParse(target, provider, out result); @@ -34,7 +34,7 @@ public static bool TryParse(string? target, IFormatProvider? provider, out DateT /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparse#system-datetimeoffset-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-datetimeoffset@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparse#system-datetimeoffset-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-datetimeoffset@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out DateTimeOffset result) => #if NET8_0_OR_GREATER DateTimeOffset.TryParse(target, provider, out result); @@ -45,7 +45,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparse#system-datetimeoffset-tryparse(system-readonlyspan((system-char))-system-datetimeoffset@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparse#system-datetimeoffset-tryparse(system-readonlyspan((system-char))-system-datetimeoffset@) public static bool TryParse(ReadOnlySpan target, out DateTimeOffset result) => #if NETSTANDARD2_1 || NETSTANDARD2_1_OR_GREATER || NET5_0_OR_GREATER DateTimeOffset.TryParse(target, out result); @@ -56,7 +56,7 @@ public static bool TryParse(ReadOnlySpan target, out DateTimeOffset result /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparse#system-datetimeoffset-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetimeoffset@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparse#system-datetimeoffset-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetimeoffset@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, DateTimeStyles styles, out DateTimeOffset result) => #if NETSTANDARD2_1 || NETSTANDARD2_1_OR_GREATER || NET5_0_OR_GREATER DateTimeOffset.TryParse(target, provider, styles, out result); @@ -67,7 +67,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparseexact#system-datetimeoffset-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetimeoffset@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparseexact#system-datetimeoffset-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetimeoffset@) public static bool TryParseExact(ReadOnlySpan target, string format, IFormatProvider? provider, DateTimeStyles styles, out DateTimeOffset result) => #if NETSTANDARD2_1 || NETSTANDARD2_1_OR_GREATER || NET5_0_OR_GREATER DateTimeOffset.TryParseExact(target, format, provider, styles, out result); @@ -78,7 +78,7 @@ public static bool TryParseExact(ReadOnlySpan target, string format, IForm /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparseexact#system-datetimeoffset-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetimeoffset@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparseexact#system-datetimeoffset-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetimeoffset@) public static bool TryParseExact(ReadOnlySpan target, ReadOnlySpan format, IFormatProvider? provider, DateTimeStyles styles, out DateTimeOffset result) => #if NETFRAMEWORK || NETSTANDARD2_0 || NETCOREAPP2_0 DateTimeOffset.TryParseExact(target.ToString(), format.ToString(), provider, styles, out result); diff --git a/src/Polyfill/DateTimePolyfill.cs b/src/Polyfill/DateTimePolyfill.cs index 64a61c5b..dad4814f 100644 --- a/src/Polyfill/DateTimePolyfill.cs +++ b/src/Polyfill/DateTimePolyfill.cs @@ -19,7 +19,7 @@ static class DateTimePolyfill /// /// Tries to parse a string into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparse#system-datetime-tryparse(system-string-system-iformatprovider-system-datetime@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparse#system-datetime-tryparse(system-string-system-iformatprovider-system-datetime@) public static bool TryParse(string? target, IFormatProvider? provider, out DateTime result) => #if NET7_0_OR_GREATER DateTime.TryParse(target, provider, out result); @@ -32,7 +32,7 @@ public static bool TryParse(string? target, IFormatProvider? provider, out DateT /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparse#system-datetime-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-datetime@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparse#system-datetime-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-datetime@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out DateTime result) => #if NET8_0_OR_GREATER DateTime.TryParse(target, provider, out result); @@ -43,7 +43,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparse#system-datetime-tryparse(system-readonlyspan((system-char))-system-datetime@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparse#system-datetime-tryparse(system-readonlyspan((system-char))-system-datetime@) public static bool TryParse(ReadOnlySpan target, out DateTime result) => #if NETSTANDARD2_1 || NETSTANDARD2_1_OR_GREATER || NET5_0_OR_GREATER DateTime.TryParse(target, out result); @@ -54,7 +54,7 @@ public static bool TryParse(ReadOnlySpan target, out DateTime result) => /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparse#system-datetime-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetime@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparse#system-datetime-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetime@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, DateTimeStyles styles, out DateTime result) => #if NETSTANDARD2_1 || NETSTANDARD2_1_OR_GREATER || NET5_0_OR_GREATER DateTime.TryParse(target, provider, styles, out result); @@ -65,7 +65,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparseexact#system-datetime-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetime@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparseexact#system-datetime-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetime@) public static bool TryParseExact(ReadOnlySpan target, string format, IFormatProvider? provider, DateTimeStyles style, out DateTime result) => #if NETSTANDARD2_1 || NETSTANDARD2_1_OR_GREATER || NET5_0_OR_GREATER DateTime.TryParseExact(target, format, provider, style, out result); @@ -76,7 +76,7 @@ public static bool TryParseExact(ReadOnlySpan target, string format, IForm /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparseexact#system-datetime-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetime@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparseexact#system-datetime-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetime@) public static bool TryParseExact(ReadOnlySpan target, ReadOnlySpan format, IFormatProvider? provider, DateTimeStyles styles, out DateTime result) => #if NETFRAMEWORK || NETSTANDARD2_0 || NETCOREAPP2_0 DateTime.TryParseExact(target.ToString(), format.ToString(), provider, styles, out result); diff --git a/src/Polyfill/DisableRuntimeMarshallingAttribute.cs b/src/Polyfill/DisableRuntimeMarshallingAttribute.cs index f0082f42..2d86ec2f 100644 --- a/src/Polyfill/DisableRuntimeMarshallingAttribute.cs +++ b/src/Polyfill/DisableRuntimeMarshallingAttribute.cs @@ -29,7 +29,7 @@ namespace System.Runtime.CompilerServices; [ExcludeFromCodeCoverage] [DebuggerNonUserCode] [AttributeUsage(AttributeTargets.Assembly)] -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.disableruntimemarshallingattribute")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.disableruntimemarshallingattribute #if PolyPublic public #endif diff --git a/src/Polyfill/EnumPolyfill.cs b/src/Polyfill/EnumPolyfill.cs index 419a9ef4..bc8888f3 100644 --- a/src/Polyfill/EnumPolyfill.cs +++ b/src/Polyfill/EnumPolyfill.cs @@ -20,7 +20,7 @@ static class EnumPolyfill /// Retrieves an array of the values of the constants in a specified enumeration type. /// /// An array that contains the values of the constants in TEnum. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.enum.getvalues")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.enum.getvalues public static TEnum[] GetValues() where TEnum : struct, Enum { @@ -38,8 +38,8 @@ public static TEnum[] GetValues() /// The type of the enumeration. /// The value in . /// if a given integral value exists in a specified enumeration; , otherwise. + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.enum.isdefined#system-enum-isdefined-1(-0) [MethodImpl(MethodImplOptions.AggressiveInlining)] - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.enum.isdefined#system-enum-isdefined-1(-0)")] public static bool IsDefined (TEnum value) where TEnum : struct, Enum => #if NET5_0_OR_GREATER @@ -52,7 +52,7 @@ public static bool IsDefined (TEnum value) /// Retrieves an array of the names of the constants in a specified enumeration type. /// /// A string array of the names of the constants in TEnum. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.enum.getnames")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.enum.getnames public static string[] GetNames() where TEnum : struct, Enum => #if NETCOREAPPX || NETFRAMEWORK || NETSTANDARD @@ -64,7 +64,7 @@ public static string[] GetNames() /// /// Converts the string representation of the name or numeric value of one or more enumerated constants specified by TEnum to an equivalent enumerated object. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.enum.parse#system-enum-parse-1(system-string-system-boolean)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.enum.parse#system-enum-parse-1(system-string-system-boolean) public static TEnum Parse(string value) where TEnum : struct, Enum => #if NETFRAMEWORK || NETSTANDARD @@ -76,7 +76,7 @@ public static TEnum Parse(string value) /// /// Converts the string representation of the name or numeric value of one or more enumerated constants specified by TEnum to an equivalent enumerated object. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.enum.parse#system-enum-parse-1(system-string-system-boolean)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.enum.parse#system-enum-parse-1(system-string-system-boolean) public static TEnum Parse(string value, bool ignoreCase) where TEnum : struct, Enum => #if NETFRAMEWORK || NETSTANDARD @@ -90,7 +90,7 @@ public static TEnum Parse(string value, bool ignoreCase) /// /// Converts the span of characters representation of the name or numeric value of one or more enumerated constants specified by TEnum to an equivalent enumerated object. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.enum.parse#system-enum-parse-1(system-readonlyspan((system-char)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.enum.parse#system-enum-parse-1(system-readonlyspan((system-char))) public static TEnum Parse(ReadOnlySpan value) where TEnum : struct, Enum => #if NET6_0_OR_GREATER @@ -102,7 +102,7 @@ public static TEnum Parse(ReadOnlySpan value) /// /// Converts the span of characters representation of the name or numeric value of one or more enumerated constants specified by TEnum to an equivalent enumerated object. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.enum.parse#system-enum-parse-1(system-readonlyspan((system-char))-system-boolean)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.enum.parse#system-enum-parse-1(system-readonlyspan((system-char))-system-boolean) public static TEnum Parse(ReadOnlySpan value, bool ignoreCase) where TEnum : struct, Enum => #if NET6_0_OR_GREATER @@ -114,7 +114,7 @@ public static TEnum Parse(ReadOnlySpan value, bool ignoreCase) /// /// Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.enum.tryparse#system-enum-tryparse-1(system-readonlyspan((system-char))-0@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.enum.tryparse#system-enum-tryparse-1(system-readonlyspan((system-char))-0@) public static bool TryParse(ReadOnlySpan value, out TEnum result) where TEnum : struct, Enum => #if NET6_0_OR_GREATER @@ -126,7 +126,7 @@ public static bool TryParse(ReadOnlySpan value, out TEnum result) /// /// Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. A parameter specifies whether the operation is case-sensitive. The return value indicates whether the conversion succeeded. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.enum.tryparse#system-enum-tryparse-1(system-readonlyspan((system-char))-system-boolean-0@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.enum.tryparse#system-enum-tryparse-1(system-readonlyspan((system-char))-system-boolean-0@) public static bool TryParse(ReadOnlySpan value, bool ignoreCase, out TEnum result) where TEnum : struct, Enum => #if NET6_0_OR_GREATER diff --git a/src/Polyfill/ExperimentalAttribute.cs b/src/Polyfill/ExperimentalAttribute.cs index a6ed4b36..caf5f433 100644 --- a/src/Polyfill/ExperimentalAttribute.cs +++ b/src/Polyfill/ExperimentalAttribute.cs @@ -34,7 +34,7 @@ namespace System.Diagnostics.CodeAnalysis; AttributeTargets.Delegate, Inherited = false)] [ExcludeFromCodeCoverage] [DebuggerNonUserCode] -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis.experimentalattribute")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis.experimentalattribute #if PolyPublic public #endif diff --git a/src/Polyfill/GuidPolyfill.cs b/src/Polyfill/GuidPolyfill.cs index 5de68b05..b253cd67 100644 --- a/src/Polyfill/GuidPolyfill.cs +++ b/src/Polyfill/GuidPolyfill.cs @@ -18,7 +18,7 @@ static class GuidPolyfill /// /// Tries to parse a string into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.guid.tryparse#system-guid-tryparse(system-string-system-iformatprovider-system-guid@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.guid.tryparse#system-guid-tryparse(system-string-system-iformatprovider-system-guid@) public static bool TryParse(string? target, IFormatProvider? provider, out Guid result) => #if NET7_0_OR_GREATER Guid.TryParse(target, provider, out result); @@ -31,7 +31,7 @@ public static bool TryParse(string? target, IFormatProvider? provider, out Guid /// /// Converts span of characters representing the GUID to the equivalent Guid structure, provided that the string is in the specified format. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.guid.tryparseexact#system-guid-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-guid@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.guid.tryparseexact#system-guid-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-guid@) public static bool TryParseExact(ReadOnlySpan target, ReadOnlySpan format, out Guid result) => #if NETFRAMEWORK || NETCOREAPP2_0 || NETSTANDARD2_0 Guid.TryParseExact(target.ToString(), format.ToString(), out result); @@ -42,7 +42,7 @@ public static bool TryParseExact(ReadOnlySpan target, ReadOnlySpan f /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.guid.tryparse#system-guid-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-guid@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.guid.tryparse#system-guid-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-guid@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out Guid result) => #if NET7_0_OR_GREATER Guid.TryParse(target, provider, out result); @@ -53,7 +53,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.guid.tryparse?view=net-8.0#system-guid-tryparse(system-readonlyspan((system-char))-system-guid@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.guid.tryparse?view=net-8.0#system-guid-tryparse(system-readonlyspan((system-char))-system-guid@) public static bool TryParse(ReadOnlySpan target, out Guid result) => #if NETSTANDARD2_1 || NETSTANDARD2_1_OR_GREATER || NET5_0_OR_GREATER Guid.TryParse(target, out result); diff --git a/src/Polyfill/Lock.cs b/src/Polyfill/Lock.cs index 78941d16..64bfcd99 100644 --- a/src/Polyfill/Lock.cs +++ b/src/Polyfill/Lock.cs @@ -22,7 +22,7 @@ namespace System.Threading; /// [ExcludeFromCodeCoverage] [DebuggerNonUserCode] -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.threading.lock")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.threading.lock #if PolyPublic public #endif diff --git a/src/Polyfill/ModuleInitializerAttribute.cs b/src/Polyfill/ModuleInitializerAttribute.cs index 659a7140..af8e7e7a 100644 --- a/src/Polyfill/ModuleInitializerAttribute.cs +++ b/src/Polyfill/ModuleInitializerAttribute.cs @@ -29,7 +29,7 @@ namespace System.Runtime.CompilerServices; /// The specification for module initializers in the .NET runtime can be found here: /// https://github.com/dotnet/runtime/blob/master/docs/design/specs/Ecma-335-Augments.md#module-initializer /// -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.moduleinitializerattribute")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.moduleinitializerattribute [ExcludeFromCodeCoverage] [DebuggerNonUserCode] [AttributeUsage( diff --git a/src/Polyfill/Nullability/NullabilityInfo.cs b/src/Polyfill/Nullability/NullabilityInfo.cs index 54badf17..8431f9ff 100644 --- a/src/Polyfill/Nullability/NullabilityInfo.cs +++ b/src/Polyfill/Nullability/NullabilityInfo.cs @@ -19,7 +19,7 @@ namespace System.Reflection; /// [DebuggerNonUserCode] [ExcludeFromCodeCoverage] -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.reflection.nullabilityinfo?view=net-8.0")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.reflection.nullabilityinfo?view=net-8.0 #if PolyPublic public #endif diff --git a/src/Polyfill/Numbers/BytePolyfill.cs b/src/Polyfill/Numbers/BytePolyfill.cs index a5220dfa..ce4bc860 100644 --- a/src/Polyfill/Numbers/BytePolyfill.cs +++ b/src/Polyfill/Numbers/BytePolyfill.cs @@ -21,7 +21,7 @@ static class BytePolyfill /// /// Tries to parse a string into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.byte.tryparse#system-byte-tryparse(system-string-system-iformatprovider-system-byte@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.byte.tryparse#system-byte-tryparse(system-string-system-iformatprovider-system-byte@) public static bool TryParse(string? target, IFormatProvider? provider, out byte result) => #if NET7_0_OR_GREATER byte.TryParse(target, provider, out result); @@ -33,7 +33,7 @@ public static bool TryParse(string? target, IFormatProvider? provider, out byte /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.byte.tryparse#system-byte-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-byte@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.byte.tryparse#system-byte-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-byte@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out byte result) => #if NET8_0_OR_GREATER byte.TryParse(target, provider, out result); @@ -44,7 +44,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Converts the span representation of a number in a specified style and culture-specific format to its byte equivalent. A return value indicates whether the conversion succeeded. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.byte.tryparse#system-byte-tryparse(system-readonlyspan((system-char))-system-byte@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.byte.tryparse#system-byte-tryparse(system-readonlyspan((system-char))-system-byte@) public static bool TryParse(ReadOnlySpan target, out byte result) => #if NETCOREAPP2_0 || NETFRAMEWORK || NETSTANDARD2_0 byte.TryParse(target.ToString(), out result); @@ -55,7 +55,7 @@ public static bool TryParse(ReadOnlySpan target, out byte result) => /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.byte.tryparse#system-byte-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-byte@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.byte.tryparse#system-byte-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-byte@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out byte result) => #if NET7_0_OR_GREATER byte.TryParse(target, provider, out result); @@ -66,7 +66,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.byte.tryparse#system-byte-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-byte@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.byte.tryparse#system-byte-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-byte@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out byte result) => #if NET8_0_OR_GREATER byte.TryParse(target, style, provider, out result); @@ -77,7 +77,7 @@ public static bool TryParse(ReadOnlySpan target, NumberStyles style, IForm /// /// Tries to convert a UTF-8 character span containing the string representation of a number to its byte equivalent. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.byte.tryparse#system-byte-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-byte@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.byte.tryparse#system-byte-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-byte@) public static bool TryParse(ReadOnlySpan target, out byte result) => #if NET8_0_OR_GREATER byte.TryParse(target, out result); @@ -88,7 +88,7 @@ public static bool TryParse(ReadOnlySpan target, out byte result) => /// /// Converts the span representation of a number in a specified style and culture-specific format to its byte equivalent. A return value indicates whether the conversion succeeded. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.byte.tryparse#system-byte-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-byte@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.byte.tryparse#system-byte-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-byte@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out byte result) => #if NETCOREAPP2_0 || NETSTANDARD2_0 || NETFRAMEWORK byte.TryParse(target.ToString(), style, provider, out result); diff --git a/src/Polyfill/Numbers/DoublePolyfill.cs b/src/Polyfill/Numbers/DoublePolyfill.cs index fb3d9443..64d89071 100644 --- a/src/Polyfill/Numbers/DoublePolyfill.cs +++ b/src/Polyfill/Numbers/DoublePolyfill.cs @@ -20,7 +20,7 @@ static class DoublePolyfill /// /// Tries to parse a string into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.double.tryparse#system-double-tryparse(system-string-system-iformatprovider-system-double@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.double.tryparse#system-double-tryparse(system-string-system-iformatprovider-system-double@) public static bool TryParse(string? target, IFormatProvider? provider, out double result) => #if NET7_0_OR_GREATER double.TryParse(target, provider, out result); @@ -32,7 +32,7 @@ public static bool TryParse(string? target, IFormatProvider? provider, out doubl /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.double.tryparse#system-double-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-double@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.double.tryparse#system-double-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-double@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out double result) => #if NET8_0_OR_GREATER double.TryParse(target, provider, out result); @@ -43,7 +43,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Converts the span representation of a number in a specified style and culture-specific format to its double-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.double.tryparse#system-double-tryparse(system-readonlyspan((system-char))-system-double@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.double.tryparse#system-double-tryparse(system-readonlyspan((system-char))-system-double@) public static bool TryParse(ReadOnlySpan target, out double result) => #if NETCOREAPP2_0 || NETFRAMEWORK || NETSTANDARD2_0 double.TryParse(target.ToString(), out result); @@ -54,7 +54,7 @@ public static bool TryParse(ReadOnlySpan target, out double result) => /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.double.tryparse#system-double-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-double@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.double.tryparse#system-double-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-double@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out double result) => #if NET7_0_OR_GREATER double.TryParse(target, provider, out result); @@ -65,7 +65,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.double.tryparse#system-double-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-double@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.double.tryparse#system-double-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-double@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out double result) => #if NET8_0_OR_GREATER double.TryParse(target, style, provider, out result); @@ -76,7 +76,7 @@ public static bool TryParse(ReadOnlySpan target, NumberStyles style, IForm /// /// Tries to convert a UTF-8 character span containing the string representation of a number to its double-precision floating-point number equivalent.. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.double.tryparse#system-double-tryparse(system-readonlyspan((system-byte))-system-double@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.double.tryparse#system-double-tryparse(system-readonlyspan((system-byte))-system-double@) public static bool TryParse(ReadOnlySpan target, out double result) => #if NET8_0_OR_GREATER double.TryParse(target, out result); @@ -87,7 +87,7 @@ public static bool TryParse(ReadOnlySpan target, out double result) => /// /// Converts the string representation of a number in a specified style and culture-specific format to its double-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.double.tryparse#system-double-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-double@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.double.tryparse#system-double-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-double@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out double result) => #if NETCOREAPP2_0 || NETSTANDARD2_0 || NETFRAMEWORK double.TryParse(target.ToString(), style, provider, out result); diff --git a/src/Polyfill/Numbers/IntPolyfill.cs b/src/Polyfill/Numbers/IntPolyfill.cs index 173649dd..593310f4 100644 --- a/src/Polyfill/Numbers/IntPolyfill.cs +++ b/src/Polyfill/Numbers/IntPolyfill.cs @@ -20,7 +20,7 @@ static class IntPolyfill /// /// Tries to parse a string into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryparse#system-int32-tryparse(system-string-system-iformatprovider-system-int32@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryparse#system-int32-tryparse(system-string-system-iformatprovider-system-int32@) public static bool TryParse(string? target, IFormatProvider? provider, out int result) => #if NET7_0_OR_GREATER int.TryParse(target, provider, out result); @@ -32,7 +32,7 @@ public static bool TryParse(string? target, IFormatProvider? provider, out int r /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryparse#system-int32-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-int32@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryparse#system-int32-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-int32@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out int result) => #if NET8_0_OR_GREATER int.TryParse(target, provider, out result); @@ -43,7 +43,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Converts the span representation of a number in a specified style and culture-specific format to its 32-bit signed integer equivalent. A return value indicates whether the conversion succeeded. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryparse#system-int32-tryparse(system-readonlyspan((system-char))-system-int32@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryparse#system-int32-tryparse(system-readonlyspan((system-char))-system-int32@) public static bool TryParse(ReadOnlySpan target, out int result) => #if NETCOREAPP2_0 || NETFRAMEWORK || NETSTANDARD2_0 int.TryParse(target.ToString(), out result); @@ -54,7 +54,7 @@ public static bool TryParse(ReadOnlySpan target, out int result) => /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryparse#system-int32-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-int32@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryparse#system-int32-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-int32@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out int result) => #if NET7_0_OR_GREATER int.TryParse(target, provider, out result); @@ -65,7 +65,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryparse#system-int32-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-int32@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryparse#system-int32-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-int32@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out int result) => #if NET8_0_OR_GREATER int.TryParse(target, style, provider, out result); @@ -76,7 +76,7 @@ public static bool TryParse(ReadOnlySpan target, NumberStyles style, IForm /// /// Tries to convert a UTF-8 character span containing the string representation of a number to its 32-bit signed integer equivalent. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryparse#system-int32-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-int32@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryparse#system-int32-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-int32@) public static bool TryParse(ReadOnlySpan target, out int result) => #if NET8_0_OR_GREATER int.TryParse(target, out result); @@ -87,7 +87,7 @@ public static bool TryParse(ReadOnlySpan target, out int result) => /// /// Converts the span representation of a number in a specified style and culture-specific format to its 32-bit signed integer equivalent. A return value indicates whether the conversion succeeded. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryparse#system-int32-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-int32@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryparse#system-int32-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-int32@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out int result) => #if NETCOREAPP2_0 || NETSTANDARD2_0 || NETFRAMEWORK int.TryParse(target.ToString(), style, provider, out result); diff --git a/src/Polyfill/Numbers/LongPolyfill.cs b/src/Polyfill/Numbers/LongPolyfill.cs index 14e7659b..5a795f95 100644 --- a/src/Polyfill/Numbers/LongPolyfill.cs +++ b/src/Polyfill/Numbers/LongPolyfill.cs @@ -20,7 +20,7 @@ static class LongPolyfill /// /// Tries to parse a string into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int64.tryparse#system-int64-tryparse(system-string-system-iformatprovider-system-int64@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int64.tryparse#system-int64-tryparse(system-string-system-iformatprovider-system-int64@) public static bool TryParse(string? target, IFormatProvider? provider, out int result) => #if NET7_0_OR_GREATER int.TryParse(target, provider, out result); @@ -32,7 +32,7 @@ public static bool TryParse(string? target, IFormatProvider? provider, out int r /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int64.tryparse#system-int64-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-int64@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int64.tryparse#system-int64-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-int64@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out int result) => #if NET8_0_OR_GREATER int.TryParse(target, provider, out result); @@ -43,7 +43,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Converts the span representation of a number in a specified style and culture-specific format to its 32-bit signed integer equivalent. A return value indicates whether the conversion succeeded. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int64.tryparse#system-int64-tryparse(system-readonlyspan((system-char))-system-int64@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int64.tryparse#system-int64-tryparse(system-readonlyspan((system-char))-system-int64@) public static bool TryParse(ReadOnlySpan target, out int result) => #if NETCOREAPP2_0 || NETFRAMEWORK || NETSTANDARD2_0 int.TryParse(target.ToString(), out result); @@ -54,7 +54,7 @@ public static bool TryParse(ReadOnlySpan target, out int result) => /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int64.tryparse#system-int64-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-int64@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int64.tryparse#system-int64-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-int64@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out int result) => #if NET7_0_OR_GREATER int.TryParse(target, provider, out result); @@ -65,7 +65,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int64.tryparse#system-int64-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-int64@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int64.tryparse#system-int64-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-int64@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out int result) => #if NET8_0_OR_GREATER int.TryParse(target, style, provider, out result); @@ -76,7 +76,7 @@ public static bool TryParse(ReadOnlySpan target, NumberStyles style, IForm /// /// Tries to convert a UTF-8 character span containing the string representation of a number to its 64-bit signed integer equivalent. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int64.tryparse#system-int64-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-int64@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int64.tryparse#system-int64-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-int64@) public static bool TryParse(ReadOnlySpan target, out int result) => #if NET8_0_OR_GREATER int.TryParse(target, out result); @@ -87,7 +87,7 @@ public static bool TryParse(ReadOnlySpan target, out int result) => /// /// Converts the span representation of a number in a specified style and culture-specific format to its 64-bit signed integer equivalent. A return value indicates whether the conversion succeeded. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int64.tryparse#system-int64-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-int64@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int64.tryparse#system-int64-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-int64@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out int result) => #if NETCOREAPP2_0 || NETSTANDARD2_0 || NETFRAMEWORK int.TryParse(target.ToString(), style, provider, out result); diff --git a/src/Polyfill/Numbers/SBytePolyfill.cs b/src/Polyfill/Numbers/SBytePolyfill.cs index a3d0a709..751f5ab0 100644 --- a/src/Polyfill/Numbers/SBytePolyfill.cs +++ b/src/Polyfill/Numbers/SBytePolyfill.cs @@ -20,7 +20,7 @@ static class SBytePolyfill /// /// Tries to parse a string into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.tryparse#system-sbyte-tryparse(system-string-system-iformatprovider-system-sbyte@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.tryparse#system-sbyte-tryparse(system-string-system-iformatprovider-system-sbyte@) public static bool TryParse(string? target, IFormatProvider? provider, out sbyte result) => #if NET7_0_OR_GREATER sbyte.TryParse(target, provider, out result); @@ -32,7 +32,7 @@ public static bool TryParse(string? target, IFormatProvider? provider, out sbyte /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.tryparse#system-sbyte-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-sbyte@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.tryparse#system-sbyte-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-sbyte@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out sbyte result) => #if NET8_0_OR_GREATER sbyte.TryParse(target, provider, out result); @@ -43,7 +43,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Converts the span representation of a number in a specified style and culture-specific format to its sbyte equivalent. A return value indicates whether the conversion succeeded. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.tryparse#system-sbyte-tryparse(system-readonlyspan((system-char))-system-sbyte@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.tryparse#system-sbyte-tryparse(system-readonlyspan((system-char))-system-sbyte@) public static bool TryParse(ReadOnlySpan target, out sbyte result) => #if NETCOREAPP2_0 || NETFRAMEWORK || NETSTANDARD2_0 sbyte.TryParse(target.ToString(), out result); @@ -54,7 +54,7 @@ public static bool TryParse(ReadOnlySpan target, out sbyte result) => /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.tryparse#system-sbyte-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-sbyte@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.tryparse#system-sbyte-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-sbyte@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out sbyte result) => #if NET7_0_OR_GREATER sbyte.TryParse(target, provider, out result); @@ -65,7 +65,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.tryparse#system-sbyte-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-sbyte@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.tryparse#system-sbyte-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-sbyte@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out sbyte result) => #if NET8_0_OR_GREATER sbyte.TryParse(target, style, provider, out result); @@ -76,7 +76,7 @@ public static bool TryParse(ReadOnlySpan target, NumberStyles style, IForm /// /// Tries to convert a UTF-8 character span containing the string representation of a number to its sbyte equivalent. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.tryparse#system-sbyte-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-sbyte@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.tryparse#system-sbyte-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-sbyte@) public static bool TryParse(ReadOnlySpan target, out sbyte result) => #if NET8_0_OR_GREATER sbyte.TryParse(target, out result); @@ -87,7 +87,7 @@ public static bool TryParse(ReadOnlySpan target, out sbyte result) => /// /// Converts the span representation of a number in a specified style and culture-specific format to its sbyte equivalent. A return value indicates whether the conversion succeeded. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.tryparse#system-sbyte-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-sbyte@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.tryparse#system-sbyte-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-sbyte@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out sbyte result) => #if NETCOREAPP2_0 || NETSTANDARD2_0 || NETFRAMEWORK sbyte.TryParse(target.ToString(), style, provider, out result); diff --git a/src/Polyfill/Numbers/ShortPolyfill.cs b/src/Polyfill/Numbers/ShortPolyfill.cs index 59b1f450..1fdca5c3 100644 --- a/src/Polyfill/Numbers/ShortPolyfill.cs +++ b/src/Polyfill/Numbers/ShortPolyfill.cs @@ -20,7 +20,7 @@ static class ShortPolyfill /// /// Tries to parse a string into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int16.tryparse#system-int16-tryparse(system-string-system-iformatprovider-system-int16@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int16.tryparse#system-int16-tryparse(system-string-system-iformatprovider-system-int16@) public static bool TryParse(string? target, IFormatProvider? provider, out short result) => #if NET7_0_OR_GREATER short.TryParse(target, provider, out result); @@ -32,7 +32,7 @@ public static bool TryParse(string? target, IFormatProvider? provider, out short /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int16.tryparse#system-int16-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-int16@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int16.tryparse#system-int16-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-int16@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out short result) => #if NET8_0_OR_GREATER short.TryParse(target, provider, out result); @@ -43,7 +43,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Converts the span representation of a number in a specified style and culture-specific format to its short equivalent. A return value indicates whether the conversion succeeded. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int16.tryparse#system-int16-tryparse(system-readonlyspan((system-char))-system-int16@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int16.tryparse#system-int16-tryparse(system-readonlyspan((system-char))-system-int16@) public static bool TryParse(ReadOnlySpan target, out short result) => #if NETCOREAPP2_0 || NETFRAMEWORK || NETSTANDARD2_0 short.TryParse(target.ToString(), out result); @@ -54,7 +54,7 @@ public static bool TryParse(ReadOnlySpan target, out short result) => /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int16.tryparse#system-int16-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-int16@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int16.tryparse#system-int16-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-int16@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out short result) => #if NET7_0_OR_GREATER short.TryParse(target, provider, out result); @@ -65,7 +65,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int16.tryparse#system-int16-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-int16@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int16.tryparse#system-int16-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-int16@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out short result) => #if NET8_0_OR_GREATER short.TryParse(target, style, provider, out result); @@ -76,7 +76,7 @@ public static bool TryParse(ReadOnlySpan target, NumberStyles style, IForm /// /// Tries to convert a UTF-8 character span containing the string representation of a number to its short equivalent. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int16.tryparse#system-int16-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-int16@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int16.tryparse#system-int16-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-int16@) public static bool TryParse(ReadOnlySpan target, out short result) => #if NET8_0_OR_GREATER short.TryParse(target, out result); @@ -87,7 +87,7 @@ public static bool TryParse(ReadOnlySpan target, out short result) => /// /// Converts the span representation of a number in a specified style and culture-specific format to its short equivalent. A return value indicates whether the conversion succeeded. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int16.tryparse#system-int16-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-int16@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int16.tryparse#system-int16-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-int16@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out short result) => #if NETCOREAPP2_0 || NETSTANDARD2_0 || NETFRAMEWORK short.TryParse(target.ToString(), style, provider, out result); diff --git a/src/Polyfill/Numbers/UIntPolyfill.cs b/src/Polyfill/Numbers/UIntPolyfill.cs index d670c494..5d4b8c2d 100644 --- a/src/Polyfill/Numbers/UIntPolyfill.cs +++ b/src/Polyfill/Numbers/UIntPolyfill.cs @@ -20,7 +20,7 @@ static class UIntPolyfill /// /// Tries to parse a string into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse#system-uint32-tryparse(system-string-system-iformatprovider-system-uint32@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse#system-uint32-tryparse(system-string-system-iformatprovider-system-uint32@) public static bool TryParse(string? target, IFormatProvider? provider, out uint result) => #if NET7_0_OR_GREATER uint.TryParse(target, provider, out result); @@ -32,7 +32,7 @@ public static bool TryParse(string? target, IFormatProvider? provider, out uint /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse#system-uint32-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-uint32@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse#system-uint32-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-uint32@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out uint result) => #if NET8_0_OR_GREATER uint.TryParse(target, provider, out result); @@ -43,7 +43,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Converts the span representation of a number in a specified style and culture-specific format to its uint equivalent. A return value indicates whether the conversion succeeded. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse#system-uint32-tryparse(system-readonlyspan((system-char))-system-uint32@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse#system-uint32-tryparse(system-readonlyspan((system-char))-system-uint32@) public static bool TryParse(ReadOnlySpan target, out uint result) => #if NETCOREAPP2_0 || NETFRAMEWORK || NETSTANDARD2_0 uint.TryParse(target.ToString(), out result); @@ -54,7 +54,7 @@ public static bool TryParse(ReadOnlySpan target, out uint result) => /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse#system-uint32-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-uint32@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse#system-uint32-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-uint32@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out uint result) => #if NET7_0_OR_GREATER uint.TryParse(target, provider, out result); @@ -65,7 +65,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse#system-uint32-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-uint32@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse#system-uint32-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-uint32@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out uint result) => #if NET8_0_OR_GREATER uint.TryParse(target, style, provider, out result); @@ -76,7 +76,7 @@ public static bool TryParse(ReadOnlySpan target, NumberStyles style, IForm /// /// Tries to convert a UTF-8 character span containing the string representation of a number to its uint equivalent. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse#system-uint32-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-uint32@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse#system-uint32-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-uint32@) public static bool TryParse(ReadOnlySpan target, out uint result) => #if NET8_0_OR_GREATER uint.TryParse(target, out result); @@ -87,7 +87,7 @@ public static bool TryParse(ReadOnlySpan target, out uint result) => /// /// Converts the span representation of a number in a specified style and culture-specific format to its uint equivalent. A return value indicates whether the conversion succeeded. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse#system-uint32-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-uint32@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse#system-uint32-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-uint32@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out uint result) => #if NETCOREAPP2_0 || NETSTANDARD2_0 || NETFRAMEWORK uint.TryParse(target.ToString(), style, provider, out result); diff --git a/src/Polyfill/Numbers/ULongPolyfill.cs b/src/Polyfill/Numbers/ULongPolyfill.cs index 62f80e9b..b50de7d2 100644 --- a/src/Polyfill/Numbers/ULongPolyfill.cs +++ b/src/Polyfill/Numbers/ULongPolyfill.cs @@ -20,7 +20,7 @@ static class ULongPolyfill /// /// Tries to parse a string into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse#system-uint64-tryparse(system-string-system-iformatprovider-system-uint64@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse#system-uint64-tryparse(system-string-system-iformatprovider-system-uint64@) public static bool TryParse(string? target, IFormatProvider? provider, out ulong result) => #if NET7_0_OR_GREATER ulong.TryParse(target, provider, out result); @@ -32,7 +32,7 @@ public static bool TryParse(string? target, IFormatProvider? provider, out ulong /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse#system-uint64-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-uint64@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse#system-uint64-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-uint64@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out ulong result) => #if NET8_0_OR_GREATER ulong.TryParse(target, provider, out result); @@ -43,7 +43,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Converts the span representation of a number in a specified style and culture-specific format to its ulong equivalent. A return value indicates whether the conversion succeeded. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse#system-uint64-tryparse(system-readonlyspan((system-char))-system-uint64@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse#system-uint64-tryparse(system-readonlyspan((system-char))-system-uint64@) public static bool TryParse(ReadOnlySpan target, out ulong result) => #if NETCOREAPP2_0 || NETFRAMEWORK || NETSTANDARD2_0 ulong.TryParse(target.ToString(), out result); @@ -54,7 +54,7 @@ public static bool TryParse(ReadOnlySpan target, out ulong result) => /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse#system-uint64-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-uint64@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse#system-uint64-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-uint64@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out ulong result) => #if NET7_0_OR_GREATER ulong.TryParse(target, provider, out result); @@ -65,7 +65,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse#system-uint64-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-uint64@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse#system-uint64-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-uint64@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out ulong result) => #if NET8_0_OR_GREATER ulong.TryParse(target, style, provider, out result); @@ -76,7 +76,7 @@ public static bool TryParse(ReadOnlySpan target, NumberStyles style, IForm /// /// Tries to convert a UTF-8 character span containing the string representation of a number to its ulong equivalent. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse#system-uint64-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-uint64@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse#system-uint64-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-uint64@) public static bool TryParse(ReadOnlySpan target, out ulong result) => #if NET8_0_OR_GREATER ulong.TryParse(target, out result); @@ -87,7 +87,7 @@ public static bool TryParse(ReadOnlySpan target, out ulong result) => /// /// Converts the span representation of a number in a specified style and culture-specific format to its ulong equivalent. A return value indicates whether the conversion succeeded. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse#system-uint64-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-uint64@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse#system-uint64-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-uint64@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out ulong result) => #if NETCOREAPP2_0 || NETSTANDARD2_0 || NETFRAMEWORK ulong.TryParse(target.ToString(), style, provider, out result); diff --git a/src/Polyfill/Numbers/UShortPolyfill.cs b/src/Polyfill/Numbers/UShortPolyfill.cs index 7f8aaf15..9ac0daf4 100644 --- a/src/Polyfill/Numbers/UShortPolyfill.cs +++ b/src/Polyfill/Numbers/UShortPolyfill.cs @@ -20,7 +20,7 @@ static class UShortPolyfill /// /// Tries to parse a string into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint16.tryparse#system-uint16-tryparse(system-string-system-iformatprovider-system-uint16@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint16.tryparse#system-uint16-tryparse(system-string-system-iformatprovider-system-uint16@) public static bool TryParse(string? target, IFormatProvider? provider, out ushort result) => #if !NET7_0_OR_GREATER ushort.TryParse(target, NumberStyles.Integer, provider, out result); @@ -32,7 +32,7 @@ public static bool TryParse(string? target, IFormatProvider? provider, out ushor /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint16.tryparse#system-uint16-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-uint16@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint16.tryparse#system-uint16-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-uint16@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out ushort result) => #if NET8_0_OR_GREATER ushort.TryParse(target, provider, out result); @@ -43,7 +43,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Converts the span representation of a number in a specified style and culture-specific format to its ushort equivalent. A return value indicates whether the conversion succeeded. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint16.tryparse#system-uint16-tryparse(system-readonlyspan((system-char))-system-uint16@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint16.tryparse#system-uint16-tryparse(system-readonlyspan((system-char))-system-uint16@) public static bool TryParse(ReadOnlySpan target, out ushort result) => #if NETCOREAPP2_0 || NETFRAMEWORK || NETSTANDARD2_0 ushort.TryParse(target.ToString(), out result); @@ -54,7 +54,7 @@ public static bool TryParse(ReadOnlySpan target, out ushort result) => /// /// Tries to parse a span of characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint16.tryparse#system-uint16-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-uint16@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint16.tryparse#system-uint16-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-uint16@) public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider, out ushort result) => #if NET7_0_OR_GREATER ushort.TryParse(target, provider, out result); @@ -65,7 +65,7 @@ public static bool TryParse(ReadOnlySpan target, IFormatProvider? provider /// /// Tries to parse a span of UTF-8 characters into a value. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint16.tryparse#system-uint16-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-uint16@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint16.tryparse#system-uint16-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-uint16@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out ushort result) => #if NET8_0_OR_GREATER ushort.TryParse(target, style, provider, out result); @@ -76,7 +76,7 @@ public static bool TryParse(ReadOnlySpan target, NumberStyles style, IForm /// /// Tries to convert a UTF-8 character span containing the string representation of a number to its ushort equivalent. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint16.tryparse#system-uint16-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-uint16@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint16.tryparse#system-uint16-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-uint16@) public static bool TryParse(ReadOnlySpan target, out ushort result) => #if NET8_0_OR_GREATER ushort.TryParse(target, out result); @@ -87,7 +87,7 @@ public static bool TryParse(ReadOnlySpan target, out ushort result) => /// /// Converts the span representation of a number in a specified style and culture-specific format to its ushort equivalent. A return value indicates whether the conversion succeeded. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint16.tryparse#system-uint16-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-uint16@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint16.tryparse#system-uint16-tryparse(system-readonlyspan((system-char))-system-globalization-numberstyles-system-iformatprovider-system-uint16@) public static bool TryParse(ReadOnlySpan target, NumberStyles style, IFormatProvider? provider, out ushort result) => #if NETCOREAPP2_0 || NETSTANDARD2_0 || NETFRAMEWORK ushort.TryParse(target.ToString(), style, provider, out result); diff --git a/src/Polyfill/OverloadResolutionPriorityAttribute.cs b/src/Polyfill/OverloadResolutionPriorityAttribute.cs index 66bdfba2..dbc2dfa4 100644 --- a/src/Polyfill/OverloadResolutionPriorityAttribute.cs +++ b/src/Polyfill/OverloadResolutionPriorityAttribute.cs @@ -19,7 +19,7 @@ namespace System.Runtime.CompilerServices; AttributeTargets.Constructor | AttributeTargets.Property, Inherited = false)] -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.overloadresolutionpriorityattribute")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.overloadresolutionpriorityattribute #if PolyPublic public #endif diff --git a/src/Polyfill/Polyfill_CancellationToken.cs b/src/Polyfill/Polyfill_CancellationToken.cs index aa0a7e6e..49df4ac1 100644 --- a/src/Polyfill/Polyfill_CancellationToken.cs +++ b/src/Polyfill/Polyfill_CancellationToken.cs @@ -32,7 +32,7 @@ static partial class Polyfill /// The instance that can /// be used to unregister the callback. /// is null. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken.unsaferegister#system-threading-cancellationtoken-unsaferegister(system-action((system-object))-system-object)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken.unsaferegister#system-threading-cancellationtoken-unsaferegister(system-action((system-object))-system-object) public static CancellationTokenRegistration UnsafeRegister(this CancellationToken target, Action callback, object? state) { if (callback is null) @@ -79,7 +79,7 @@ public static CancellationTokenRegistration UnsafeRegister(this CancellationToke /// The state to pass to the when the delegate is invoked. This may be null. /// The instance that can be used to unregister the callback. /// is null. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken.register#system-threading-cancellationtoken-register(system-action((system-object-system-threading-cancellationtoken))-system-object)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken.register#system-threading-cancellationtoken-register(system-action((system-object-system-threading-cancellationtoken))-system-object) public static CancellationTokenRegistration Register(this CancellationToken target, Action callback, object? state) { if (callback is null) @@ -99,7 +99,7 @@ public static CancellationTokenRegistration Register(this CancellationToken targ /// The state to pass to the when the delegate is invoked. This may be null. /// The instance that can be used to unregister the callback. /// is null. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken.unsaferegister#system-threading-cancellationtoken-unsaferegister(system-action((system-object-system-threading-cancellationtoken))-system-object)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken.unsaferegister#system-threading-cancellationtoken-unsaferegister(system-action((system-object-system-threading-cancellationtoken))-system-object) public static CancellationTokenRegistration UnsafeRegister(this CancellationToken target, Action callback, object? state) { if (callback is null) diff --git a/src/Polyfill/Polyfill_CancellationTokenSource.cs b/src/Polyfill/Polyfill_CancellationTokenSource.cs index 4e477a61..075fe39d 100644 --- a/src/Polyfill/Polyfill_CancellationTokenSource.cs +++ b/src/Polyfill/Polyfill_CancellationTokenSource.cs @@ -32,7 +32,7 @@ static partial class Polyfill /// /// /// This has been disposed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtokensource.cancelasync")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtokensource.cancelasync public static Task CancelAsync(this CancellationTokenSource target) { if (target.IsCancellationRequested) diff --git a/src/Polyfill/Polyfill_ConcurrentBag.cs b/src/Polyfill/Polyfill_ConcurrentBag.cs index ec748079..7b7d4c9e 100644 --- a/src/Polyfill/Polyfill_ConcurrentBag.cs +++ b/src/Polyfill/Polyfill_ConcurrentBag.cs @@ -14,7 +14,7 @@ static partial class Polyfill /// /// Removes all values from the . /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.collections.concurrent.concurrentbag-1.clear")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.collections.concurrent.concurrentbag-1.clear public static void Clear(this ConcurrentBag target) { while (!target.IsEmpty) diff --git a/src/Polyfill/Polyfill_ConcurrentDictionary.cs b/src/Polyfill/Polyfill_ConcurrentDictionary.cs index 4c6c7008..22e519e7 100644 --- a/src/Polyfill/Polyfill_ConcurrentDictionary.cs +++ b/src/Polyfill/Polyfill_ConcurrentDictionary.cs @@ -28,7 +28,7 @@ static partial class Polyfill /// The value for the key. This will be either the existing value for the key if the /// key is already in the dictionary, or the new value for the key as returned by valueFactory /// if the key was not in the dictionary. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.collections.concurrent.concurrentdictionary-2.getoradd#system-collections-concurrent-concurrentdictionary-2-getoradd-1(-0-system-func((-0-0-1))-0)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.collections.concurrent.concurrentdictionary-2.getoradd#system-collections-concurrent-concurrentdictionary-2-getoradd-1(-0-system-func((-0-0-1))-0) public static TValue GetOrAdd(this ConcurrentDictionary target, TKey key, Func valueFactory, TArg factoryArgument) where TKey : notnull { diff --git a/src/Polyfill/Polyfill_ConcurrentQueue.cs b/src/Polyfill/Polyfill_ConcurrentQueue.cs index 6916a13c..f7479efe 100644 --- a/src/Polyfill/Polyfill_ConcurrentQueue.cs +++ b/src/Polyfill/Polyfill_ConcurrentQueue.cs @@ -14,7 +14,7 @@ static partial class Polyfill /// /// Removes all values from the . /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.collections.concurrent.concurrentqueue-1.clear")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.collections.concurrent.concurrentqueue-1.clear public static void Clear(this ConcurrentQueue target) { while (target.TryDequeue(out _)); diff --git a/src/Polyfill/Polyfill_Dictionary.cs b/src/Polyfill/Polyfill_Dictionary.cs index 8de17959..85588939 100644 --- a/src/Polyfill/Polyfill_Dictionary.cs +++ b/src/Polyfill/Polyfill_Dictionary.cs @@ -20,7 +20,7 @@ static partial class Polyfill /// The dictionary to wrap. /// An object that acts as a read-only wrapper around the current . /// is null. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.asreadonly#system-collections-generic-collectionextensions-asreadonly-2(system-collections-generic-idictionary((-0-1)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.asreadonly#system-collections-generic-collectionextensions-asreadonly-2(system-collections-generic-idictionary((-0-1))) public static ReadOnlyDictionary AsReadOnly(this IDictionary target) where TKey : notnull => new(target); @@ -35,7 +35,7 @@ public static ReadOnlyDictionary AsReadOnly(this IDi /// The value of the element to add. It can be . /// true if the key/value pair was added to the dictionary successfully; otherwise, false. /// is . - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2.tryadd")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2.tryadd public static bool TryAdd(this Dictionary target, TKey key, TValue value) where TKey : notnull { @@ -68,7 +68,7 @@ public static bool TryAdd(this Dictionary target, TK /// The type of the values in the dictionary. /// true if the element is successfully found and removed; otherwise, false. /// is null. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2.remove")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2.remove public static bool Remove( this Dictionary target, TKey key, diff --git a/src/Polyfill/Polyfill_HashSet.cs b/src/Polyfill/Polyfill_HashSet.cs index 458b727b..a3a8a70c 100644 --- a/src/Polyfill/Polyfill_HashSet.cs +++ b/src/Polyfill/Polyfill_HashSet.cs @@ -17,7 +17,7 @@ static partial class Polyfill /// The value to search for. /// The value from the set that the search found, or the default value of T when the search yielded no match. /// A value indicating whether the search was successful. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1.trygetvalue")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1.trygetvalue public static bool TryGetValue( this HashSet target, T equalValue, diff --git a/src/Polyfill/Polyfill_HttpClient.cs b/src/Polyfill/Polyfill_HttpClient.cs index 1705b3e8..bc641e12 100644 --- a/src/Polyfill/Polyfill_HttpClient.cs +++ b/src/Polyfill/Polyfill_HttpClient.cs @@ -24,7 +24,7 @@ static partial class Polyfill /// The Uri the request is sent to. /// The cancellation token to cancel the operation. /// The task object representing the asynchronous operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.getstreamasync#system-net-http-httpclient-getstreamasync(system-string-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.getstreamasync#system-net-http-httpclient-getstreamasync(system-string-system-threading-cancellationtoken) public static async Task GetStreamAsync( this HttpClient target, string requestUri, @@ -62,7 +62,7 @@ public static async Task GetStreamAsync( /// The Uri the request is sent to. /// The cancellation token to cancel the operation. /// The task object representing the asynchronous operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.getstreamasync#system-net-http-httpclient-getstreamasync(system-uri-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.getstreamasync#system-net-http-httpclient-getstreamasync(system-uri-system-threading-cancellationtoken) public static Task GetStreamAsync( this HttpClient target, Uri requestUri, @@ -79,7 +79,7 @@ public static Task GetStreamAsync( /// The Uri the request is sent to. /// The cancellation token to cancel the operation. /// The task object representing the asynchronous operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.getbytearrayasync#system-net-http-httpclient-getbytearrayasync(system-string-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.getbytearrayasync#system-net-http-httpclient-getbytearrayasync(system-string-system-threading-cancellationtoken) public static async Task GetByteArrayAsync( this HttpClient target, string requestUri, @@ -118,7 +118,7 @@ public static async Task GetByteArrayAsync( /// The Uri the request is sent to. /// The cancellation token to cancel the operation. /// The task object representing the asynchronous operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.getbytearrayasync#system-net-http-httpclient-getbytearrayasync(system-uri-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.getbytearrayasync#system-net-http-httpclient-getbytearrayasync(system-uri-system-threading-cancellationtoken) public static Task GetByteArrayAsync( this HttpClient target, Uri requestUri, @@ -135,7 +135,7 @@ public static Task GetByteArrayAsync( /// The Uri the request is sent to. /// The cancellation token to cancel the operation. /// The task object representing the asynchronous operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.getstringasync#system-net-http-httpclient-getstringasync(system-string-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.getstringasync#system-net-http-httpclient-getstringasync(system-string-system-threading-cancellationtoken) public static async Task GetStringAsync( this HttpClient target, string requestUri, @@ -174,7 +174,7 @@ public static async Task GetStringAsync( /// The Uri the request is sent to. /// The cancellation token to cancel the operation. /// The task object representing the asynchronous operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.getstringasync#system-net-http-httpclient-getstringasync(system-uri-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.getstringasync#system-net-http-httpclient-getstringasync(system-uri-system-threading-cancellationtoken) public static Task GetStringAsync( this HttpClient target, Uri requestUri, diff --git a/src/Polyfill/Polyfill_HttpContent.cs b/src/Polyfill/Polyfill_HttpContent.cs index a301a477..9a2d3634 100644 --- a/src/Polyfill/Polyfill_HttpContent.cs +++ b/src/Polyfill/Polyfill_HttpContent.cs @@ -24,7 +24,7 @@ static partial class Polyfill /// The token to monitor for cancellation requests. The default value is . /// /// The task object representing the asynchronous operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpcontent.readasstreamasync#system-net-http-httpcontent-readasstreamasync(system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpcontent.readasstreamasync#system-net-http-httpcontent-readasstreamasync(system-threading-cancellationtoken) public static Task ReadAsStreamAsync( this HttpContent target, CancellationToken cancellationToken = default) @@ -45,7 +45,7 @@ public static Task ReadAsStreamAsync( /// The token to monitor for cancellation requests. The default value is . /// /// The task object representing the asynchronous operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpcontent.readasbytearrayasync#system-net-http-httpcontent-readasbytearrayasync(system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpcontent.readasbytearrayasync#system-net-http-httpcontent-readasbytearrayasync(system-threading-cancellationtoken) public static Task ReadAsByteArrayAsync( this HttpContent target, CancellationToken cancellationToken = default) @@ -66,7 +66,7 @@ public static Task ReadAsByteArrayAsync( /// The token to monitor for cancellation requests. The default value is . /// /// The task object representing the asynchronous operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpcontent.readasstringasync#system-net-http-httpcontent-readasstringasync(system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpcontent.readasstringasync#system-net-http-httpcontent-readasstringasync(system-threading-cancellationtoken) public static Task ReadAsStringAsync( this HttpContent target, CancellationToken cancellationToken = default) diff --git a/src/Polyfill/Polyfill_IEnumerable_AggregateBy.cs b/src/Polyfill/Polyfill_IEnumerable_AggregateBy.cs index 3e994d7c..e07039d5 100644 --- a/src/Polyfill/Polyfill_IEnumerable_AggregateBy.cs +++ b/src/Polyfill/Polyfill_IEnumerable_AggregateBy.cs @@ -14,7 +14,7 @@ static partial class Polyfill /// /// https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-9/overview#linq /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.aggregateby#system-linq-enumerable-aggregateby-3(system-collections-generic-ienumerable((-0))-system-func((-0-1))-system-func((-1-2))-system-func((-2-0-2))-system-collections-generic-iequalitycomparer((-1)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.aggregateby#system-linq-enumerable-aggregateby-3(system-collections-generic-ienumerable((-0))-system-func((-0-1))-system-func((-1-2))-system-func((-2-0-2))-system-collections-generic-iequalitycomparer((-1))) public static IEnumerable> AggregateBy( this IEnumerable source, Func keySelector, @@ -34,7 +34,7 @@ public static IEnumerable> AggregateBy /// https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-9/overview#linq /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.aggregateby#system-linq-enumerable-aggregateby-3(system-collections-generic-ienumerable((-0))-system-func((-0-1))-2-system-func((-2-0-2))-system-collections-generic-iequalitycomparer((-1)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.aggregateby#system-linq-enumerable-aggregateby-3(system-collections-generic-ienumerable((-0))-system-func((-0-1))-2-system-func((-2-0-2))-system-collections-generic-iequalitycomparer((-1))) public static IEnumerable> AggregateBy( this IEnumerable source, Func keySelector, diff --git a/src/Polyfill/Polyfill_IEnumerable_Append.cs b/src/Polyfill/Polyfill_IEnumerable_Append.cs index 2b62996f..4f0d335b 100644 --- a/src/Polyfill/Polyfill_IEnumerable_Append.cs +++ b/src/Polyfill/Polyfill_IEnumerable_Append.cs @@ -19,7 +19,7 @@ static partial class Polyfill /// The value to append to . /// The type of the elements of source. /// A new sequence that ends with element. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.append")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.append public static IEnumerable Append( this IEnumerable target, TSource element) diff --git a/src/Polyfill/Polyfill_IEnumerable_Chunk.cs b/src/Polyfill/Polyfill_IEnumerable_Chunk.cs index c0bf3b08..280b37ca 100644 --- a/src/Polyfill/Polyfill_IEnumerable_Chunk.cs +++ b/src/Polyfill/Polyfill_IEnumerable_Chunk.cs @@ -26,7 +26,7 @@ static partial class Polyfill /// /// is null. /// is below 1. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.chunk")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.chunk public static IEnumerable Chunk(this IEnumerable source, int size) { if (source is null) diff --git a/src/Polyfill/Polyfill_IEnumerable_CountBy.cs b/src/Polyfill/Polyfill_IEnumerable_CountBy.cs index 2e964ca6..f28d9b2f 100644 --- a/src/Polyfill/Polyfill_IEnumerable_CountBy.cs +++ b/src/Polyfill/Polyfill_IEnumerable_CountBy.cs @@ -14,7 +14,7 @@ static partial class Polyfill /// /// https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-9/overview#linq /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.countby")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.countby public static IEnumerable> CountBy(this IEnumerable source, Func keySelector, IEqualityComparer? keyComparer = null) where TKey : notnull { diff --git a/src/Polyfill/Polyfill_IEnumerable_DistinctBy.cs b/src/Polyfill/Polyfill_IEnumerable_DistinctBy.cs index 0c951e0f..7bd7a7c7 100644 --- a/src/Polyfill/Polyfill_IEnumerable_DistinctBy.cs +++ b/src/Polyfill/Polyfill_IEnumerable_DistinctBy.cs @@ -23,7 +23,7 @@ static partial class Polyfill /// This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in Visual C# or `For Each` in Visual Basic. /// The method returns an unordered sequence that contains no duplicate values. The default equality comparer, , is used to compare values. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.distinctby#system-linq-enumerable-distinctby-2(system-collections-generic-ienumerable((-0))-system-func((-0-1)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.distinctby#system-linq-enumerable-distinctby-2(system-collections-generic-ienumerable((-0))-system-func((-0-1))) public static IEnumerable DistinctBy(this IEnumerable source, Func keySelector) => DistinctBy(source, keySelector, null); @@ -39,7 +39,7 @@ public static IEnumerable DistinctBy(this IEnumerableThis method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in Visual C# or `For Each` in Visual Basic. /// The method returns an unordered sequence that contains no duplicate values. If is , the default equality comparer, , is used to compare values. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.distinctby#system-linq-enumerable-distinctby-2(system-collections-generic-ienumerable((-0))-system-func((-0-1))-system-collections-generic-iequalitycomparer((-1)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.distinctby#system-linq-enumerable-distinctby-2(system-collections-generic-ienumerable((-0))-system-func((-0-1))-system-collections-generic-iequalitycomparer((-1))) public static IEnumerable DistinctBy(this IEnumerable source, Func keySelector, IEqualityComparer comparer) { using IEnumerator enumerator = source.GetEnumerator(); diff --git a/src/Polyfill/Polyfill_IEnumerable_ElementAt.cs b/src/Polyfill/Polyfill_IEnumerable_ElementAt.cs index db398461..8f7614e4 100644 --- a/src/Polyfill/Polyfill_IEnumerable_ElementAt.cs +++ b/src/Polyfill/Polyfill_IEnumerable_ElementAt.cs @@ -24,7 +24,7 @@ static partial class Polyfill /// If the type of implements , that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element. /// This method throws an exception if is out of range. To instead return a default value when the specified index is out of range, use the method. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.elementat#system-linq-enumerable-elementat-1(system-collections-generic-ienumerable((-0))-system-index)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.elementat#system-linq-enumerable-elementat-1(system-collections-generic-ienumerable((-0))-system-index) public static TSource ElementAt(this IEnumerable source, Index index) { if (!index.IsFromEnd) @@ -86,7 +86,7 @@ static bool TryGetElementFromEnd(IEnumerable source, int index /// If the type of implements , that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element. /// The default value for reference and nullable types is . /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.elementatordefault#system-linq-enumerable-elementatordefault-1(system-collections-generic-ienumerable((-0))-system-index)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.elementatordefault#system-linq-enumerable-elementatordefault-1(system-collections-generic-ienumerable((-0))-system-index) public static TSource? ElementAtOrDefault(this IEnumerable source, Index index) { if (!index.IsFromEnd) diff --git a/src/Polyfill/Polyfill_IEnumerable_Except.cs b/src/Polyfill/Polyfill_IEnumerable_Except.cs index 7cfa90d1..2b895078 100644 --- a/src/Polyfill/Polyfill_IEnumerable_Except.cs +++ b/src/Polyfill/Polyfill_IEnumerable_Except.cs @@ -17,7 +17,7 @@ static partial class Polyfill /// An that is elements equal it will cause those elements to be removed from the returned sequence. /// The type of the elements of . /// A sequence that contains the items of but excluding . - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.except#system-linq-enumerable-except-1(system-collections-generic-ienumerable((-0))-system-collections-generic-ienumerable((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.except#system-linq-enumerable-except-1(system-collections-generic-ienumerable((-0))-system-collections-generic-ienumerable((-0))) public static IEnumerable Except( this IEnumerable target, TSource item) => @@ -31,7 +31,7 @@ public static IEnumerable Except( // /// An that is elements equal it will cause those elements to be removed from the returned sequence. // /// The type of the elements of . // /// A sequence that contains the items of but excluding . - // [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.except#system-linq-enumerable-except-1(system-collections-generic-ienumerable((-0))-system-collections-generic-ienumerable((-0)))")] + // //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.except#system-linq-enumerable-except-1(system-collections-generic-ienumerable((-0))-system-collections-generic-ienumerable((-0))) // public static IEnumerable Except( // this IEnumerable target, // params TSource[] items) => @@ -45,7 +45,7 @@ public static IEnumerable Except( /// An to compare values. /// The type of the elements of . /// A sequence that contains the items of but excluding . - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.except#system-linq-enumerable-except-1(system-collections-generic-ienumerable((-0))-system-collections-generic-ienumerable((-0))-system-collections-generic-iequalitycomparer((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.except#system-linq-enumerable-except-1(system-collections-generic-ienumerable((-0))-system-collections-generic-ienumerable((-0))-system-collections-generic-iequalitycomparer((-0))) public static IEnumerable Except( this IEnumerable target, TSource item, @@ -69,7 +69,7 @@ public static IEnumerable Except( /// An that is elements equal it will cause those elements to be removed from the returned sequence. /// The type of the elements of . /// A sequence that contains the items of but excluding . - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.except#system-linq-enumerable-except-1(system-collections-generic-ienumerable((-0))-system-collections-generic-ienumerable((-0))-system-collections-generic-iequalitycomparer((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.except#system-linq-enumerable-except-1(system-collections-generic-ienumerable((-0))-system-collections-generic-ienumerable((-0))-system-collections-generic-iequalitycomparer((-0))) public static IEnumerable Except( this IEnumerable target, IEqualityComparer comparer, @@ -87,7 +87,7 @@ public static IEnumerable Except( /// An whose keys that also occur in the first sequence will cause those elements to be removed from the returned sequence. /// A function to extract the key for each element. /// A sequence that contains the set difference of the elements of two sequences. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.exceptby#system-linq-enumerable-exceptby-2(system-collections-generic-ienumerable((-0))-system-collections-generic-ienumerable((-1))-system-func((-0-1)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.exceptby#system-linq-enumerable-exceptby-2(system-collections-generic-ienumerable((-0))-system-collections-generic-ienumerable((-1))-system-func((-0-1))) public static IEnumerable ExceptBy(this IEnumerable first, IEnumerable second, Func keySelector) => ExceptBy(first, second, keySelector, null); @@ -101,7 +101,7 @@ public static IEnumerable ExceptBy(this IEnumerableA function to extract the key for each element. /// The to compare values. /// A sequence that contains the set difference of the elements of two sequences. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.exceptby#system-linq-enumerable-exceptby-2(system-collections-generic-ienumerable((-0))-system-collections-generic-ienumerable((-1))-system-func((-0-1))-system-collections-generic-iequalitycomparer((-1)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.exceptby#system-linq-enumerable-exceptby-2(system-collections-generic-ienumerable((-0))-system-collections-generic-ienumerable((-1))-system-func((-0-1))-system-collections-generic-iequalitycomparer((-1))) public static IEnumerable ExceptBy(this IEnumerable first, IEnumerable second, Func keySelector, IEqualityComparer? comparer) => ExceptByIterator(first, second, keySelector, comparer); diff --git a/src/Polyfill/Polyfill_IEnumerable_FirstOrDefault.cs b/src/Polyfill/Polyfill_IEnumerable_FirstOrDefault.cs index fe1d5942..6aea5273 100644 --- a/src/Polyfill/Polyfill_IEnumerable_FirstOrDefault.cs +++ b/src/Polyfill/Polyfill_IEnumerable_FirstOrDefault.cs @@ -18,7 +18,7 @@ static partial class Polyfill /// The default value to return if the sequence is empty. /// if is empty or if no element passes the test specified by ; otherwise, the first element in that passes the test specified by . /// or is . - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.firstordefault#system-linq-enumerable-firstordefault-1(system-collections-generic-ienumerable((-0))-system-func((-0-system-boolean))-0)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.firstordefault#system-linq-enumerable-firstordefault-1(system-collections-generic-ienumerable((-0))-system-func((-0-system-boolean))-0) public static TSource FirstOrDefault(this IEnumerable source, Func predicate, TSource defaultValue) { TSource? first = source.TryGetFirst(predicate, out bool found); @@ -31,7 +31,7 @@ public static TSource FirstOrDefault(this IEnumerable source, /// The default value to return if the sequence is empty. /// if is empty; otherwise, the first element in . /// is . - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.firstordefault#system-linq-enumerable-firstordefault-1(system-collections-generic-ienumerable((-0))-0)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.firstordefault#system-linq-enumerable-firstordefault-1(system-collections-generic-ienumerable((-0))-0) public static TSource FirstOrDefault(this IEnumerable source, TSource defaultValue) { TSource? first = source.TryGetFirst(out bool found); diff --git a/src/Polyfill/Polyfill_IEnumerable_Index.cs b/src/Polyfill/Polyfill_IEnumerable_Index.cs index 6b05354d..c7b3dc97 100644 --- a/src/Polyfill/Polyfill_IEnumerable_Index.cs +++ b/src/Polyfill/Polyfill_IEnumerable_Index.cs @@ -14,7 +14,7 @@ static partial class Polyfill /// /// https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-9/overview#linq /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.index#system-linq-enumerable-index-1(system-collections-generic-ienumerable((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.index#system-linq-enumerable-index-1(system-collections-generic-ienumerable((-0))) public static IEnumerable<(int Index, TSource Item)> Index(this IEnumerable source) { int index = 0; diff --git a/src/Polyfill/Polyfill_IEnumerable_LastOrDefault.cs b/src/Polyfill/Polyfill_IEnumerable_LastOrDefault.cs index a75f73df..0a2739f5 100644 --- a/src/Polyfill/Polyfill_IEnumerable_LastOrDefault.cs +++ b/src/Polyfill/Polyfill_IEnumerable_LastOrDefault.cs @@ -17,7 +17,7 @@ static partial class Polyfill /// The default value to return if the sequence is empty. /// if the source sequence is empty; otherwise, the last element in the . /// is . - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.lastordefault#system-linq-enumerable-lastordefault-1(system-collections-generic-ienumerable((-0))-0)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.lastordefault#system-linq-enumerable-lastordefault-1(system-collections-generic-ienumerable((-0))-0) public static TSource LastOrDefault(this IEnumerable source, TSource defaultValue) { TSource? last = source.TryGetLast(out bool found); @@ -31,7 +31,7 @@ public static TSource LastOrDefault(this IEnumerable source, T /// The default value to return if the sequence is empty. /// if the sequence is empty or if no elements pass the test in the predicate function; otherwise, the last element that passes the test in the predicate function. /// or is . - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.lastordefault#system-linq-enumerable-lastordefault-1(system-collections-generic-ienumerable((-0))-system-func((-0-system-boolean))-0)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.lastordefault#system-linq-enumerable-lastordefault-1(system-collections-generic-ienumerable((-0))-system-func((-0-system-boolean))-0) public static TSource LastOrDefault(this IEnumerable source, Func predicate, TSource defaultValue) { TSource? last = source.TryGetLast(predicate, out bool found); diff --git a/src/Polyfill/Polyfill_IEnumerable_Max.cs b/src/Polyfill/Polyfill_IEnumerable_Max.cs index cf9f6b60..bad85d0e 100644 --- a/src/Polyfill/Polyfill_IEnumerable_Max.cs +++ b/src/Polyfill/Polyfill_IEnumerable_Max.cs @@ -24,7 +24,7 @@ static partial class Polyfill /// If is a reference type and the source sequence is empty or contains only values that are , this method returns . /// In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.max?view=net-8.0#system-linq-enumerable-max-1(system-collections-generic-ienumerable((-0))-system-collections-generic-icomparer((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.max?view=net-8.0#system-linq-enumerable-max-1(system-collections-generic-ienumerable((-0))-system-collections-generic-icomparer((-0))) public static TSource? Max( this IEnumerable source, IComparer? comparer) => diff --git a/src/Polyfill/Polyfill_IEnumerable_MaxBy.cs b/src/Polyfill/Polyfill_IEnumerable_MaxBy.cs index 831466e6..732e7136 100644 --- a/src/Polyfill/Polyfill_IEnumerable_MaxBy.cs +++ b/src/Polyfill/Polyfill_IEnumerable_MaxBy.cs @@ -25,7 +25,7 @@ static partial class Polyfill /// /// If is a reference type and the source sequence is empty or contains only values that are , this method returns . /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.maxby#system-linq-enumerable-maxby-2(system-collections-generic-ienumerable((-0))-system-func((-0-1)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.maxby#system-linq-enumerable-maxby-2(system-collections-generic-ienumerable((-0))-system-func((-0-1))) public static TSource? MaxBy( this IEnumerable source, Func keySelector) => @@ -43,7 +43,7 @@ static partial class Polyfill /// /// If is a reference type and the source sequence is empty or contains only values that are , this method returns . /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.maxby#system-linq-enumerable-maxby-2(system-collections-generic-ienumerable((-0))-system-func((-0-1))-system-collections-generic-icomparer((-1)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.maxby#system-linq-enumerable-maxby-2(system-collections-generic-ienumerable((-0))-system-func((-0-1))-system-collections-generic-icomparer((-1))) public static TSource? MaxBy( this IEnumerable source, Func keySelector, diff --git a/src/Polyfill/Polyfill_IEnumerable_Min.cs b/src/Polyfill/Polyfill_IEnumerable_Min.cs index bb9d9a97..8d2b77d3 100644 --- a/src/Polyfill/Polyfill_IEnumerable_Min.cs +++ b/src/Polyfill/Polyfill_IEnumerable_Min.cs @@ -25,7 +25,7 @@ static partial class Polyfill /// If is a reference type and the source sequence is empty or contains only values that are , this method returns . /// In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.min?view=net-8.0#system-linq-enumerable-min-1(system-collections-generic-ienumerable((-0))-system-collections-generic-icomparer((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.min?view=net-8.0#system-linq-enumerable-min-1(system-collections-generic-ienumerable((-0))-system-collections-generic-icomparer((-0))) public static TSource? Min( this IEnumerable source, IComparer? comparer) => diff --git a/src/Polyfill/Polyfill_IEnumerable_MinBy.cs b/src/Polyfill/Polyfill_IEnumerable_MinBy.cs index 17967662..705686c9 100644 --- a/src/Polyfill/Polyfill_IEnumerable_MinBy.cs +++ b/src/Polyfill/Polyfill_IEnumerable_MinBy.cs @@ -26,7 +26,7 @@ static partial class Polyfill /// /// If is a reference type and the source sequence is empty or contains only values that are , this method returns . /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.minby#system-linq-enumerable-minby-2(system-collections-generic-ienumerable((-0))-system-func((-0-1)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.minby#system-linq-enumerable-minby-2(system-collections-generic-ienumerable((-0))-system-func((-0-1))) public static TSource? MinBy( this IEnumerable source, Func keySelector) => @@ -44,7 +44,7 @@ static partial class Polyfill /// /// If is a reference type and the source sequence is empty or contains only values that are , this method returns . /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.minby#system-linq-enumerable-minby-2(system-collections-generic-ienumerable((-0))-system-func((-0-1))-system-collections-generic-icomparer((-1)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.minby#system-linq-enumerable-minby-2(system-collections-generic-ienumerable((-0))-system-func((-0-1))-system-collections-generic-icomparer((-1))) public static TSource? MinBy( this IEnumerable source, Func keySelector, diff --git a/src/Polyfill/Polyfill_IEnumerable_SingleOrDefault.cs b/src/Polyfill/Polyfill_IEnumerable_SingleOrDefault.cs index b4d3b1a3..6573e457 100644 --- a/src/Polyfill/Polyfill_IEnumerable_SingleOrDefault.cs +++ b/src/Polyfill/Polyfill_IEnumerable_SingleOrDefault.cs @@ -19,7 +19,7 @@ static partial class Polyfill /// The single element of the input sequence that satisfies the condition, or if no such element is found. /// or is . /// More than one element satisfies the condition in . - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.singleordefault#system-linq-enumerable-singleordefault-1(system-collections-generic-ienumerable((-0))-system-func((-0-system-boolean))-0)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.singleordefault#system-linq-enumerable-singleordefault-1(system-collections-generic-ienumerable((-0))-system-func((-0-system-boolean))-0) public static TSource SingleOrDefault(this IEnumerable source, Func predicate, TSource defaultValue) { var single = source.TryGetSingle(predicate, out bool found); @@ -59,7 +59,7 @@ public static TSource SingleOrDefault(this IEnumerable source, /// The single element of the input sequence, or if the sequence contains no elements. /// is . /// The input sequence contains more than one element. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.singleordefault#system-linq-enumerable-singleordefault-1(system-collections-generic-ienumerable((-0))-0)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.singleordefault#system-linq-enumerable-singleordefault-1(system-collections-generic-ienumerable((-0))-0) public static TSource SingleOrDefault(this IEnumerable source, TSource defaultValue) { var single = source.TryGetSingle(out bool found); diff --git a/src/Polyfill/Polyfill_IEnumerable_SkipLast.cs b/src/Polyfill/Polyfill_IEnumerable_SkipLast.cs index 89098256..dbb53356 100644 --- a/src/Polyfill/Polyfill_IEnumerable_SkipLast.cs +++ b/src/Polyfill/Polyfill_IEnumerable_SkipLast.cs @@ -21,7 +21,7 @@ static partial class Polyfill /// The type of the elements in the enumerable collection. /// A new enumerable collection that contains the elements from source minus count elements from the end /// of the collection. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.skiplast")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.skiplast public static IEnumerable SkipLast( this IEnumerable target, int count) => diff --git a/src/Polyfill/Polyfill_IEnumerable_Take.cs b/src/Polyfill/Polyfill_IEnumerable_Take.cs index c051b112..d986429b 100644 --- a/src/Polyfill/Polyfill_IEnumerable_Take.cs +++ b/src/Polyfill/Polyfill_IEnumerable_Take.cs @@ -165,7 +165,7 @@ static IEnumerable TakeRangeIterator(IEnumerable sour /// This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in Visual C# or `For Each` in Visual Basic. /// enumerates and yields elements whose indices belong to the specified . /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.take?view=net-8.0#system-linq-enumerable-take-1(system-collections-generic-ienumerable((-0))-system-range)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.take?view=net-8.0#system-linq-enumerable-take-1(system-collections-generic-ienumerable((-0))-system-range) public static IEnumerable Take( this IEnumerable target, Range range) diff --git a/src/Polyfill/Polyfill_IEnumerable_TakeLast.cs b/src/Polyfill/Polyfill_IEnumerable_TakeLast.cs index 2cafc8e4..c8845bf4 100644 --- a/src/Polyfill/Polyfill_IEnumerable_TakeLast.cs +++ b/src/Polyfill/Polyfill_IEnumerable_TakeLast.cs @@ -23,7 +23,7 @@ static partial class Polyfill /// The number of elements to take from the end of the collection. /// The type of the elements in the enumerable collection. /// A new enumerable collection that contains the last count elements from source. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.takelast")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.takelast public static IEnumerable TakeLast(this IEnumerable source, int count) { if (count <= 0 || IsEmptyArray(source)) diff --git a/src/Polyfill/Polyfill_IEnumerable_ToHashSet.cs b/src/Polyfill/Polyfill_IEnumerable_ToHashSet.cs index d200943f..2706a4d4 100644 --- a/src/Polyfill/Polyfill_IEnumerable_ToHashSet.cs +++ b/src/Polyfill/Polyfill_IEnumerable_ToHashSet.cs @@ -19,7 +19,7 @@ static partial class Polyfill /// An IEqualityComparer to compare keys. /// The type of the elements of source. /// A HashSet that contains values of type TSource selected from the input sequence. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.tohashset#system-linq-enumerable-tohashset-1(system-collections-generic-ienumerable((-0))-system-collections-generic-iequalitycomparer((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.tohashset#system-linq-enumerable-tohashset-1(system-collections-generic-ienumerable((-0))-system-collections-generic-iequalitycomparer((-0))) public static HashSet ToHashSet( this IEnumerable target, IEqualityComparer? comparer = null) => diff --git a/src/Polyfill/Polyfill_IEnumerable_TryGetNonEnumeratedCount.cs b/src/Polyfill/Polyfill_IEnumerable_TryGetNonEnumeratedCount.cs index c366c8b9..e12c1820 100644 --- a/src/Polyfill/Polyfill_IEnumerable_TryGetNonEnumeratedCount.cs +++ b/src/Polyfill/Polyfill_IEnumerable_TryGetNonEnumeratedCount.cs @@ -32,7 +32,7 @@ static partial class Polyfill /// The method is typically a constant-time operation, but ultimately this depends on the complexity /// characteristics of the underlying collection implementation. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.trygetnonenumeratedcount")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.trygetnonenumeratedcount public static bool TryGetNonEnumeratedCount(this IEnumerable target, out int count) { if (target is ICollection genericCollection) diff --git a/src/Polyfill/Polyfill_IEnumerable_Zip.cs b/src/Polyfill/Polyfill_IEnumerable_Zip.cs index 1e8ca5f1..83d6aa1f 100644 --- a/src/Polyfill/Polyfill_IEnumerable_Zip.cs +++ b/src/Polyfill/Polyfill_IEnumerable_Zip.cs @@ -22,7 +22,7 @@ static partial class Polyfill /// The second sequence to merge. /// The third sequence to merge. /// A sequence of tuples with elements taken from the first, second, and third sequences, in that order. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.zip#system-linq-enumerable-zip-3(system-collections-generic-ienumerable((-0))-system-collections-generic-ienumerable((-1))-system-collections-generic-ienumerable((-2)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.zip#system-linq-enumerable-zip-3(system-collections-generic-ienumerable((-0))-system-collections-generic-ienumerable((-1))-system-collections-generic-ienumerable((-2))) public static IEnumerable<(TFirst First, TSecond Second, TThird Third)> Zip(this IEnumerable first, IEnumerable second, IEnumerable third) { using (IEnumerator e1 = first.GetEnumerator()) @@ -47,7 +47,7 @@ static partial class Polyfill /// The first sequence to merge. /// The second sequence to merge. /// A sequence of tuples with elements taken from the first, and second sequences, in that order. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.zip#system-linq-enumerable-zip-2(system-collections-generic-ienumerable((-0))-system-collections-generic-ienumerable((-1)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.zip#system-linq-enumerable-zip-2(system-collections-generic-ienumerable((-0))-system-collections-generic-ienumerable((-1))) public static IEnumerable<(TFirst First, TSecond Second)> Zip(this IEnumerable first, IEnumerable second) { using (IEnumerator e1 = first.GetEnumerator()) diff --git a/src/Polyfill/Polyfill_IReadOnlyDictionary.cs b/src/Polyfill/Polyfill_IReadOnlyDictionary.cs index 883052a1..d0ad4b28 100644 --- a/src/Polyfill/Polyfill_IReadOnlyDictionary.cs +++ b/src/Polyfill/Polyfill_IReadOnlyDictionary.cs @@ -22,7 +22,7 @@ static partial class Polyfill /// A TValue instance. When the method is successful, the returned object is the value associated with /// the specified key. When the method fails, it returns the default value for TValue. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.getvalueordefault")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.getvalueordefault public static TValue? GetValueOrDefault( this IReadOnlyDictionary target, TKey key) @@ -48,7 +48,7 @@ static partial class Polyfill /// A TValue instance. When the method is successful, the returned object is the value associated with /// the specified key. When the method fails, it returns the default value for TValue. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.getvalueordefault#system-collections-generic-collectionextensions-getvalueordefault-2(system-collections-generic-ireadonlydictionary((-0-1))-0-1)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.getvalueordefault#system-collections-generic-collectionextensions-getvalueordefault-2(system-collections-generic-ireadonlydictionary((-0-1))-0-1) public static TValue GetValueOrDefault( this IReadOnlyDictionary target, TKey key, diff --git a/src/Polyfill/Polyfill_KeyValuePair.cs b/src/Polyfill/Polyfill_KeyValuePair.cs index 68cbb240..828ef129 100644 --- a/src/Polyfill/Polyfill_KeyValuePair.cs +++ b/src/Polyfill/Polyfill_KeyValuePair.cs @@ -16,7 +16,7 @@ static partial class Polyfill /// /// The key of the current . /// The value of the current . - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.keyvaluepair-2.deconstruct")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.keyvaluepair-2.deconstruct public static void Deconstruct( this KeyValuePair target, out TKey key, diff --git a/src/Polyfill/Polyfill_List.cs b/src/Polyfill/Polyfill_List.cs index 768b4105..ce1a6a82 100644 --- a/src/Polyfill/Polyfill_List.cs +++ b/src/Polyfill/Polyfill_List.cs @@ -14,7 +14,7 @@ static partial class Polyfill /// Returns a read-only wrapper for the current collection. /// An object that acts as a read-only wrapper around the current . - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.asreadonly#system-collections-generic-collectionextensions-asreadonly-1(system-collections-generic-ilist((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.asreadonly#system-collections-generic-collectionextensions-asreadonly-1(system-collections-generic-ilist((-0))) public static ReadOnlyCollection AsReadOnly(this IList target) => new(target); #endif @@ -25,7 +25,7 @@ public static ReadOnlyCollection AsReadOnly(this IList target) => /// The list to which the elements should be added. /// The span whose elements should be added to the end of the . /// The is null. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.addrange")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.addrange public static void AddRange(this List target, ReadOnlySpan source) { foreach (var item in source) @@ -41,7 +41,7 @@ public static void AddRange(this List target, ReadOnlySpan source) /// The span whose elements should be added to the . /// The is null. /// is less than 0 or greater than 's . - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.insertrange")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.insertrange public static void InsertRange(this List target, int index, ReadOnlySpan source) { for (var i = 0; i < source.Length; i++) @@ -57,7 +57,7 @@ public static void InsertRange(this List target, int index, ReadOnlySpanThe span that is the destination of the elements copied from . /// The is null. /// The number of elements in the source is greater than the number of elements that the destination span can contain. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.copyto")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.copyto public static void CopyTo(this List target, Span destination) { for (var index = 0; index < target.Count; index++) diff --git a/src/Polyfill/Polyfill_Memory.cs b/src/Polyfill/Polyfill_Memory.cs index 6f9046fe..2c2fea80 100644 --- a/src/Polyfill/Polyfill_Memory.cs +++ b/src/Polyfill/Polyfill_Memory.cs @@ -24,7 +24,7 @@ static partial class Polyfill /// for for more information on how newline /// sequences are detected. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.enumeratelines#system-memoryextensions-enumeratelines(system-readonlyspan((system-char)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.enumeratelines#system-memoryextensions-enumeratelines(system-readonlyspan((system-char))) public static SpanLineEnumerator EnumerateLines(this ReadOnlySpan target) => new(target); @@ -36,7 +36,7 @@ public static SpanLineEnumerator EnumerateLines(this ReadOnlySpan target) /// for for more information on how newline /// sequences are detected. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.enumeratelines#system-memoryextensions-enumeratelines(system-span((system-char)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.enumeratelines#system-memoryextensions-enumeratelines(system-span((system-char))) public static SpanLineEnumerator EnumerateLines(this Span target) => new(target); @@ -48,7 +48,7 @@ public static SpanLineEnumerator EnumerateLines(this Span target) => /// Removes all leading white-space characters from the span. /// /// The source span from which the characters are removed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.trimstart#system-memoryextensions-trimstart(system-span((system-char)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.trimstart#system-memoryextensions-trimstart(system-span((system-char))) public static Span TrimStart(this Span target) => target.Slice(ClampStart(target)); @@ -56,7 +56,7 @@ public static Span TrimStart(this Span target) /// Removes all trailing white-space characters from the span. /// /// The source span from which the characters are removed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.trimend#system-memoryextensions-trimend(system-span((system-char)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.trimend#system-memoryextensions-trimend(system-span((system-char))) public static Span TrimEnd(this Span target) => target.Slice(0, ClampEnd(target, 0)); @@ -104,7 +104,7 @@ static int ClampEnd(ReadOnlySpan target, int start) /// /// The value to search for. /// true if found, false otherwise. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.contains#system-memoryextensions-contains-1(system-readonlyspan((-0))-0)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.contains#system-memoryextensions-contains-1(system-readonlyspan((-0))-0) public static bool Contains( this ReadOnlySpan target, T value) @@ -126,7 +126,7 @@ public static bool Contains( /// /// The value to search for. /// true if found, false otherwise. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.contains#system-memoryextensions-contains-1(system-span((-0))-0)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.contains#system-memoryextensions-contains-1(system-span((-0))-0) public static bool Contains( this Span target, T value) @@ -149,7 +149,7 @@ public static bool Contains( /// The first sequence to compare. /// The second sequence to compare. /// true if the two sequences are equal; otherwise, false. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.sequenceequal#system-memoryextensions-sequenceequal-1(system-readonlyspan((-0))-system-readonlyspan((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.sequenceequal#system-memoryextensions-sequenceequal-1(system-readonlyspan((-0))-system-readonlyspan((-0))) public static bool SequenceEqual( this ReadOnlySpan target, string other) => @@ -161,7 +161,7 @@ public static bool SequenceEqual( /// The first sequence to compare. /// The second sequence to compare. /// true if the two sequences are equal; otherwise, false. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.sequenceequal#system-memoryextensions-sequenceequal-1(system-span((-0))-system-readonlyspan((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.sequenceequal#system-memoryextensions-sequenceequal-1(system-span((-0))-system-readonlyspan((-0))) public static bool SequenceEqual( this Span target, string other) => diff --git a/src/Polyfill/Polyfill_Memory_EndsWith.cs b/src/Polyfill/Polyfill_Memory_EndsWith.cs index 021f5b2f..2c607e1e 100644 --- a/src/Polyfill/Polyfill_Memory_EndsWith.cs +++ b/src/Polyfill/Polyfill_Memory_EndsWith.cs @@ -23,7 +23,7 @@ static partial class Polyfill /// /// The span to search. /// The value to compare. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.endswith#system-memoryextensions-endswith-1(system-readonlyspan((-0))-0)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.endswith#system-memoryextensions-endswith-1(system-readonlyspan((-0))-0) [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool EndsWith(this ReadOnlySpan target, T value) where T : IEquatable? => @@ -40,7 +40,7 @@ public static bool EndsWith(this ReadOnlySpan target, T value) /// The sequence to compare to the end of the source span. /// An enumeration value that determines how span and value are compared. /// true if value matches the end of span; otherwise, false. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.endswith#system-memoryextensions-endswith-1(system-readonlyspan((-0))-system-readonlyspan((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.endswith#system-memoryextensions-endswith-1(system-readonlyspan((-0))-system-readonlyspan((-0))) public static bool EndsWith( this ReadOnlySpan target, string other, @@ -53,7 +53,7 @@ public static bool EndsWith( /// The source span. /// The sequence to compare to the end of the source span. /// true if value matches the end of span; otherwise, false. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.endswith#system-memoryextensions-endswith-1(system-span((-0))-system-readonlyspan((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.endswith#system-memoryextensions-endswith-1(system-span((-0))-system-readonlyspan((-0))) public static bool EndsWith( this Span target, string other) => diff --git a/src/Polyfill/Polyfill_Memory_SpanSplit.cs b/src/Polyfill/Polyfill_Memory_SpanSplit.cs index 339e1ce8..4fe101ff 100644 --- a/src/Polyfill/Polyfill_Memory_SpanSplit.cs +++ b/src/Polyfill/Polyfill_Memory_SpanSplit.cs @@ -23,7 +23,7 @@ static partial class Polyfill /// The source span to be enumerated. /// The separator character to be used to split the provided span. /// Returns a . - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.split#system-memoryextensions-split-1(system-readonlyspan((-0))-0)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.split#system-memoryextensions-split-1(system-readonlyspan((-0))-0) public static SpanSplitEnumerator Split(this ReadOnlySpan source, T separator) where T : IEquatable => new SpanSplitEnumerator(source, separator); @@ -36,7 +36,7 @@ public static SpanSplitEnumerator Split(this ReadOnlySpan source, T sep /// The source span to be enumerated. /// The separator span to be used to split the provided span. /// Returns a . - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.split#system-memoryextensions-split-1(system-readonlyspan((-0))-system-readonlyspan((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.split#system-memoryextensions-split-1(system-readonlyspan((-0))-system-readonlyspan((-0))) public static SpanSplitEnumerator Split(this ReadOnlySpan source, ReadOnlySpan separator) where T : IEquatable => new SpanSplitEnumerator(source, separator, treatAsSingleSeparator: true); @@ -58,7 +58,7 @@ public static SpanSplitEnumerator Split(this ReadOnlySpan source, ReadO /// or when /// is used with an empty separator span. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.splitany#system-memoryextensions-splitany-1(system-readonlyspan((-0))-system-readonlyspan((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.splitany#system-memoryextensions-splitany-1(system-readonlyspan((-0))-system-readonlyspan((-0))) public static SpanSplitEnumerator SplitAny(this ReadOnlySpan source, [UnscopedRef] params ReadOnlySpan separators) where T : IEquatable => new SpanSplitEnumerator(source, separators); @@ -81,7 +81,7 @@ public static SpanSplitEnumerator SplitAny(this ReadOnlySpan source, [U /// whereas will use all Unicode whitespace characters as separators if is /// empty and is . /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.splitany#system-memoryextensions-splitany-1(system-readonlyspan((-0))-system-buffers-searchvalues((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.splitany#system-memoryextensions-splitany-1(system-readonlyspan((-0))-system-buffers-searchvalues((-0))) public static SpanSplitEnumerator SplitAny(this ReadOnlySpan source, SearchValues separators) where T : IEquatable => new SpanSplitEnumerator(source, separators); diff --git a/src/Polyfill/Polyfill_Memory_SpanSplitEnumerator.cs b/src/Polyfill/Polyfill_Memory_SpanSplitEnumerator.cs index f270d313..fffef5fc 100644 --- a/src/Polyfill/Polyfill_Memory_SpanSplitEnumerator.cs +++ b/src/Polyfill/Polyfill_Memory_SpanSplitEnumerator.cs @@ -17,7 +17,7 @@ static partial class Polyfill /// Enables enumerating each split within a that has been divided using one or more separators. /// //https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.spansplitenumerator-1")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.spansplitenumerator-1")] public ref struct SpanSplitEnumerator where T : IEquatable { diff --git a/src/Polyfill/Polyfill_Memory_StartsWith.cs b/src/Polyfill/Polyfill_Memory_StartsWith.cs index b557db99..4172927c 100644 --- a/src/Polyfill/Polyfill_Memory_StartsWith.cs +++ b/src/Polyfill/Polyfill_Memory_StartsWith.cs @@ -22,7 +22,7 @@ static partial class Polyfill /// /// The span to search. /// The value to compare. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.endswith#system-memoryextensions-endswith-1(system-readonlyspan((-0))-0)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.endswith#system-memoryextensions-endswith-1(system-readonlyspan((-0))-0) [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool StartsWith(this ReadOnlySpan target, T value) where T : IEquatable? => @@ -39,7 +39,7 @@ public static bool StartsWith(this ReadOnlySpan target, T value) /// The sequence to compare to the beginning of the source span. /// An enumeration value that determines how span and value are compared. /// true if value matches the beginning of span; otherwise, false. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.startswith#system-memoryextensions-startswith-1(system-readonlyspan((-0))-system-readonlyspan((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.startswith#system-memoryextensions-startswith-1(system-readonlyspan((-0))-system-readonlyspan((-0))) public static bool StartsWith( this ReadOnlySpan target, string other, @@ -52,7 +52,7 @@ public static bool StartsWith( /// The source span. /// The sequence to compare to the beginning of the source span. /// true if value matches the beginning of span; otherwise, false. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.startswith#system-memoryextensions-startswith-1(system-span((-0))-system-readonlyspan((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.startswith#system-memoryextensions-startswith-1(system-span((-0))-system-readonlyspan((-0))) public static bool StartsWith( this Span target, string other) => diff --git a/src/Polyfill/Polyfill_MicroNanosecond.cs b/src/Polyfill/Polyfill_MicroNanosecond.cs index 177e5362..923824b5 100644 --- a/src/Polyfill/Polyfill_MicroNanosecond.cs +++ b/src/Polyfill/Polyfill_MicroNanosecond.cs @@ -13,42 +13,42 @@ static partial class Polyfill /// /// Gets the nanosecond component of the time represented by the current object. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.timespan.nanoseconds")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.timespan.nanoseconds public static int Nanoseconds(this TimeSpan target) => target.Nanoseconds; /// /// Gets the nanosecond component of the time represented by the current object. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetime.nanosecond")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.nanosecond public static int Nanosecond(this DateTime target) => target.Nanosecond; /// /// Gets the nanosecond component of the time represented by the current object. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.nanosecond")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.nanosecond public static int Nanosecond(this DateTimeOffset target) => target.Nanosecond; /// /// Gets the microsecond component of the time represented by the current object. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecond")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecond public static int Microseconds(this TimeSpan target) => target.Microseconds; /// /// Gets the microsecond component of the time represented by the current object. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetime.microsecond")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.microsecond public static int Microsecond(this DateTime target) => target.Microsecond; /// /// Gets the microsecond component of the time represented by the current object. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.microsecond")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.microsecond public static int Microsecond(this DateTimeOffset target) => target.Microsecond; @@ -59,42 +59,42 @@ public static int Microsecond(this DateTimeOffset target) => /// /// Gets the nanosecond component of the time represented by the current object. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.timespan.nanoseconds")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.timespan.nanoseconds public static int Nanoseconds(this TimeSpan target) => (int) (target.TicksComponent() % TicksPerMicrosecond) * 100; /// /// Gets the nanosecond component of the time represented by the current object. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetime.nanosecond")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.nanosecond public static int Nanosecond(this DateTime target) => (int) (target.TicksComponent() % TicksPerMicrosecond) * 100; /// /// Gets the nanosecond component of the time represented by the current object. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.nanosecond")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.nanosecond public static int Nanosecond(this DateTimeOffset target) => (int) (target.TicksComponent() % TicksPerMicrosecond) * 100; /// /// Gets the microsecond component of the time represented by the current object. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microseconds")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microseconds public static int Microseconds(this TimeSpan target) => (int) (target.TicksComponent() % TicksPerMicrosecond) * 1000; /// /// Gets the microsecond component of the time represented by the current object. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetime.microsecond")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.microsecond public static int Microsecond(this DateTime target) => (int) (target.TicksComponent() % TicksPerMicrosecond) * 1000; /// /// Gets the microsecond component of the time represented by the current object. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.microsecond")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.microsecond public static int Microsecond(this DateTimeOffset target) => (int) (target.TicksComponent() % TicksPerMicrosecond) * 1000; diff --git a/src/Polyfill/Polyfill_MicroNanosecondAdd.cs b/src/Polyfill/Polyfill_MicroNanosecondAdd.cs index 77e7d194..3311fb42 100644 --- a/src/Polyfill/Polyfill_MicroNanosecondAdd.cs +++ b/src/Polyfill/Polyfill_MicroNanosecondAdd.cs @@ -13,14 +13,14 @@ static partial class Polyfill /// /// Returns a new object that adds a specified number of microseconds to the value of this instance.. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetime.addmicroseconds")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.addmicroseconds public static DateTime AddMicroseconds(this DateTime target, double microseconds) => target.AddMilliseconds(microseconds / 1000); /// /// Returns a new object that adds a specified number of microseconds to the value of this instance.. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.addmicroseconds")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.addmicroseconds public static DateTimeOffset AddMicroseconds(this DateTimeOffset target, double microseconds) => target.AddMilliseconds(microseconds / 1000); diff --git a/src/Polyfill/Polyfill_Process.cs b/src/Polyfill/Polyfill_Process.cs index 5776a916..7757e5f4 100644 --- a/src/Polyfill/Polyfill_Process.cs +++ b/src/Polyfill/Polyfill_Process.cs @@ -24,7 +24,7 @@ static partial class Polyfill /// A task that will complete when the process has exited, cancellation has been requested, /// or an error occurs. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.waitforexitasync")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.waitforexitasync public static async Task WaitForExitAsync(this Process target, CancellationToken cancellationToken = default) { // Because the process has already started by the time this method is called, diff --git a/src/Polyfill/Polyfill_Random.cs b/src/Polyfill/Polyfill_Random.cs index 0b1aeec7..421d1305 100644 --- a/src/Polyfill/Polyfill_Random.cs +++ b/src/Polyfill/Polyfill_Random.cs @@ -14,7 +14,7 @@ static partial class Polyfill /// /// The array to be filled with random numbers. /// Each element of the span of bytes is set to a random number greater than or equal to 0 and less than or equal to . - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.random.nextbytes#system-random-nextbytes(system-span((system-byte)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.random.nextbytes#system-random-nextbytes(system-span((system-byte))) public static void NextBytes( this Random target, Span buffer) @@ -36,7 +36,7 @@ public static void NextBytes( /// This method uses to choose values for shuffling. /// This method is an O(n) operation. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.random.nextbytes#system-random-nextbytes(system-span((system-byte)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.random.nextbytes#system-random-nextbytes(system-span((system-byte))) public static void Shuffle( this Random target, T[] values) @@ -66,7 +66,7 @@ public static void Shuffle( /// This method uses to choose values for shuffling. /// This method is an O(n) operation. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.random.nextbytes#system-random-nextbytes(system-span((system-byte)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.random.nextbytes#system-random-nextbytes(system-span((system-byte))) public static void Shuffle( this Random target, Span values) diff --git a/src/Polyfill/Polyfill_SortedList.cs b/src/Polyfill/Polyfill_SortedList.cs index 33249527..a7c5f8fb 100644 --- a/src/Polyfill/Polyfill_SortedList.cs +++ b/src/Polyfill/Polyfill_SortedList.cs @@ -17,7 +17,7 @@ static partial class Polyfill /// The zero-based index of the key within the entire . /// The key corresponding to the specified index. /// The specified index is out of range. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.sortedlist-2.getkeyatindex")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.sortedlist-2.getkeyatindex public static TKey GetKeyAtIndex( this SortedList target, int index) => target.Keys[index]; @@ -27,7 +27,7 @@ public static TKey GetKeyAtIndex( /// /// The zero-based index of the value within the entire . /// The value corresponding to the specified index. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.sortedlist-2.getvalueatindex")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.sortedlist-2.getvalueatindex public static TValue GetValueAtIndex( this SortedList target, int index) => target.Values[index]; diff --git a/src/Polyfill/Polyfill_Stream.cs b/src/Polyfill/Polyfill_Stream.cs index 1c5480e5..7e613aa8 100644 --- a/src/Polyfill/Polyfill_Stream.cs +++ b/src/Polyfill/Polyfill_Stream.cs @@ -30,7 +30,7 @@ static partial class Polyfill /// the buffer if that many bytes are not currently available, or it can be 0 (zero) if the end of the stream has /// been reached. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.stream.readasync#system-io-stream-readasync(system-memory((system-byte))-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.stream.readasync#system-io-stream-readasync(system-memory((system-byte))-system-threading-cancellationtoken) public static ValueTask ReadAsync( this Stream target, Memory buffer, @@ -54,7 +54,7 @@ public static ValueTask ReadAsync( /// The token to monitor for cancellation requests. The default value is . /// /// A task that represents the asynchronous write operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.stream.writeasync#system-io-stream-writeasync(system-readonlymemory((system-byte))-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.stream.writeasync#system-io-stream-writeasync(system-readonlymemory((system-byte))-system-threading-cancellationtoken) public static ValueTask WriteAsync( this Stream target, ReadOnlyMemory buffer, @@ -80,7 +80,7 @@ public static ValueTask WriteAsync( /// The token to monitor for cancellation requests. The default value is . /// /// A task that represents the asynchronous copy operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.stream.copytoasync#system-io-stream-copytoasync(system-io-stream-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.stream.copytoasync#system-io-stream-copytoasync(system-io-stream-system-threading-cancellationtoken) public static Task CopyToAsync( this Stream target, Stream destination, diff --git a/src/Polyfill/Polyfill_Stream_DisposeAsync.cs b/src/Polyfill/Polyfill_Stream_DisposeAsync.cs index acc22173..6d024d5b 100644 --- a/src/Polyfill/Polyfill_Stream_DisposeAsync.cs +++ b/src/Polyfill/Polyfill_Stream_DisposeAsync.cs @@ -16,7 +16,7 @@ static partial class Polyfill /// /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.stream.disposeasync")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.stream.disposeasync public static ValueTask DisposeAsync(this Stream target) { try diff --git a/src/Polyfill/Polyfill_String.cs b/src/Polyfill/Polyfill_String.cs index a598082c..cb18d2a0 100644 --- a/src/Polyfill/Polyfill_String.cs +++ b/src/Polyfill/Polyfill_String.cs @@ -15,7 +15,7 @@ static partial class Polyfill /// Copies the contents of this string into the destination span. /// /// The span into which to copy this string's contents - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.string.copyto")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.string.copyto public static void CopyTo(this string target, Span destination) => target.AsSpan().CopyTo(destination); @@ -24,7 +24,7 @@ public static void CopyTo(this string target, Span destination) => /// /// The span into which to copy this string's contents /// true if the data was copied; false if the destination was too short to fit the contents of the string. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.string.trycopyto")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.string.trycopyto public static bool TryCopyTo(this string target, Span destination) => target.AsSpan().TryCopyTo(destination); #endif @@ -36,7 +36,7 @@ public static bool TryCopyTo(this string target, Span destination) => /// /// One of the enumeration values that specifies the rules to use in the comparison. /// A 32-bit signed integer hash code. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.string.gethashcode#system-string-gethashcode(system-stringcomparison)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.string.gethashcode#system-string-gethashcode(system-stringcomparison) public static int GetHashCode(this string target, StringComparison comparisonType) => FromComparison(comparisonType).GetHashCode(target); @@ -58,7 +58,7 @@ static StringComparer FromComparison(StringComparison comparison) => /// The string to seek. /// One of the enumeration values that specifies the rules to use in the comparison. /// true if the value parameter occurs within this string, or if value is the empty string (""); otherwise, false. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.string.contains#system-string-contains(system-string-system-stringcomparison)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.string.contains#system-string-contains(system-string-system-stringcomparison) public static bool Contains(this string target, string value, StringComparison comparisonType) => target.IndexOf(value, comparisonType) >= 0; @@ -68,7 +68,7 @@ public static bool Contains(this string target, string value, StringComparison c /// The character to compare. /// This method performs an ordinal (case-sensitive and culture-insensitive) comparison. /// true if value matches the beginning of this string; otherwise, false. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.string.contains#system-string-contains(system-char)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.string.contains#system-string-contains(system-char) public static bool StartsWith(this string target, char value) { if (target.Length == 0) @@ -85,7 +85,7 @@ public static bool StartsWith(this string target, char value) /// The character to seek. /// This method performs an ordinal (case-sensitive and culture-insensitive) comparison. /// true if the value parameter occurs within this string; otherwise, false. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.string.contains#system-string-contains(system-char)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.string.contains#system-string-contains(system-char) public static bool EndsWith(this string target, char value) { if (target.Length == 0) @@ -107,7 +107,7 @@ public static bool EndsWith(this string target, char value) /// A bitwise combination of the enumeration values that specifies whether to trim substrings /// and include empty substrings. /// An array that contains at most count substrings from this instance that are delimited by separator. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.string.split#system-string-split(system-char-system-stringsplitoptions)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.string.split#system-string-split(system-char-system-stringsplitoptions) public static string[] Split(this string target, char separator, StringSplitOptions options = StringSplitOptions.None) => target.Split([separator], options); @@ -121,7 +121,7 @@ public static string[] Split(this string target, char separator, StringSplitOpti /// A bitwise combination of the enumeration values that specifies whether to trim substrings /// and include empty substrings. /// An array that contains at most count substrings from this instance that are delimited by separator. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.string.split#system-string-split(system-char-system-int32-system-stringsplitoptions)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.string.split#system-string-split(system-char-system-int32-system-stringsplitoptions) public static string[] Split(this string target, char separator, int count, StringSplitOptions options = StringSplitOptions.None) => target.Split([separator], count, options); #endif @@ -133,7 +133,7 @@ public static string[] Split(this string target, char separator, int count, Stri /// This method performs an ordinal (case-sensitive and culture-insensitive) comparison. /// The character to seek. /// true if the value parameter occurs within this string; otherwise, false. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.string.contains#system-string-contains(system-char)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.string.contains#system-string-contains(system-char) public static bool Contains(this string target, char value) => target.IndexOf(value) >= 0; #endif diff --git a/src/Polyfill/Polyfill_StringBuilder.cs b/src/Polyfill/Polyfill_StringBuilder.cs index 8b66698b..30f5e44c 100644 --- a/src/Polyfill/Polyfill_StringBuilder.cs +++ b/src/Polyfill/Polyfill_StringBuilder.cs @@ -21,7 +21,7 @@ static partial class Polyfill /// and span are equal. /// /// true if the characters in this instance and span are the same; otherwise, false. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.equals#system-text-stringbuilder-equals(system-readonlyspan((system-char)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.equals#system-text-stringbuilder-equals(system-readonlyspan((system-char))) public static bool Equals(this StringBuilder target, ReadOnlySpan span) { if (target.Length != span.Length) @@ -55,7 +55,7 @@ public static bool Equals(this StringBuilder target, ReadOnlySpan span) /// /// If is null, instances of are removed from this builder. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.replace#system-text-stringbuilder-replace(system-readonlyspan((system-char))-system-readonlyspan((system-char)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.replace#system-text-stringbuilder-replace(system-readonlyspan((system-char))-system-readonlyspan((system-char))) public static StringBuilder Replace(this StringBuilder target, ReadOnlySpan oldValue, ReadOnlySpan newValue) => target.Replace(oldValue.ToString(), newValue.ToString()); @@ -69,7 +69,7 @@ public static StringBuilder Replace(this StringBuilder target, ReadOnlySpan /// If is empty, instances of are removed from this builder. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.replace#system-text-stringbuilder-replace(system-char-system-char-system-int32-system-int32)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.replace#system-text-stringbuilder-replace(system-char-system-char-system-int32-system-int32) public static StringBuilder Replace(this StringBuilder target, ReadOnlySpan oldValue, ReadOnlySpan newValue, int startIndex, int count) => target.Replace(oldValue.ToString(), newValue.ToString(), startIndex, count); #endif diff --git a/src/Polyfill/Polyfill_StringBuilder_Append.cs b/src/Polyfill/Polyfill_StringBuilder_Append.cs index 782fd24b..8bfc2ed2 100644 --- a/src/Polyfill/Polyfill_StringBuilder_Append.cs +++ b/src/Polyfill/Polyfill_StringBuilder_Append.cs @@ -17,7 +17,7 @@ static partial class Polyfill /// /// The read-only character span to append. /// A reference to this instance after the append operation is completed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.append#system-text-stringbuilder-append(system-readonlyspan((system-char)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.append#system-text-stringbuilder-append(system-readonlyspan((system-char))) public static StringBuilder Append(this StringBuilder target, ReadOnlySpan value) { if (value.Length <= 0) @@ -45,7 +45,7 @@ public static StringBuilder Append(this StringBuilder target, ReadOnlySpan /// Appends the specified interpolated string to this instance. /// The interpolated string to append. /// A reference to this instance after the append operation has completed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.append#system-text-stringbuilder-append(system-text-stringbuilder-appendinterpolatedstringhandler@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.append#system-text-stringbuilder-append(system-text-stringbuilder-appendinterpolatedstringhandler@) public static StringBuilder Append( StringBuilder target, [InterpolatedStringHandlerArgument(nameof(target))] @@ -55,7 +55,7 @@ public static StringBuilder Append( /// An object that supplies culture-specific formatting information. /// The interpolated string to append. /// A reference to this instance after the append operation has completed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.append#system-text-stringbuilder-append(system-iformatprovider-system-text-stringbuilder-appendinterpolatedstringhandler@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.append#system-text-stringbuilder-append(system-iformatprovider-system-text-stringbuilder-appendinterpolatedstringhandler@) public static StringBuilder Append( StringBuilder target, IFormatProvider? provider, @@ -65,7 +65,7 @@ public static StringBuilder Append( /// Appends the specified interpolated string followed by the default line terminator to the end of the current StringBuilder object. /// The interpolated string to append. /// A reference to this instance after the append operation has completed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendline#system-text-stringbuilder-appendline(system-text-stringbuilder-appendinterpolatedstringhandler@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendline#system-text-stringbuilder-appendline(system-text-stringbuilder-appendinterpolatedstringhandler@) public static StringBuilder AppendLine( StringBuilder target, [InterpolatedStringHandlerArgument(nameof(target))] @@ -76,7 +76,7 @@ public static StringBuilder AppendLine( /// An object that supplies culture-specific formatting information. /// The interpolated string to append. /// A reference to this instance after the append operation has completed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendline#system-text-stringbuilder-appendline(system-iformatprovider-system-text-stringbuilder-appendinterpolatedstringhandler@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendline#system-text-stringbuilder-appendline(system-iformatprovider-system-text-stringbuilder-appendinterpolatedstringhandler@) public static StringBuilder AppendLine( StringBuilder target, IFormatProvider? provider, @@ -89,7 +89,7 @@ public static StringBuilder AppendLine( /// Appends the specified interpolated string to this instance. /// The interpolated string to append. /// A reference to this instance after the append operation has completed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.append#system-text-stringbuilder-append(system-text-stringbuilder-appendinterpolatedstringhandler@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.append#system-text-stringbuilder-append(system-text-stringbuilder-appendinterpolatedstringhandler@) public static StringBuilder Append( StringBuilder target, [InterpolatedStringHandlerArgument(nameof(target))] ref StringBuilder.AppendInterpolatedStringHandler handler) => @@ -99,7 +99,7 @@ public static StringBuilder Append( /// An object that supplies culture-specific formatting information. /// The interpolated string to append. /// A reference to this instance after the append operation has completed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.append#system-text-stringbuilder-append(system-iformatprovider-system-text-stringbuilder-appendinterpolatedstringhandler@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.append#system-text-stringbuilder-append(system-iformatprovider-system-text-stringbuilder-appendinterpolatedstringhandler@) public static StringBuilder Append( StringBuilder target, IFormatProvider? provider, @@ -109,7 +109,7 @@ public static StringBuilder Append( /// Appends the specified interpolated string followed by the default line terminator to the end of the current StringBuilder object. /// The interpolated string to append. /// A reference to this instance after the append operation has completed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendline#system-text-stringbuilder-appendline(system-text-stringbuilder-appendinterpolatedstringhandler@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendline#system-text-stringbuilder-appendline(system-text-stringbuilder-appendinterpolatedstringhandler@) public static StringBuilder AppendLine( StringBuilder target, [InterpolatedStringHandlerArgument(nameof(target))] ref StringBuilder.AppendInterpolatedStringHandler handler) => @@ -119,7 +119,7 @@ public static StringBuilder AppendLine( /// An object that supplies culture-specific formatting information. /// The interpolated string to append. /// A reference to this instance after the append operation has completed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendline#system-text-stringbuilder-appendline(system-iformatprovider-system-text-stringbuilder-appendinterpolatedstringhandler@)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendline#system-text-stringbuilder-appendline(system-iformatprovider-system-text-stringbuilder-appendinterpolatedstringhandler@) public static StringBuilder AppendLine( StringBuilder target, IFormatProvider? provider, diff --git a/src/Polyfill/Polyfill_StringBuilder_AppendJoin.cs b/src/Polyfill/Polyfill_StringBuilder_AppendJoin.cs index 76be3556..324905e5 100644 --- a/src/Polyfill/Polyfill_StringBuilder_AppendJoin.cs +++ b/src/Polyfill/Polyfill_StringBuilder_AppendJoin.cs @@ -16,7 +16,7 @@ static partial class Polyfill /// The string to use as a separator. separator is included in the joined strings only if values has more than one element. /// An array that contains the strings to concatenate and append to the current instance of the string builder. /// A reference to this instance after the append operation has completed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendjoin#system-text-stringbuilder-appendjoin(system-string-system-string())")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendjoin#system-text-stringbuilder-appendjoin(system-string-system-string()) public static StringBuilder AppendJoin( this StringBuilder target, string separator, @@ -27,7 +27,7 @@ public static StringBuilder AppendJoin( /// The string to use as a separator. separator is included in the joined strings only if values has more than one element. /// An array that contains the strings to concatenate and append to the current instance of the string builder. /// A reference to this instance after the append operation has completed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendjoin#system-text-stringbuilder-appendjoin(system-string-system-object())")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendjoin#system-text-stringbuilder-appendjoin(system-string-system-object()) public static StringBuilder AppendJoin( this StringBuilder target, string separator, @@ -38,7 +38,7 @@ public static StringBuilder AppendJoin( /// The character to use as a separator. separator is included in the joined strings only if values has more than one element. /// An array that contains the strings to concatenate and append to the current instance of the string builder. /// A reference to this instance after the append operation has completed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendjoin#system-text-stringbuilder-appendjoin(system-char-system-string())")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendjoin#system-text-stringbuilder-appendjoin(system-char-system-string()) public static StringBuilder AppendJoin( this StringBuilder target, char separator, @@ -49,7 +49,7 @@ public static StringBuilder AppendJoin( /// The character to use as a separator. separator is included in the joined strings only if values has more than one element. /// An array that contains the strings to concatenate and append to the current instance of the string builder. /// A reference to this instance after the append operation has completed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendjoin#system-text-stringbuilder-appendjoin(system-char-system-object())")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendjoin#system-text-stringbuilder-appendjoin(system-char-system-object()) public static StringBuilder AppendJoin( this StringBuilder target, char separator, @@ -60,7 +60,7 @@ public static StringBuilder AppendJoin( /// The character to use as a separator. separator is included in the joined strings only if values has more than one element. /// A collection that contains the objects to concatenate and append to the current instance of the string builder. /// A reference to this instance after the append operation has completed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendjoin#system-text-stringbuilder-appendjoin-1(system-char-system-collections-generic-ienumerable((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendjoin#system-text-stringbuilder-appendjoin-1(system-char-system-collections-generic-ienumerable((-0))) public static StringBuilder AppendJoin( this StringBuilder target, char separator, @@ -71,7 +71,7 @@ public static StringBuilder AppendJoin( /// The string to use as a separator. separator is included in the concatenated and appended strings only if values has more than one element. /// A collection that contains the objects to concatenate and append to the current instance of the string builder. /// A reference to this instance after the append operation has completed. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendjoin#system-text-stringbuilder-appendjoin-1(system-string-system-collections-generic-ienumerable((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendjoin#system-text-stringbuilder-appendjoin-1(system-string-system-collections-generic-ienumerable((-0))) public static StringBuilder AppendJoin( this StringBuilder target, string separator, diff --git a/src/Polyfill/Polyfill_StringBuilder_CopyTo.cs b/src/Polyfill/Polyfill_StringBuilder_CopyTo.cs index 3106adbb..a89a149e 100644 --- a/src/Polyfill/Polyfill_StringBuilder_CopyTo.cs +++ b/src/Polyfill/Polyfill_StringBuilder_CopyTo.cs @@ -17,7 +17,7 @@ static partial class Polyfill /// The starting position in this instance where characters will be copied from. The index is zero-based. /// The writable span where characters will be copied. /// The number of characters to be copied. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.copyto#system-text-stringbuilder-copyto(system-int32-system-span((system-char))-system-int32)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.copyto#system-text-stringbuilder-copyto(system-int32-system-span((system-char))-system-int32) public static void CopyTo( this StringBuilder target, int sourceIndex, diff --git a/src/Polyfill/Polyfill_StringBuilder_GetChunks.cs b/src/Polyfill/Polyfill_StringBuilder_GetChunks.cs index 69768eda..92aa369f 100644 --- a/src/Polyfill/Polyfill_StringBuilder_GetChunks.cs +++ b/src/Polyfill/Polyfill_StringBuilder_GetChunks.cs @@ -64,7 +64,7 @@ static char[] GetChunkChars(StringBuilder stringBuilder) => /// { /* operation on span[i] */ } /// } /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.getchunks")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.getchunks public static ChunkEnumerator GetChunks(this StringBuilder target) => new(target); diff --git a/src/Polyfill/Polyfill_Task.cs b/src/Polyfill/Polyfill_Task.cs index bf5a7a43..400b5a9f 100644 --- a/src/Polyfill/Polyfill_Task.cs +++ b/src/Polyfill/Polyfill_Task.cs @@ -18,14 +18,14 @@ static partial class Polyfill /// Gets a that will complete when this completes or when the specified has cancellation requested. /// The to monitor for a cancellation request. /// The representing the asynchronous wait. It may or may not be the same instance as the current instance. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.waitasync#system-threading-tasks-task-waitasync(system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.waitasync#system-threading-tasks-task-waitasync(system-threading-cancellationtoken) public static Task WaitAsync(this Task target, CancellationToken cancellationToken) => target.WaitAsync(Timeout.InfiniteTimeSpan, cancellationToken); /// Gets a that will complete when this completes or when the specified timeout expires. /// The timeout after which the should be faulted with a if it hasn't otherwise completed. /// The representing the asynchronous wait. It may or may not be the same instance as the current instance. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.waitasync#system-threading-tasks-task-waitasync(system-timespan)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.waitasync#system-threading-tasks-task-waitasync(system-timespan) public static Task WaitAsync( this Task target, TimeSpan timeout) => @@ -35,7 +35,7 @@ public static Task WaitAsync( /// The timeout after which the should be faulted with a if it hasn't otherwise completed. /// The to monitor for a cancellation request. /// The representing the asynchronous wait. It may or may not be the same instance as the current instance. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.waitasync#system-threading-tasks-task-waitasync(system-timespan-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.waitasync#system-threading-tasks-task-waitasync(system-timespan-system-threading-cancellationtoken) public static Task WaitAsync( this Task target, TimeSpan timeout, @@ -91,7 +91,7 @@ public static Task WaitAsync( /// /// The to monitor for a cancellation request. /// The representing the asynchronous wait. It may or may not be the same instance as the current instance. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.waitasync#system-threading-tasks-task-waitasync(system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.waitasync#system-threading-tasks-task-waitasync(system-threading-cancellationtoken) public static Task WaitAsync( this Task target, CancellationToken cancellationToken) => @@ -102,7 +102,7 @@ public static Task WaitAsync( /// /// The timeout after which the should be faulted with a if it hasn't otherwise completed. /// The representing the asynchronous wait. It may or may not be the same instance as the current instance. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1.waitasync#system-threading-tasks-task-1-waitasync(system-timespan)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1.waitasync#system-threading-tasks-task-1-waitasync(system-timespan) public static Task WaitAsync( this Task target, TimeSpan timeout) => @@ -114,7 +114,7 @@ public static Task WaitAsync( /// The timeout after which the should be faulted with a if it hasn't otherwise completed. /// The to monitor for a cancellation request. /// The representing the asynchronous wait. It may or may not be the same instance as the current instance. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1.waitasync#system-threading-tasks-task-1-waitasync(system-timespan-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1.waitasync#system-threading-tasks-task-1-waitasync(system-timespan-system-threading-cancellationtoken) public static async Task WaitAsync( this Task target, TimeSpan timeout, diff --git a/src/Polyfill/Polyfill_TaskCompletionSource.cs b/src/Polyfill/Polyfill_TaskCompletionSource.cs index 5d9ad922..86c4139c 100644 --- a/src/Polyfill/Polyfill_TaskCompletionSource.cs +++ b/src/Polyfill/Polyfill_TaskCompletionSource.cs @@ -23,7 +23,7 @@ static partial class Polyfill /// , or /// . /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.taskcompletionsource-1.setcanceled#system-threading-tasks-taskcompletionsource-1-setcanceled(system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.taskcompletionsource-1.setcanceled#system-threading-tasks-taskcompletionsource-1-setcanceled(system-threading-cancellationtoken) public static void SetCanceled( this TaskCompletionSource target, CancellationToken cancellationToken) diff --git a/src/Polyfill/Polyfill_TextReader.cs b/src/Polyfill/Polyfill_TextReader.cs index 81a81bf6..e7f7d303 100644 --- a/src/Polyfill/Polyfill_TextReader.cs +++ b/src/Polyfill/Polyfill_TextReader.cs @@ -29,7 +29,7 @@ static partial class Polyfill /// The number will be less than or equal to the length, depending on whether the data is /// available within the stream. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.textreader.readasync#system-io-textreader-readasync(system-memory((system-char))-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.textreader.readasync#system-io-textreader-readasync(system-memory((system-char))-system-threading-cancellationtoken) public static ValueTask ReadAsync( this TextReader target, Memory buffer, @@ -58,7 +58,7 @@ public static ValueTask ReadAsync( /// The number of characters is larger than . /// The stream reader has been disposed. /// The reader is currently in use by a previous read operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.textreader.readtoendasync#system-io-textreader-readtoendasync(system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.textreader.readtoendasync#system-io-textreader-readtoendasync(system-threading-cancellationtoken) public static Task ReadToEndAsync( this TextReader target, CancellationToken cancellationToken) @@ -78,7 +78,7 @@ public static Task ReadToEndAsync( /// The number of characters in the next line is larger than . /// The text reader has been disposed. /// The reader is currently in use by a previous read operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.textreader.readtoendasync#system-io-textreader-readlineasync(system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.textreader.readtoendasync#system-io-textreader-readlineasync(system-threading-cancellationtoken) public static Task ReadLineAsync( this TextReader target, CancellationToken cancellationToken) diff --git a/src/Polyfill/Polyfill_TextWriter.cs b/src/Polyfill/Polyfill_TextWriter.cs index 07ad6587..ab8a9546 100644 --- a/src/Polyfill/Polyfill_TextWriter.cs +++ b/src/Polyfill/Polyfill_TextWriter.cs @@ -28,7 +28,7 @@ static partial class Polyfill /// A that represents the asynchronous flush operation. /// The text writer is disposed. /// The writer is currently in use by a previous write operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.flushasync#system-io-textwriter-flushasync(system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.flushasync#system-io-textwriter-flushasync(system-threading-cancellationtoken) public static Task FlushAsync(this TextWriter target, CancellationToken cancellationToken) { if (cancellationToken.IsCancellationRequested) @@ -48,7 +48,7 @@ public static Task FlushAsync(this TextWriter target, CancellationToken cancella /// StringBuilder.GetChunks() method to avoid creating the intermediate string /// /// The string (as a StringBuilder) to write to the stream - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.write#system-io-textwriter-write(system-text-stringbuilder)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.write#system-io-textwriter-write(system-text-stringbuilder) public static void Write(this TextWriter target, StringBuilder? value) { if (value == null) @@ -72,7 +72,7 @@ public static void Write(this TextWriter target, StringBuilder? value) /// /// The string (as a StringBuilder) to write to the stream /// The token to monitor for cancellation requests. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.writeasync#system-io-textwriter-writeasync(system-readonlymemory((system-char))-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.writeasync#system-io-textwriter-writeasync(system-readonlymemory((system-char))-system-threading-cancellationtoken) public static Task WriteAsync(this TextWriter target, StringBuilder? value, CancellationToken cancellationToken = default) { if (cancellationToken.IsCancellationRequested) @@ -114,7 +114,7 @@ await target.WriteAsync(builder.ToString()) /// The default value is . /// /// A task that represents the asynchronous write operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.writeasync#system-io-textwriter-writeasync(system-readonlymemory((system-char))-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.writeasync#system-io-textwriter-writeasync(system-readonlymemory((system-char))-system-threading-cancellationtoken) public static ValueTask WriteAsync( this TextWriter target, ReadOnlyMemory buffer, @@ -142,7 +142,7 @@ public static ValueTask WriteAsync( /// The default value is . /// /// A task that represents the asynchronous write operation. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.writelineasync#system-io-textwriter-writelineasync(system-readonlymemory((system-char))-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.writelineasync#system-io-textwriter-writelineasync(system-readonlymemory((system-char))-system-threading-cancellationtoken) public static ValueTask WriteLineAsync( this TextWriter target, ReadOnlyMemory buffer, @@ -167,7 +167,7 @@ public static ValueTask WriteLineAsync( /// Writes a character span to the text stream. /// /// The character span to write. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.write#system-io-textwriter-write(system-readonlyspan((system-char)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.write#system-io-textwriter-write(system-readonlyspan((system-char))) public static void Write( this TextWriter target, ReadOnlySpan buffer) @@ -190,7 +190,7 @@ public static void Write( /// Writes the text representation of a character span to the text stream, followed by a line terminator. /// /// The char span value to write to the text stream. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.writeline#system-io-textwriter-writeline(system-readonlyspan((system-char)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter.writeline#system-io-textwriter-writeline(system-readonlyspan((system-char))) public static void WriteLine( this TextWriter target, ReadOnlySpan buffer) diff --git a/src/Polyfill/Polyfill_TryFormat.cs b/src/Polyfill/Polyfill_TryFormat.cs index 9b3f524f..b34708dc 100644 --- a/src/Polyfill/Polyfill_TryFormat.cs +++ b/src/Polyfill/Polyfill_TryFormat.cs @@ -13,7 +13,7 @@ static partial class Polyfill /// /// Tries to format the value of the current instance as UTF-8 into the provided span of bytes. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.timespan.tryformat#system-timespan-tryformat(system-span((system-byte))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.timespan.tryformat#system-timespan-tryformat(system-span((system-byte))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider) public static bool TryFormat(this TimeSpan target, Span destination, out int charsWritten, ReadOnlySpan format = default, IFormatProvider? formatProvider = null) { string result; @@ -33,7 +33,7 @@ public static bool TryFormat(this TimeSpan target, Span destination, out i /// /// Tries to format the value of the current instance as UTF-8 into the provided span of bytes. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.guid.tryformat#system-guid-tryformat(system-span((system-char))-system-int32@-system-readonlyspan((system-char)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.guid.tryformat#system-guid-tryformat(system-span((system-char))-system-int32@-system-readonlyspan((system-char))) public static bool TryFormat(this Guid target, Span destination, out int charsWritten, ReadOnlySpan format = default) { string result; @@ -53,7 +53,7 @@ public static bool TryFormat(this Guid target, Span destination, out int c /// /// Tries to format the value of the current instance into the provided span of characters. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.tryformat")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.tryformat public static bool TryFormat( this sbyte target, Span destination, out int charsWritten, ReadOnlySpan format = default, IFormatProvider? provider = default) { @@ -74,7 +74,7 @@ public static bool TryFormat( /// /// Tries to format the value of the current instance into the provided span of characters. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.byte.tryformat")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.byte.tryformat public static bool TryFormat(this byte target, Span destination, out int charsWritten, ReadOnlySpan format = default, IFormatProvider? provider = default) { string result; @@ -94,7 +94,7 @@ public static bool TryFormat(this byte target, Span destination, out int c /// /// Tries to format the value of the current instance into the provided span of characters. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int16.tryformat")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int16.tryformat public static bool TryFormat(this short target, Span destination, out int charsWritten, ReadOnlySpan format = default, IFormatProvider? provider = default) { string result; @@ -114,7 +114,7 @@ public static bool TryFormat(this short target, Span destination, out int /// /// Tries to format the value of the current instance into the provided span of characters. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint16.tryformat")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint16.tryformat public static bool TryFormat(this ushort target, Span destination, out int charsWritten, ReadOnlySpan format = default, IFormatProvider? provider = default) { string result; @@ -134,7 +134,7 @@ public static bool TryFormat(this ushort target, Span destination, out int /// /// Tries to format the value of the current instance into the provided span of characters. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryformat")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryformat public static bool TryFormat(this int target, Span destination, out int charsWritten, ReadOnlySpan format = default, IFormatProvider? provider = default) { string result; @@ -154,7 +154,7 @@ public static bool TryFormat(this int target, Span destination, out int ch /// /// Tries to format the value of the current instance into the provided span of characters. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryformat")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryformat public static bool TryFormat(this uint target, Span destination, out int charsWritten, ReadOnlySpan format = default, IFormatProvider? provider = default) { string result; @@ -174,7 +174,7 @@ public static bool TryFormat(this uint target, Span destination, out int c /// /// Tries to format the value of the current instance into the provided span of characters. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.int64.tryformat")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.int64.tryformat public static bool TryFormat(this long target, Span destination, out int charsWritten, ReadOnlySpan format = default, IFormatProvider? provider = default) { string result; @@ -194,7 +194,7 @@ public static bool TryFormat(this long target, Span destination, out int c /// /// Tries to format the value of the current instance into the provided span of characters. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryformat")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryformat public static bool TryFormat(this ulong target, Span destination, out int charsWritten, ReadOnlySpan format = default, IFormatProvider? provider = default) { string result; @@ -214,7 +214,7 @@ public static bool TryFormat(this ulong target, Span destination, out int /// /// Tries to format the value of the current instance into the provided span of characters. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.single.tryformat")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.single.tryformat public static bool TryFormat(this float target, Span destination, out int charsWritten, ReadOnlySpan format = default, IFormatProvider? provider = default) { string result; @@ -234,7 +234,7 @@ public static bool TryFormat(this float target, Span destination, out int /// /// Tries to format the value of the current instance into the provided span of characters. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.double.tryformat")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.double.tryformat public static bool TryFormat(this double target, Span destination, out int charsWritten, ReadOnlySpan format = default, IFormatProvider? provider = default) { string result; @@ -254,7 +254,7 @@ public static bool TryFormat(this double target, Span destination, out int /// /// Tries to format the value of the current instance into the provided span of characters. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.decimal.tryformat")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.decimal.tryformat public static bool TryFormat(this decimal target, Span destination, out int charsWritten, ReadOnlySpan format = default, IFormatProvider? provider = default) { string result; @@ -274,7 +274,7 @@ public static bool TryFormat(this decimal target, Span destination, out in /// /// Tries to format the value of the current instance into the provided span of characters. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.boolean.tryformat")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.boolean.tryformat public static bool TryFormat(this bool target, Span destination, out int charsWritten) { var result = target.ToString(); @@ -286,7 +286,7 @@ public static bool TryFormat(this bool target, Span destination, out int c /// /// Tries to format the value of the current instance into the provided span of characters. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryformat")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryformat public static bool TryFormat(this DateTimeOffset target, Span destination, out int charsWritten, ReadOnlySpan format = default, IFormatProvider? provider = default) { string result; @@ -306,7 +306,7 @@ public static bool TryFormat(this DateTimeOffset target, Span destination, /// /// Tries to format the value of the current instance into the provided span of characters. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryformat")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryformat public static bool TryFormat(this DateTime target, Span destination, out int charsWritten, ReadOnlySpan format = default, IFormatProvider? provider = default) { string result; @@ -329,7 +329,7 @@ public static bool TryFormat(this DateTime target, Span destination, out i /// /// Tries to format the value of the current instance into the provided span of characters. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.dateonly.tryformat")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.dateonly.tryformat public static bool TryFormat(this DateOnly target, Span destination, out int charsWritten, ReadOnlySpan format = default, IFormatProvider? provider = default) { string result; @@ -349,7 +349,7 @@ public static bool TryFormat(this DateOnly target, Span destination, out i /// /// Tries to format the value of the current instance into the provided span of characters. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.timeonly.tryformat")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.timeonly.tryformat public static bool TryFormat(this TimeOnly target, Span destination, out int charsWritten, ReadOnlySpan format = default, IFormatProvider? provider = default) { string result; diff --git a/src/Polyfill/Polyfill_Type.cs b/src/Polyfill/Polyfill_Type.cs index e1f7b742..4ab50cff 100644 --- a/src/Polyfill/Polyfill_Type.cs +++ b/src/Polyfill/Polyfill_Type.cs @@ -14,15 +14,15 @@ namespace Polyfills; static partial class Polyfill { #if NETFRAMEWORK || NETSTANDARD2_0 || NETCOREAPP2_0 - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.reflection.memberinfo.hassamemetadatadefinitionas")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.reflection.memberinfo.hassamemetadatadefinitionas public static bool HasSameMetadataDefinitionAs(this MemberInfo target, MemberInfo other) => target.MetadataToken == other.MetadataToken && target.Module.Equals(other.Module); #endif #if !NET9_0_OR_GREATER && !NETFRAMEWORK && !NETSTANDARD2_0 && !NETCOREAPP2_0 + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.type.getmethod#system-type-getmethod(system-string-system-int32-system-reflection-bindingflags-system-type()) [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.type.getmethod#system-type-getmethod(system-string-system-int32-system-reflection-bindingflags-system-type())")] public static MethodInfo? GetMethod(this Type target, string name, int genericParameterCount, BindingFlags bindingAttr, Type[] types) => target.GetMethod(name, genericParameterCount, bindingAttr, null, types, null); #endif @@ -30,7 +30,7 @@ public static bool HasSameMetadataDefinitionAs(this MemberInfo target, MemberInf /// /// Gets a value that indicates whether the current Type represents a type parameter in the definition of a generic method. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.type.isgenericmethodparameter")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.type.isgenericmethodparameter public static bool IsGenericMethodParameter(this Type target) => #if NETFRAMEWORK || NETSTANDARD2_0 || NETCOREAPP2_0 target.IsGenericParameter && @@ -55,7 +55,7 @@ public static bool IsAssignableFrom(this Type target) => /// /// Determines whether the current type can be assigned to a variable of the specified targetType. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.type.isassignableto")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.type.isassignableto public static bool IsAssignableTo(this Type target, [NotNullWhen(true)] Type? targetType) => targetType?.IsAssignableFrom(target) ?? false; #endif @@ -68,7 +68,7 @@ public static bool IsAssignableTo(this Type target, [NotNullWhen(true)] Type? ta /// The MemberInfo to find on the current Type. /// The MemberInfo to find on the current Type. /// An object representing the member on the current Type that matches the specified member. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.type.getmemberwithsamemetadatadefinitionas")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.type.getmemberwithsamemetadatadefinitionas internal static MemberInfo GetMemberWithSameMetadataDefinitionAs( this Type type, MemberInfo member) diff --git a/src/Polyfill/Polyfill_XDocument.cs b/src/Polyfill/Polyfill_XDocument.cs index 913fc5be..5a18e21a 100644 --- a/src/Polyfill/Polyfill_XDocument.cs +++ b/src/Polyfill/Polyfill_XDocument.cs @@ -23,7 +23,7 @@ static partial class Polyfill /// /// A cancellation token. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.xml.linq.xdocument.saveasync#system-xml-linq-xdocument-saveasync(system-xml-xmlwriter-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.xml.linq.xdocument.saveasync#system-xml-linq-xdocument-saveasync(system-xml-xmlwriter-system-threading-cancellationtoken) public static Task SaveAsync( this XDocument target, XmlWriter writer, @@ -45,7 +45,7 @@ public static Task SaveAsync( /// If SaveOptions.OmitDuplicateNamespaces is enabled duplicate namespace declarations will be removed. /// /// A cancellation token. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.xml.linq.xdocument.saveasync#system-xml-linq-xdocument-saveasync(system-io-stream-system-xml-linq-saveoptions-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.xml.linq.xdocument.saveasync#system-xml-linq-xdocument-saveasync(system-io-stream-system-xml-linq-saveoptions-system-threading-cancellationtoken) public static Task SaveAsync( this XDocument target, Stream stream, @@ -68,7 +68,7 @@ public static Task SaveAsync( /// If SaveOptions.OmitDuplicateNamespaces is enabled duplicate namespace declarations will be removed. /// /// A cancellation token. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.xml.linq.xdocument.saveasync#system-xml-linq-xdocument-saveasync(system-io-textwriter-system-xml-linq-saveoptions-system-threading-cancellationtoken)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.xml.linq.xdocument.saveasync#system-xml-linq-xdocument-saveasync(system-io-textwriter-system-xml-linq-saveoptions-system-threading-cancellationtoken) public static Task SaveAsync( this XDocument target, TextWriter textWriter, diff --git a/src/Polyfill/Regex/Polyfill_Regex.cs b/src/Polyfill/Regex/Polyfill_Regex.cs index 873ae0dc..84d4dde5 100644 --- a/src/Polyfill/Regex/Polyfill_Regex.cs +++ b/src/Polyfill/Regex/Polyfill_Regex.cs @@ -15,7 +15,7 @@ static partial class Polyfill /// Indicates whether the regular expression specified in the Regex constructor finds a match in a specified input span. /// /// true if the regular expression finds a match; otherwise, false. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.ismatch#system-text-regularexpressions-regex-ismatch(system-readonlyspan((system-char))-system-int32)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.ismatch#system-text-regularexpressions-regex-ismatch(system-readonlyspan((system-char))-system-int32) public static bool IsMatch(this Regex target, ReadOnlySpan input, int startat) => target.IsMatch(input.ToString(), startat); @@ -23,7 +23,7 @@ public static bool IsMatch(this Regex target, ReadOnlySpan input, int star /// Indicates whether the regular expression specified in the Regex constructor finds a match in a specified input span. /// /// true if the regular expression finds a match; otherwise, false. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.ismatch#system-text-regularexpressions-regex-ismatch(system-readonlyspan((system-char)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.ismatch#system-text-regularexpressions-regex-ismatch(system-readonlyspan((system-char))) public static bool IsMatch(this Regex target, ReadOnlySpan input) => target.IsMatch(input.ToString()); @@ -31,7 +31,7 @@ public static bool IsMatch(this Regex target, ReadOnlySpan input) => /// Searches an input span for all occurrences of a regular expression and returns a Regex.ValueMatchEnumerator to iterate over the matches. /// /// A Regex.ValueMatchEnumerator to iterate over the matches. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.enumeratematches#system-text-regularexpressions-regex-enumeratematches(system-readonlyspan((system-char)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.enumeratematches#system-text-regularexpressions-regex-enumeratematches(system-readonlyspan((system-char))) public static ValueMatchEnumerator EnumerateMatches (this Regex target, ReadOnlySpan input) => new(target, input, target.RightToLeft ? input.Length : 0); @@ -39,7 +39,7 @@ public static ValueMatchEnumerator EnumerateMatches (this Regex target, ReadOnly /// Searches an input span for all occurrences of a regular expression and returns a Regex.ValueMatchEnumerator to iterate over the matches. /// /// A Regex.ValueMatchEnumerator to iterate over the matches. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.enumeratematches#system-text-regularexpressions-regex-enumeratematches(system-readonlyspan((system-char))-system-int32)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.enumeratematches#system-text-regularexpressions-regex-enumeratematches(system-readonlyspan((system-char))-system-int32) public static ValueMatchEnumerator EnumerateMatches (this Regex target, ReadOnlySpan input, int startat) => new(target, input, startat); } diff --git a/src/Polyfill/Regex/RegexPolyfill.cs b/src/Polyfill/Regex/RegexPolyfill.cs index 6e59d5d8..23e1a7b5 100644 --- a/src/Polyfill/Regex/RegexPolyfill.cs +++ b/src/Polyfill/Regex/RegexPolyfill.cs @@ -29,7 +29,7 @@ static class RegexPolyfill /// Indicates whether the specified regular expression finds a match in the specified input span, using the specified matching options and time-out interval. /// /// true if the regular expression finds a match; otherwise, false. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.ismatch#system-text-regularexpressions-regex-ismatch(system-readonlyspan((system-char))-system-string-system-text-regularexpressions-regexoptions-system-timespan)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.ismatch#system-text-regularexpressions-regex-ismatch(system-readonlyspan((system-char))-system-string-system-text-regularexpressions-regexoptions-system-timespan) public static bool IsMatch(ReadOnlySpan input, string pattern, RegexOptions options, TimeSpan timeout) { #if NET7_0_OR_GREATER @@ -43,7 +43,7 @@ public static bool IsMatch(ReadOnlySpan input, string pattern, RegexOption /// Indicates whether the specified regular expression finds a match in the specified input span, using the specified matching options. /// /// true if the regular expression finds a match; otherwise, false. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.ismatch#system-text-regularexpressions-regex-ismatch(system-readonlyspan((system-char))-system-string-system-text-regularexpressions-regexoptions)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.ismatch#system-text-regularexpressions-regex-ismatch(system-readonlyspan((system-char))-system-string-system-text-regularexpressions-regexoptions) public static bool IsMatch(ReadOnlySpan input, string pattern, RegexOptions options) { #if NET7_0_OR_GREATER @@ -57,7 +57,7 @@ public static bool IsMatch(ReadOnlySpan input, string pattern, RegexOption /// Indicates whether the specified regular expression finds a match in the specified input span. /// /// true if the regular expression finds a match; otherwise, false. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.ismatch#system-text-regularexpressions-regex-ismatch(system-readonlyspan((system-char))-system-string)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.ismatch#system-text-regularexpressions-regex-ismatch(system-readonlyspan((system-char))-system-string) public static bool IsMatch(ReadOnlySpan input, string pattern) { #if NET7_0_OR_GREATER @@ -71,7 +71,7 @@ public static bool IsMatch(ReadOnlySpan input, string pattern) /// Searches an input span for all occurrences of a regular expression and returns a Regex.ValueMatchEnumerator to iterate over the matches. /// /// A Regex.ValueMatchEnumerator to iterate over the matches. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.enumeratematches#system-text-regularexpressions-regex-enumeratematches(system-readonlyspan((system-char))-system-string)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.enumeratematches#system-text-regularexpressions-regex-enumeratematches(system-readonlyspan((system-char))-system-string) public static ValueMatchEnumerator EnumerateMatches(ReadOnlySpan input, string pattern) { #if NET7_0_OR_GREATER @@ -85,7 +85,7 @@ public static ValueMatchEnumerator EnumerateMatches(ReadOnlySpan input, st /// Searches an input span for all occurrences of a regular expression and returns a Regex.ValueMatchEnumerator to iterate over the matches. /// /// A Regex.ValueMatchEnumerator to iterate over the matches. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.enumeratematches#system-text-regularexpressions-regex-enumeratematches(system-readonlyspan((system-char))-system-string-system-text-regularexpressions-regexoptions-system-timespan)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.enumeratematches#system-text-regularexpressions-regex-enumeratematches(system-readonlyspan((system-char))-system-string-system-text-regularexpressions-regexoptions-system-timespan) public static ValueMatchEnumerator EnumerateMatches(ReadOnlySpan input, string pattern, RegexOptions options, TimeSpan timeout) { #if NET7_0_OR_GREATER @@ -99,7 +99,7 @@ public static ValueMatchEnumerator EnumerateMatches(ReadOnlySpan input, st /// Searches an input span for all occurrences of a regular expression and returns a Regex.ValueMatchEnumerator to iterate over the matches. /// /// A Regex.ValueMatchEnumerator to iterate over the matches. - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.enumeratematches#system-text-regularexpressions-regex-enumeratematches(system-readonlyspan((system-char))-system-string-system-text-regularexpressions-regexoptions)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.enumeratematches#system-text-regularexpressions-regex-enumeratematches(system-readonlyspan((system-char))-system-string-system-text-regularexpressions-regexoptions) public static ValueMatchEnumerator EnumerateMatches(ReadOnlySpan input, string pattern, RegexOptions options) { #if NET7_0_OR_GREATER diff --git a/src/Polyfill/RequiresPreviewFeaturesAttribute .cs b/src/Polyfill/RequiresPreviewFeaturesAttribute .cs index 0aee690a..1e83fb8c 100644 --- a/src/Polyfill/RequiresPreviewFeaturesAttribute .cs +++ b/src/Polyfill/RequiresPreviewFeaturesAttribute .cs @@ -26,7 +26,7 @@ namespace System.Runtime.Versioning; Inherited = false)] [ExcludeFromCodeCoverage] [DebuggerNonUserCode] -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.runtime.versioning.requirespreviewfeaturesattribute")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.runtime.versioning.requirespreviewfeaturesattribute #if PolyPublic public #endif diff --git a/src/Polyfill/SpanLineEnumerator.cs b/src/Polyfill/SpanLineEnumerator.cs index 8b54fae7..0d18e997 100644 --- a/src/Polyfill/SpanLineEnumerator.cs +++ b/src/Polyfill/SpanLineEnumerator.cs @@ -19,7 +19,7 @@ namespace System.Text; /// [ExcludeFromCodeCoverage] [DebuggerNonUserCode] -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.text.spanlineenumerator")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.spanlineenumerator #if PolyPublic public #endif diff --git a/src/Polyfill/StringInterpolation/DefaultInterpolatedStringHandler.cs b/src/Polyfill/StringInterpolation/DefaultInterpolatedStringHandler.cs index a3120aa0..8a932376 100644 --- a/src/Polyfill/StringInterpolation/DefaultInterpolatedStringHandler.cs +++ b/src/Polyfill/StringInterpolation/DefaultInterpolatedStringHandler.cs @@ -18,7 +18,7 @@ namespace System.Runtime.CompilerServices; [InterpolatedStringHandler] [ExcludeFromCodeCoverage] [DebuggerNonUserCode] -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.defaultinterpolatedstringhandler")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.defaultinterpolatedstringhandler #if PolyPublic public #endif diff --git a/src/Polyfill/StringInterpolation/ISpanFormattable.cs b/src/Polyfill/StringInterpolation/ISpanFormattable.cs index 3afbf9ca..3ccdd50c 100644 --- a/src/Polyfill/StringInterpolation/ISpanFormattable.cs +++ b/src/Polyfill/StringInterpolation/ISpanFormattable.cs @@ -10,7 +10,7 @@ namespace System; /// Provides functionality to format the string representation of an object into a span. -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.ispanformattable")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.ispanformattable #if PolyPublic public #endif diff --git a/src/Polyfill/StringInterpolation/InterpolatedStringHandlerArgumentAttribute.cs b/src/Polyfill/StringInterpolation/InterpolatedStringHandlerArgumentAttribute.cs index 795c2ada..26740af6 100644 --- a/src/Polyfill/StringInterpolation/InterpolatedStringHandlerArgumentAttribute.cs +++ b/src/Polyfill/StringInterpolation/InterpolatedStringHandlerArgumentAttribute.cs @@ -15,7 +15,7 @@ namespace System.Runtime.CompilerServices; [ExcludeFromCodeCoverage] [DebuggerNonUserCode] [AttributeUsage(AttributeTargets.Parameter)] -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.interpolatedstringhandlerargumentattribute")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.interpolatedstringhandlerargumentattribute #if PolyPublic public #endif diff --git a/src/Polyfill/StringInterpolation/InterpolatedStringHandlerAttribute.cs b/src/Polyfill/StringInterpolation/InterpolatedStringHandlerAttribute.cs index 1be3fc2f..d4b5792d 100644 --- a/src/Polyfill/StringInterpolation/InterpolatedStringHandlerAttribute.cs +++ b/src/Polyfill/StringInterpolation/InterpolatedStringHandlerAttribute.cs @@ -14,7 +14,7 @@ namespace System.Runtime.CompilerServices; /// /// Indicates the attributed type is to be used as an interpolated string handler. /// -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.interpolatedstringhandlerargumentattribute")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.interpolatedstringhandlerargumentattribute [ExcludeFromCodeCoverage] [DebuggerNonUserCode] [AttributeUsage( diff --git a/src/Polyfill/StringPolyfill.cs b/src/Polyfill/StringPolyfill.cs index eccfdb0f..40ba2f5f 100644 --- a/src/Polyfill/StringPolyfill.cs +++ b/src/Polyfill/StringPolyfill.cs @@ -18,7 +18,7 @@ static partial class StringPolyfill /// /// Concatenates an array of strings, using the specified separator between each member. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.string.join#system-string-join(system-char-system-string())")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.string.join#system-string-join(system-char-system-string()) public static string Join(char separator, string[] values) => #if NETSTANDARD2_0 || NETFRAMEWORK string.Join(new([separator]), values); @@ -29,7 +29,7 @@ public static string Join(char separator, string[] values) => /// /// Concatenates the string representations of an array of objects, using the specified separator between each member. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.string.join#system-string-join(system-char-system-object())")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.string.join#system-string-join(system-char-system-object()) public static string Join(char separator, object[] values) => #if NETSTANDARD2_0 || NETFRAMEWORK string.Join(new([separator]), values); @@ -40,7 +40,7 @@ public static string Join(char separator, object[] values) => /// /// Concatenates the specified elements of a string array, using the specified separator between each element. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.string.join#system-string-join(system-char-system-string()-system-int32-system-int32)")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.string.join#system-string-join(system-char-system-string()-system-int32-system-int32) public static string Join(char separator, string?[] value, int startIndex, int count) => #if NETSTANDARD2_0 || NETFRAMEWORK string.Join(new([separator]), value, startIndex, count); @@ -51,7 +51,7 @@ public static string Join(char separator, string?[] value, int startIndex, int c /// /// Concatenates the specified elements of a string array, using the specified separator between each element. /// - [Link("https://learn.microsoft.com/en-us/dotnet/api/system.string.join#system-string-join-1(system-char-system-collections-generic-ienumerable((-0)))")] + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.string.join#system-string-join-1(system-char-system-collections-generic-ienumerable((-0))) public static string Join(char separator, IEnumerable values) => #if NETSTANDARD2_0 || NETFRAMEWORK string.Join(new([separator]), values); diff --git a/src/Polyfill/TaskCompletionSource.cs b/src/Polyfill/TaskCompletionSource.cs index cd030d00..2acf0837 100644 --- a/src/Polyfill/TaskCompletionSource.cs +++ b/src/Polyfill/TaskCompletionSource.cs @@ -37,7 +37,7 @@ namespace System.Diagnostics; /// [ExcludeFromCodeCoverage] [DebuggerNonUserCode] -[Link("https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.taskcompletionsource?view=net-8.0")] +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.taskcompletionsource?view=net-8.0 #if PolyPublic public #endif