From 5f067ce8b50087e032d13a1b97ae5ec39fc54739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Cant=C3=BA?= Date: Mon, 20 May 2024 00:38:35 -0500 Subject: [PATCH] Reapply keyword `params` (#101499) Co-authored-by: Stephen Toub --- .../ref/System.Collections.Immutable.cs | 24 +++---- .../Collections/Immutable/ImmutableArray.cs | 2 +- .../Immutable/ImmutableArray_1.Builder.cs | 4 +- .../Collections/Immutable/ImmutableArray_1.cs | 4 +- .../Collections/Immutable/ImmutableHashSet.cs | 4 +- .../Collections/Immutable/ImmutableList.cs | 2 +- .../Collections/Immutable/ImmutableQueue.cs | 2 +- .../Immutable/ImmutableSortedSet.cs | 4 +- .../Collections/Immutable/ImmutableStack.cs | 2 +- .../ref/System.Collections.cs | 4 +- .../System.Console/ref/System.Console.cs | 4 +- .../System.Console/src/System/Console.cs | 4 +- ...em.Diagnostics.DiagnosticSourceActivity.cs | 10 +-- .../src/System/Diagnostics/Metrics/Counter.cs | 2 +- .../System/Diagnostics/Metrics/Histogram.cs | 2 +- .../System/Diagnostics/Metrics/Measurement.cs | 2 +- .../src/System/Diagnostics/Metrics/TagList.cs | 2 +- .../Diagnostics/Metrics/UpDownCounter.cs | 2 +- .../System.Memory/ref/System.Memory.cs | 2 +- .../CodeDom/Compiler/IndentedTextWriter.cs | 4 +- .../Generic/CollectionExtensions.cs | 4 +- .../src/System/Delegate.cs | 2 +- .../src/System/IO/Path.cs | 4 +- .../src/System/IO/StreamWriter.cs | 4 +- .../IO/TextWriter.CreateBroadcasting.cs | 4 +- .../src/System/IO/TextWriter.cs | 8 +-- .../src/System/MemoryExtensions.cs | 2 +- .../src/System/String.Manipulation.cs | 26 +++---- .../src/System/Text/StringBuilder.cs | 14 ++-- .../Threading/CancellationTokenSource.cs | 2 +- .../src/System/Threading/Tasks/Task.cs | 10 +-- .../System.Runtime/ref/System.Runtime.cs | 70 +++++++++---------- .../System.IO.Tests/IndentedTextWriter.cs | 4 +- .../System.Text.Json/ref/System.Text.Json.cs | 6 +- .../src/System/Text/Json/Nodes/JsonArray.cs | 4 +- .../Metadata/JsonTypeInfoResolver.cs | 2 +- 36 files changed, 126 insertions(+), 126 deletions(-) diff --git a/src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.cs b/src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.cs index 8a6933a4039bf8..9c086594cbc306 100644 --- a/src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.cs +++ b/src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.cs @@ -207,7 +207,7 @@ public static partial class ImmutableArray public static System.Collections.Immutable.ImmutableArray Create(T item1, T item2, T item3, T item4) { throw null; } public static System.Collections.Immutable.ImmutableArray Create(params T[]? items) { throw null; } public static System.Collections.Immutable.ImmutableArray Create(T[] items, int start, int length) { throw null; } - public static System.Collections.Immutable.ImmutableArray Create(System.ReadOnlySpan items) { throw null; } + public static System.Collections.Immutable.ImmutableArray Create(params System.ReadOnlySpan items) { throw null; } public static System.Collections.Immutable.ImmutableArray Create(System.Span items) { throw null; } public static System.Collections.Immutable.ImmutableArray ToImmutableArray(this System.Collections.Generic.IEnumerable items) { throw null; } public static System.Collections.Immutable.ImmutableArray ToImmutableArray(this System.Collections.Immutable.ImmutableArray.Builder builder) { throw null; } @@ -244,7 +244,7 @@ public static partial class ImmutableArray public System.Collections.Immutable.ImmutableArray AddRange(TDerived[] items) where TDerived : T { throw null; } public System.Collections.Immutable.ImmutableArray AddRange(ImmutableArray items, int length) { throw null; } public System.Collections.Immutable.ImmutableArray AddRange(ImmutableArray items) where TDerived : T { throw null; } - public System.Collections.Immutable.ImmutableArray AddRange(System.ReadOnlySpan items) { throw null; } + public System.Collections.Immutable.ImmutableArray AddRange(params System.ReadOnlySpan items) { throw null; } public System.Collections.Immutable.ImmutableArray AddRange(params T[] items) { throw null; } public System.ReadOnlyMemory AsMemory() { throw null; } public System.ReadOnlySpan AsSpan() { throw null; } @@ -284,7 +284,7 @@ public void CopyTo(System.Span destination) { } public System.Collections.Immutable.ImmutableArray InsertRange(int index, System.Collections.Generic.IEnumerable items) { throw null; } public System.Collections.Immutable.ImmutableArray InsertRange(int index, System.Collections.Immutable.ImmutableArray items) { throw null; } public System.Collections.Immutable.ImmutableArray InsertRange(int index, T[] items) { throw null; } - public System.Collections.Immutable.ImmutableArray InsertRange(int index, System.ReadOnlySpan items) { throw null; } + public System.Collections.Immutable.ImmutableArray InsertRange(int index, params System.ReadOnlySpan items) { throw null; } public ref readonly T ItemRef(int index) { throw null; } public int LastIndexOf(T item) { throw null; } public int LastIndexOf(T item, int startIndex) { throw null; } @@ -362,8 +362,8 @@ public void AddRange(T[] items, int length) { } public void AddRange(System.Collections.Immutable.ImmutableArray items) where TDerived : T { } public void AddRange(System.Collections.Immutable.ImmutableArray.Builder items) where TDerived : T { } public void AddRange(TDerived[] items) where TDerived : T { } - public void AddRange(System.ReadOnlySpan items) { } - public void AddRange(System.ReadOnlySpan items) where TDerived : T { } + public void AddRange(params System.ReadOnlySpan items) { } + public void AddRange(params System.ReadOnlySpan items) where TDerived : T { } public void Clear() { } public bool Contains(T item) { throw null; } public void CopyTo(T[] array, int index) { } @@ -562,10 +562,10 @@ public static partial class ImmutableHashSet public static System.Collections.Immutable.ImmutableHashSet Create(System.Collections.Generic.IEqualityComparer? equalityComparer) { throw null; } public static System.Collections.Immutable.ImmutableHashSet Create(System.Collections.Generic.IEqualityComparer? equalityComparer, T item) { throw null; } public static System.Collections.Immutable.ImmutableHashSet Create(System.Collections.Generic.IEqualityComparer? equalityComparer, params T[] items) { throw null; } - public static System.Collections.Immutable.ImmutableHashSet Create(System.Collections.Generic.IEqualityComparer? equalityComparer, System.ReadOnlySpan items) { throw null; } + public static System.Collections.Immutable.ImmutableHashSet Create(System.Collections.Generic.IEqualityComparer? equalityComparer, params System.ReadOnlySpan items) { throw null; } public static System.Collections.Immutable.ImmutableHashSet Create(T item) { throw null; } public static System.Collections.Immutable.ImmutableHashSet Create(params T[] items) { throw null; } - public static System.Collections.Immutable.ImmutableHashSet Create(System.ReadOnlySpan items) { throw null; } + public static System.Collections.Immutable.ImmutableHashSet Create(params System.ReadOnlySpan items) { throw null; } public static System.Collections.Immutable.ImmutableHashSet ToImmutableHashSet(this System.Collections.Generic.IEnumerable source) { throw null; } public static System.Collections.Immutable.ImmutableHashSet ToImmutableHashSet(this System.Collections.Generic.IEnumerable source, System.Collections.Generic.IEqualityComparer? equalityComparer) { throw null; } public static System.Collections.Immutable.ImmutableHashSet ToImmutableHashSet(this System.Collections.Immutable.ImmutableHashSet.Builder builder) { throw null; } @@ -691,7 +691,7 @@ public static partial class ImmutableList public static System.Collections.Immutable.ImmutableList Create() { throw null; } public static System.Collections.Immutable.ImmutableList Create(T item) { throw null; } public static System.Collections.Immutable.ImmutableList Create(params T[] items) { throw null; } - public static System.Collections.Immutable.ImmutableList Create(System.ReadOnlySpan items) { throw null; } + public static System.Collections.Immutable.ImmutableList Create(params System.ReadOnlySpan items) { throw null; } public static int IndexOf(this System.Collections.Immutable.IImmutableList list, T item) { throw null; } public static int IndexOf(this System.Collections.Immutable.IImmutableList list, T item, System.Collections.Generic.IEqualityComparer? equalityComparer) { throw null; } public static int IndexOf(this System.Collections.Immutable.IImmutableList list, T item, int startIndex) { throw null; } @@ -887,7 +887,7 @@ public static partial class ImmutableQueue public static System.Collections.Immutable.ImmutableQueue Create() { throw null; } public static System.Collections.Immutable.ImmutableQueue Create(T item) { throw null; } public static System.Collections.Immutable.ImmutableQueue Create(params T[] items) { throw null; } - public static System.Collections.Immutable.ImmutableQueue Create(System.ReadOnlySpan items) { throw null; } + public static System.Collections.Immutable.ImmutableQueue Create(params System.ReadOnlySpan items) { throw null; } public static System.Collections.Immutable.IImmutableQueue Dequeue(this System.Collections.Immutable.IImmutableQueue queue, out T value) { throw null; } } [System.Runtime.CompilerServices.CollectionBuilderAttribute(typeof(System.Collections.Immutable.ImmutableQueue), "Create")] @@ -1063,10 +1063,10 @@ public static partial class ImmutableSortedSet public static System.Collections.Immutable.ImmutableSortedSet Create(System.Collections.Generic.IComparer? comparer) { throw null; } public static System.Collections.Immutable.ImmutableSortedSet Create(System.Collections.Generic.IComparer? comparer, T item) { throw null; } public static System.Collections.Immutable.ImmutableSortedSet Create(System.Collections.Generic.IComparer? comparer, params T[] items) { throw null; } - public static System.Collections.Immutable.ImmutableSortedSet Create(System.Collections.Generic.IComparer? comparer, System.ReadOnlySpan items) { throw null; } + public static System.Collections.Immutable.ImmutableSortedSet Create(System.Collections.Generic.IComparer? comparer, params System.ReadOnlySpan items) { throw null; } public static System.Collections.Immutable.ImmutableSortedSet Create(T item) { throw null; } public static System.Collections.Immutable.ImmutableSortedSet Create(params T[] items) { throw null; } - public static System.Collections.Immutable.ImmutableSortedSet Create(System.ReadOnlySpan items) { throw null; } + public static System.Collections.Immutable.ImmutableSortedSet Create(params System.ReadOnlySpan items) { throw null; } public static System.Collections.Immutable.ImmutableSortedSet ToImmutableSortedSet(this System.Collections.Generic.IEnumerable source) { throw null; } public static System.Collections.Immutable.ImmutableSortedSet ToImmutableSortedSet(this System.Collections.Generic.IEnumerable source, System.Collections.Generic.IComparer? comparer) { throw null; } public static System.Collections.Immutable.ImmutableSortedSet ToImmutableSortedSet(this System.Collections.Immutable.ImmutableSortedSet.Builder builder) { throw null; } @@ -1198,7 +1198,7 @@ public static partial class ImmutableStack public static System.Collections.Immutable.ImmutableStack Create() { throw null; } public static System.Collections.Immutable.ImmutableStack Create(T item) { throw null; } public static System.Collections.Immutable.ImmutableStack Create(params T[] items) { throw null; } - public static System.Collections.Immutable.ImmutableStack Create(System.ReadOnlySpan items) { throw null; } + public static System.Collections.Immutable.ImmutableStack Create(params System.ReadOnlySpan items) { throw null; } public static System.Collections.Immutable.IImmutableStack Pop(this System.Collections.Immutable.IImmutableStack stack, out T value) { throw null; } } [System.Runtime.CompilerServices.CollectionBuilderAttribute(typeof(System.Collections.Immutable.ImmutableStack), "Create")] diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray.cs index aafe4316eb7503..8f244bc8305bd5 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray.cs @@ -87,7 +87,7 @@ public static ImmutableArray Create(T item1, T item2, T item3, T item4) /// The type of element stored in the array. /// The elements to store in the array. /// An immutable array containing the specified items. - public static ImmutableArray Create(/*params*/ ReadOnlySpan items) + public static ImmutableArray Create(params ReadOnlySpan items) { if (items.IsEmpty) { diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs index 459a3889d30af8..891c783b5d6618 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs @@ -430,7 +430,7 @@ public void AddRange(ImmutableArray items, int length) /// Adds the specified items to the end of the array. /// /// The items to add at the end of the array. - public void AddRange(/*params*/ ReadOnlySpan items) + public void AddRange(params ReadOnlySpan items) { int offset = this.Count; this.Count += items.Length; @@ -443,7 +443,7 @@ public void AddRange(/*params*/ ReadOnlySpan items) /// /// The type that derives from the type of item already in the array. /// The items to add at the end of the array. - public void AddRange(/*params*/ ReadOnlySpan items) where TDerived : T + public void AddRange(params ReadOnlySpan items) where TDerived : T { int offset = this.Count; this.Count += items.Length; diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs index 04e05477e0ff7c..5d146329b1850f 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs @@ -880,7 +880,7 @@ public IEnumerable OfType() /// /// The values to add. /// A new list with the elements added. - public ImmutableArray AddRange(/*params*/ ReadOnlySpan items) + public ImmutableArray AddRange(params ReadOnlySpan items) { ImmutableArray self = this; return self.InsertRange(self.Length, items); @@ -949,7 +949,7 @@ public ImmutableArray InsertRange(int index, T[] items) /// The index at which to insert the value. /// The elements to insert. /// The new immutable collection. - public ImmutableArray InsertRange(int index, /*params*/ ReadOnlySpan items) + public ImmutableArray InsertRange(int index, params ReadOnlySpan items) { ImmutableArray self = this; self.ThrowNullRefIfNotInitialized(); diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet.cs index 13742785d7d81e..8cb871e5e01d0c 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet.cs @@ -98,7 +98,7 @@ public static ImmutableHashSet Create(params T[] items) /// The type of items stored by the collection. /// The items to prepopulate. /// The new immutable collection. - public static ImmutableHashSet Create(/*params*/ ReadOnlySpan items) + public static ImmutableHashSet Create(params ReadOnlySpan items) { return ImmutableHashSet.Empty.Union(items); } @@ -124,7 +124,7 @@ public static ImmutableHashSet Create(IEqualityComparer? equalityCompar /// The equality comparer. /// The items to prepopulate. /// The new immutable collection. - public static ImmutableHashSet Create(IEqualityComparer? equalityComparer, /*params*/ ReadOnlySpan items) + public static ImmutableHashSet Create(IEqualityComparer? equalityComparer, params ReadOnlySpan items) { return ImmutableHashSet.Empty.WithComparer(equalityComparer).Union(items); } diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList.cs index 977686b880cc8c..43c0b23bc954cf 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList.cs @@ -52,7 +52,7 @@ public static ImmutableList Create(params T[] items) /// The type of items stored by the collection. /// A span that contains the items to prepopulate the list with. /// A new immutable list that contains the specified items. - public static ImmutableList Create(/*params*/ ReadOnlySpan items) => ImmutableList.Empty.AddRange(items); + public static ImmutableList Create(params ReadOnlySpan items) => ImmutableList.Empty.AddRange(items); /// /// Creates a new immutable list builder. diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue.cs index d2f5d142bbf869..051d79aa6e6446 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue.cs @@ -83,7 +83,7 @@ public static ImmutableQueue Create(params T[] items) /// The type of items in the immutable queue. /// A span that contains the items to prepopulate the queue with. /// A new immutable queue that contains the specified items. - public static ImmutableQueue Create(/*params*/ ReadOnlySpan items) + public static ImmutableQueue Create(params ReadOnlySpan items) { if (items.IsEmpty) { diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet.cs index ae5493ff083213..c2eb3641807015 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet.cs @@ -97,7 +97,7 @@ public static ImmutableSortedSet Create(params T[] items) /// The type of items in the immutable set. /// A span that contains the items to prepopulate the set with. /// A new immutable set that contains the specified items. - public static ImmutableSortedSet Create(/*params*/ ReadOnlySpan items) + public static ImmutableSortedSet Create(params ReadOnlySpan items) { return ImmutableSortedSet.Empty.Union(items); } @@ -123,7 +123,7 @@ public static ImmutableSortedSet Create(IComparer? comparer, params T[] /// The comparer. /// The items to prepopulate. /// The new immutable collection. - public static ImmutableSortedSet Create(IComparer? comparer, /*params*/ ReadOnlySpan items) + public static ImmutableSortedSet Create(IComparer? comparer, params ReadOnlySpan items) { return ImmutableSortedSet.Empty.WithComparer(comparer).Union(items); } diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack.cs index f964f55c79908c..12480554339e9c 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack.cs @@ -70,7 +70,7 @@ public static ImmutableStack Create(params T[] items) /// The type of items in the immutable stack. /// A span that contains the items to prepopulate the stack with. /// A new immutable stack that contains the specified items. - public static ImmutableStack Create(/*params*/ ReadOnlySpan items) + public static ImmutableStack Create(params ReadOnlySpan items) { ImmutableStack stack = ImmutableStack.Empty; foreach (T item in items) diff --git a/src/libraries/System.Collections/ref/System.Collections.cs b/src/libraries/System.Collections/ref/System.Collections.cs index 2fa8f622b611f6..6d8c4f6f27389c 100644 --- a/src/libraries/System.Collections/ref/System.Collections.cs +++ b/src/libraries/System.Collections/ref/System.Collections.cs @@ -416,11 +416,11 @@ namespace System.Collections.Generic { public static partial class CollectionExtensions { - public static void AddRange(this System.Collections.Generic.List list, System.ReadOnlySpan source) { } + public static void AddRange(this System.Collections.Generic.List list, params System.ReadOnlySpan source) { } public static void CopyTo(this System.Collections.Generic.List list, System.Span destination) { } public static TValue? GetValueOrDefault(this System.Collections.Generic.IReadOnlyDictionary dictionary, TKey key) { throw null; } public static TValue GetValueOrDefault(this System.Collections.Generic.IReadOnlyDictionary dictionary, TKey key, TValue defaultValue) { throw null; } - public static void InsertRange(this System.Collections.Generic.List list, int index, System.ReadOnlySpan source) { } + public static void InsertRange(this System.Collections.Generic.List list, int index, params System.ReadOnlySpan source) { } public static bool Remove(this System.Collections.Generic.IDictionary dictionary, TKey key, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TValue value) { throw null; } public static bool TryAdd(this System.Collections.Generic.IDictionary dictionary, TKey key, TValue value) { throw null; } public static System.Collections.ObjectModel.ReadOnlyCollection AsReadOnly(this IList list) { throw null; } diff --git a/src/libraries/System.Console/ref/System.Console.cs b/src/libraries/System.Console/ref/System.Console.cs index 7c5ca19cd01ad6..297f94aac0ec06 100644 --- a/src/libraries/System.Console/ref/System.Console.cs +++ b/src/libraries/System.Console/ref/System.Console.cs @@ -175,7 +175,7 @@ public static void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute( public static void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1) { } public static void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1, object? arg2) { } public static void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params object?[]? arg) { } - public static void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, System.ReadOnlySpan arg) { } + public static void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params System.ReadOnlySpan arg) { } [System.CLSCompliantAttribute(false)] public static void Write(uint value) { } [System.CLSCompliantAttribute(false)] @@ -196,7 +196,7 @@ public static void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttrib public static void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1) { } public static void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1, object? arg2) { } public static void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params object?[]? arg) { } - public static void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, System.ReadOnlySpan arg) { } + public static void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params System.ReadOnlySpan arg) { } [System.CLSCompliantAttribute(false)] public static void WriteLine(uint value) { } [System.CLSCompliantAttribute(false)] diff --git a/src/libraries/System.Console/src/System/Console.cs b/src/libraries/System.Console/src/System/Console.cs index 5e0e387b8299fb..d2db8f831d448b 100644 --- a/src/libraries/System.Console/src/System/Console.cs +++ b/src/libraries/System.Console/src/System/Console.cs @@ -871,7 +871,7 @@ public static void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat /// A composite format string. /// A span of objects to write using format. [MethodImplAttribute(MethodImplOptions.NoInlining)] - public static void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, /*params*/ ReadOnlySpan arg) + public static void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan arg) { Out.WriteLine(format, arg); } @@ -909,7 +909,7 @@ public static void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] s /// A composite format string. /// A span of objects to write using format. [MethodImplAttribute(MethodImplOptions.NoInlining)] - public static void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, /*params*/ ReadOnlySpan arg) + public static void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan arg) { Out.Write(format, arg); } diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSourceActivity.cs b/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSourceActivity.cs index 47677b1f612b56..0e24044c733a73 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSourceActivity.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSourceActivity.cs @@ -298,7 +298,7 @@ public abstract class DistributedContextPropagator [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential)] public struct TagList : System.Collections.Generic.IList>, System.Collections.Generic.IReadOnlyList> { - public TagList(System.ReadOnlySpan> tagList) : this() { throw null; } + public TagList(params System.ReadOnlySpan> tagList) : this() { throw null; } public readonly int Count => throw null; public readonly bool IsReadOnly => throw null; public System.Collections.Generic.KeyValuePair this[int index] @@ -337,7 +337,7 @@ public sealed class Counter : Instrument where T : struct public void Add(T delta, System.Collections.Generic.KeyValuePair tag) { throw null; } public void Add(T delta, System.Collections.Generic.KeyValuePair tag1, System.Collections.Generic.KeyValuePair tag2) { throw null; } public void Add(T delta, System.Collections.Generic.KeyValuePair tag1, System.Collections.Generic.KeyValuePair tag2, System.Collections.Generic.KeyValuePair tag3) { throw null; } - public void Add(T delta, System.ReadOnlySpan> tags) { throw null; } + public void Add(T delta, params System.ReadOnlySpan> tags) { throw null; } public void Add(T delta, params System.Collections.Generic.KeyValuePair[] tags) { throw null; } public void Add(T delta, in TagList tagList) { throw null; } internal Counter(Meter meter, string name, string? unit, string? description) : @@ -349,7 +349,7 @@ public sealed class UpDownCounter : Instrument where T : struct public void Add(T delta, System.Collections.Generic.KeyValuePair tag) { throw null; } public void Add(T delta, System.Collections.Generic.KeyValuePair tag1, System.Collections.Generic.KeyValuePair tag2) { throw null; } public void Add(T delta, System.Collections.Generic.KeyValuePair tag1, System.Collections.Generic.KeyValuePair tag2, System.Collections.Generic.KeyValuePair tag3) { throw null; } - public void Add(T delta, System.ReadOnlySpan> tags) { throw null; } + public void Add(T delta, params System.ReadOnlySpan> tags) { throw null; } public void Add(T delta, params System.Collections.Generic.KeyValuePair[] tags) { throw null; } public void Add(T delta, in TagList tagList) { throw null; } internal UpDownCounter(Meter meter, string name, string? unit, string? description) : @@ -363,7 +363,7 @@ public sealed class Histogram : Instrument where T : struct public void Record(T value, System.Collections.Generic.KeyValuePair tag1, System.Collections.Generic.KeyValuePair tag2) { throw null; } public void Record(T value, System.Collections.Generic.KeyValuePair tag1, System.Collections.Generic.KeyValuePair tag2, System.Collections.Generic.KeyValuePair tag3) { throw null; } public void Record(T value, in TagList tagList) { throw null; } - public void Record(T value, System.ReadOnlySpan> tags) { throw null; } + public void Record(T value, params System.ReadOnlySpan> tags) { throw null; } public void Record(T value, params System.Collections.Generic.KeyValuePair[] tags) { throw null; } } public interface IMeterFactory : System.IDisposable @@ -399,7 +399,7 @@ public abstract class Instrument : Instrument where T : struct public Measurement(T value) { throw null; } public Measurement(T value, System.Collections.Generic.IEnumerable>? tags) { throw null; } public Measurement(T value, params System.Collections.Generic.KeyValuePair[]? tags) { throw null; } - public Measurement(T value, System.ReadOnlySpan> tags) { throw null; } + public Measurement(T value, params System.ReadOnlySpan> tags) { throw null; } public ReadOnlySpan> Tags { get { throw null; } } public T Value { get { throw null; } } } diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Counter.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Counter.cs index 9f15ff37c70104..4c503a50ac7208 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Counter.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Counter.cs @@ -59,7 +59,7 @@ internal Counter(Meter meter, string name, string? unit, string? description, IE /// /// The increment measurement. /// A span of key-value pair tags associated with the measurement. - public void Add(T delta, /*params*/ ReadOnlySpan> tags) => RecordMeasurement(delta, tags); + public void Add(T delta, params ReadOnlySpan> tags) => RecordMeasurement(delta, tags); /// /// Record the increment value of the measurement. diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Histogram.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Histogram.cs index 91f5f40da6e80e..3863efe704c7c2 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Histogram.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Histogram.cs @@ -59,7 +59,7 @@ internal Histogram(Meter meter, string name, string? unit, string? description, /// /// The measurement value. /// A span of key-value pair tags associated with the measurement. - public void Record(T value, /*params*/ ReadOnlySpan> tags) => RecordMeasurement(value, tags); + public void Record(T value, params ReadOnlySpan> tags) => RecordMeasurement(value, tags); /// /// Record a measurement value. diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Measurement.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Measurement.cs index f678ef66014ff0..88f26985552277 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Measurement.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Measurement.cs @@ -59,7 +59,7 @@ public Measurement(T value, params KeyValuePair[]? tags) /// /// The measurement value. /// The measurement associated tags list. - public Measurement(T value, /*params*/ ReadOnlySpan> tags) + public Measurement(T value, params ReadOnlySpan> tags) { _tags = tags.ToArray(); Value = value; diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/TagList.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/TagList.cs index 138da8875aeed6..f003241ceb40a3 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/TagList.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/TagList.cs @@ -43,7 +43,7 @@ public struct TagList : IList>, IReadOnlyList. /// /// A span of tags to initialize the list with. - public TagList(/*params*/ ReadOnlySpan> tagList) : this() + public TagList(params ReadOnlySpan> tagList) : this() { _tagsCount = tagList.Length; switch (_tagsCount) diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/UpDownCounter.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/UpDownCounter.cs index 4a093865c5511d..dc9a65b91d37c8 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/UpDownCounter.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/UpDownCounter.cs @@ -58,7 +58,7 @@ internal UpDownCounter(Meter meter, string name, string? unit, string? descripti /// /// The amount to be added which can be positive, negative or zero. /// A span of key-value pair tags associated with the measurement. - public void Add(T delta, /*params*/ ReadOnlySpan> tags) => RecordMeasurement(delta, tags); + public void Add(T delta, params ReadOnlySpan> tags) => RecordMeasurement(delta, tags); /// /// Record the delta value of the measurement. The delta can be positive, negative or zero. diff --git a/src/libraries/System.Memory/ref/System.Memory.cs b/src/libraries/System.Memory/ref/System.Memory.cs index 8aac4764a1498a..edacc807a04fc3 100644 --- a/src/libraries/System.Memory/ref/System.Memory.cs +++ b/src/libraries/System.Memory/ref/System.Memory.cs @@ -408,7 +408,7 @@ public static void Sort(this System.Span keys, Sy public static bool TryWrite(this System.Span destination, System.IFormatProvider? provider, System.Text.CompositeFormat format, out int charsWritten, TArg0 arg0, TArg1 arg1) { throw null; } public static bool TryWrite(this System.Span destination, System.IFormatProvider? provider, System.Text.CompositeFormat format, out int charsWritten, TArg0 arg0, TArg1 arg1, TArg2 arg2) { throw null; } public static bool TryWrite(this Span destination, System.IFormatProvider? provider, System.Text.CompositeFormat format, out int charsWritten, params object?[] args) { throw null; } - public static bool TryWrite(this Span destination, System.IFormatProvider? provider, System.Text.CompositeFormat format, out int charsWritten, System.ReadOnlySpan args) { throw null; } + public static bool TryWrite(this Span destination, System.IFormatProvider? provider, System.Text.CompositeFormat format, out int charsWritten, params System.ReadOnlySpan args) { throw null; } [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.CompilerServices.InterpolatedStringHandlerAttribute] public ref struct TryWriteInterpolatedStringHandler diff --git a/src/libraries/System.Private.CoreLib/src/System/CodeDom/Compiler/IndentedTextWriter.cs b/src/libraries/System.Private.CoreLib/src/System/CodeDom/Compiler/IndentedTextWriter.cs index 43608b97f78ff1..dc7eca31f0d8f7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/CodeDom/Compiler/IndentedTextWriter.cs +++ b/src/libraries/System.Private.CoreLib/src/System/CodeDom/Compiler/IndentedTextWriter.cs @@ -179,7 +179,7 @@ public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] /// /// The formatting string to use. /// The argument span to output. - public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, /*params*/ ReadOnlySpan arg) + public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan arg) { OutputTabs(); _writer.Write(format, arg); @@ -368,7 +368,7 @@ public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeForm /// /// The formatting string to use. /// The argument span to output. - public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, /*params*/ ReadOnlySpan arg) + public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan arg) { OutputTabs(); _writer.WriteLine(format, arg); diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/CollectionExtensions.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/CollectionExtensions.cs index 6c7949eed7bf74..cf4256f546d59f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/CollectionExtensions.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/CollectionExtensions.cs @@ -82,7 +82,7 @@ public static ReadOnlyDictionary AsReadOnly(this IDi /// The list to which the elements should be added. /// The span whose elements should be added to the end of the . /// The is null. - public static void AddRange(this List list, /*params*/ ReadOnlySpan source) + public static void AddRange(this List list, params ReadOnlySpan source) { if (list is null) { @@ -109,7 +109,7 @@ public static void AddRange(this List list, /*params*/ ReadOnlySpan sou /// The span whose elements should be added to the . /// The is null. /// is less than 0 or greater than 's . - public static void InsertRange(this List list, int index, /*params*/ ReadOnlySpan source) + public static void InsertRange(this List list, int index, params ReadOnlySpan source) { if (list is null) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Delegate.cs b/src/libraries/System.Private.CoreLib/src/System/Delegate.cs index cc8a66e341b529..9e5a8170ac61cf 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Delegate.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Delegate.cs @@ -35,7 +35,7 @@ public abstract partial class Delegate : ICloneable, ISerializable /// Returns if is , /// if contains zero elements, or if every entry in is . /// - public static Delegate? Combine(/*params*/ ReadOnlySpan delegates) + public static Delegate? Combine(params ReadOnlySpan delegates) { Delegate? d = null; diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/Path.cs b/src/libraries/System.Private.CoreLib/src/System/IO/Path.cs index e6cc976336bbfd..7b828df7720dea 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/Path.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/Path.cs @@ -379,7 +379,7 @@ public static string Combine(params string[] paths) /// /// A span of parts of the path. /// The combined paths. - public static string Combine(/*params*/ ReadOnlySpan paths) + public static string Combine(params ReadOnlySpan paths) { int maxSize = 0; int firstComponent = 0; @@ -537,7 +537,7 @@ public static string Join(params string?[] paths) /// /// A span of paths. /// The concatenated path. - public static string Join(/*params*/ ReadOnlySpan paths) + public static string Join(params ReadOnlySpan paths) { if (paths.IsEmpty) { diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/StreamWriter.cs b/src/libraries/System.Private.CoreLib/src/System/IO/StreamWriter.cs index 947c803d6d2747..58efa18407c70d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/StreamWriter.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/StreamWriter.cs @@ -573,7 +573,7 @@ public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] /// /// A composite format string. /// An object span that contains zero or more objects to format and write. - public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, /*params*/ ReadOnlySpan arg) + public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan arg) { if (GetType() == typeof(StreamWriter)) { @@ -641,7 +641,7 @@ public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeForm /// /// A composite format string. /// An object span that contains zero or more objects to format and write. - public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, /*params*/ ReadOnlySpan arg) + public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan arg) { if (GetType() == typeof(StreamWriter)) { diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.CreateBroadcasting.cs b/src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.CreateBroadcasting.cs index 82c9d6edd619d5..0637cafb27e985 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.CreateBroadcasting.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.CreateBroadcasting.cs @@ -268,7 +268,7 @@ public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] } } - public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, /*params*/ ReadOnlySpan arg) + public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan arg) { foreach (TextWriter writer in _writers) { @@ -436,7 +436,7 @@ public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeForm } } - public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, /*params*/ ReadOnlySpan arg) + public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan arg) { foreach (TextWriter writer in _writers) { diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.cs b/src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.cs index 27a73516d4be96..a6070683047a33 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.cs @@ -322,7 +322,7 @@ public virtual void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] /// /// A composite format string. /// An object span that contains zero or more objects to format and write. - public virtual void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, /*params*/ ReadOnlySpan arg) + public virtual void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan arg) { Write(string.Format(FormatProvider, format, arg)); } @@ -529,7 +529,7 @@ public virtual void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeForma /// /// A composite format string. /// An object span that contains zero or more objects to format and write. - public virtual void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, /*params*/ ReadOnlySpan arg) + public virtual void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan arg) { WriteLine(string.Format(FormatProvider, format, arg)); } @@ -720,7 +720,7 @@ public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, object? arg0, object? arg1) { } public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, object? arg0, object? arg1, object? arg2) { } public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params object?[] arg) { } - public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, /*params*/ ReadOnlySpan arg) { } + public override void Write([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan arg) { } public override Task WriteAsync(char value) => Task.CompletedTask; public override Task WriteAsync(string? value) => Task.CompletedTask; public override Task WriteAsync(StringBuilder? value, CancellationToken cancellationToken = default) => Task.CompletedTask; @@ -746,7 +746,7 @@ public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeForm public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, object? arg0, object? arg1) { } public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, object? arg0, object? arg1, object? arg2) { } public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params object?[] arg) { } - public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, /*params*/ ReadOnlySpan arg) { } + public override void WriteLine([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan arg) { } public override Task WriteLineAsync(char value) => Task.CompletedTask; public override Task WriteLineAsync(string? value) => Task.CompletedTask; public override Task WriteLineAsync(StringBuilder? value, CancellationToken cancellationToken = default) => Task.CompletedTask; diff --git a/src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs b/src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs index d3c9e28cb0ccda..f088e3ced535a3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs +++ b/src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs @@ -4173,7 +4173,7 @@ public static bool TryWrite(this Span destination, IFormatProvider? provid /// if the entire interpolated string could be formatted successfully; otherwise, . /// is null. /// The index of a format item is greater than or equal to the number of supplied arguments. - public static bool TryWrite(this Span destination, IFormatProvider? provider, CompositeFormat format, out int charsWritten, /*params*/ ReadOnlySpan args) + public static bool TryWrite(this Span destination, IFormatProvider? provider, CompositeFormat format, out int charsWritten, params ReadOnlySpan args) { ArgumentNullException.ThrowIfNull(format); format.ValidateNumberOfArgs(args.Length); diff --git a/src/libraries/System.Private.CoreLib/src/System/String.Manipulation.cs b/src/libraries/System.Private.CoreLib/src/System/String.Manipulation.cs index 596e743ebe215d..3d421f35d99a84 100644 --- a/src/libraries/System.Private.CoreLib/src/System/String.Manipulation.cs +++ b/src/libraries/System.Private.CoreLib/src/System/String.Manipulation.cs @@ -70,7 +70,7 @@ public static string Concat(params object?[] args) /// /// A span of objects that contains the elements to concatenate. /// The concatenated string representations of the values of the elements in . - public static string Concat(/*params*/ ReadOnlySpan args) + public static string Concat(params ReadOnlySpan args) { if (args.Length <= 1) { @@ -372,7 +372,7 @@ public static string Concat(params string?[] values) /// /// A span of instances. /// The concatenated elements of . - public static string Concat(/*params*/ ReadOnlySpan values) + public static string Concat(params ReadOnlySpan values) { if (values.Length <= 1) { @@ -472,7 +472,7 @@ public static string Format([StringSyntax(StringSyntaxAttribute.CompositeFormat) /// A composite format string. /// An object span that contains zero or more objects to format. /// A copy of in which the format items have been replaced by the string representation of the corresponding objects in . - public static string Format([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, /*params*/ ReadOnlySpan args) + public static string Format([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan args) { return FormatHelper(null, format, args); } @@ -514,7 +514,7 @@ public static string Format(IFormatProvider? provider, [StringSyntax(StringSynta /// A composite format string. /// An object span that contains zero or more objects to format. /// A copy of in which the format items have been replaced by the string representation of the corresponding objects in . - public static string Format(IFormatProvider? provider, [StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, /*params*/ ReadOnlySpan args) + public static string Format(IFormatProvider? provider, [StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan args) { return FormatHelper(provider, format, args); } @@ -617,7 +617,7 @@ public static string Format(IFormatProvider? provider, CompositeFormat format, p /// The formatted string. /// is null. /// The index of a format item is greater than or equal to the number of supplied arguments. - public static string Format(IFormatProvider? provider, CompositeFormat format, /*params*/ ReadOnlySpan args) + public static string Format(IFormatProvider? provider, CompositeFormat format, params ReadOnlySpan args) { ArgumentNullException.ThrowIfNull(format); format.ValidateNumberOfArgs(args.Length); @@ -721,7 +721,7 @@ public static string Join(char separator, params string?[] value) /// -or- /// if has zero elements. /// - public static string Join(char separator, /*params*/ ReadOnlySpan value) + public static string Join(char separator, params ReadOnlySpan value) { return JoinCore(new ReadOnlySpan(in separator), value); } @@ -746,7 +746,7 @@ public static string Join(string? separator, params string?[] value) /// -or- /// if has zero elements. /// - public static string Join(string? separator, /*params*/ ReadOnlySpan value) + public static string Join(string? separator, params ReadOnlySpan value) { return JoinCore(separator.AsSpan(), value); } @@ -835,7 +835,7 @@ public static string Join(char separator, params object?[] values) /// -or- /// if has zero elements. /// - public static string Join(char separator, /*params*/ ReadOnlySpan values) => + public static string Join(char separator, params ReadOnlySpan values) => JoinCore(new ReadOnlySpan(in separator), values); public static string Join(string? separator, params object?[] values) @@ -858,7 +858,7 @@ public static string Join(string? separator, params object?[] values) /// -or- /// if has zero elements. /// - public static string Join(string? separator, /*params*/ ReadOnlySpan values) => + public static string Join(string? separator, params ReadOnlySpan values) => JoinCore(separator.AsSpan(), values); private static string JoinCore(ReadOnlySpan separator, ReadOnlySpan values) @@ -1660,7 +1660,7 @@ public string[] Split(params char[]? separator) /// /// A span of delimiting characters, or an empty span that contains no delimiters. /// An array whose elements contain the substrings from this instance that are delimited by one or more characters in . - public string[] Split(/*params*/ ReadOnlySpan separator) + public string[] Split(params ReadOnlySpan separator) { return SplitInternal(separator, int.MaxValue, StringSplitOptions.None); } @@ -2367,7 +2367,7 @@ public unsafe string Trim(params char[]? trimChars) /// If is empty, white-space characters are removed instead. /// If no characters can be trimmed from the current instance, the method returns the current instance unchanged. /// - public unsafe string Trim(/*params*/ ReadOnlySpan trimChars) + public unsafe string Trim(params ReadOnlySpan trimChars) { if (trimChars.IsEmpty) { @@ -2408,7 +2408,7 @@ public unsafe string TrimStart(params char[]? trimChars) /// If is empty, white-space characters are removed instead. /// If no characters can be trimmed from the current instance, the method returns the current instance unchanged. /// - public unsafe string TrimStart(/*params*/ ReadOnlySpan trimChars) + public unsafe string TrimStart(params ReadOnlySpan trimChars) { if (trimChars.IsEmpty) { @@ -2449,7 +2449,7 @@ public unsafe string TrimEnd(params char[]? trimChars) /// If is empty, white-space characters are removed instead. /// If no characters can be trimmed from the current instance, the method returns the current instance unchanged. /// - public unsafe string TrimEnd(/*params*/ ReadOnlySpan trimChars) + public unsafe string TrimEnd(params ReadOnlySpan trimChars) { if (trimChars.IsEmpty) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/StringBuilder.cs b/src/libraries/System.Private.CoreLib/src/System/Text/StringBuilder.cs index e7bee231dbf45d..7a33d7d0ed3a76 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/StringBuilder.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/StringBuilder.cs @@ -1140,7 +1140,7 @@ public StringBuilder AppendJoin(string? separator, params object?[] values) /// The string to use as a separator. is included in the joined strings only if has more than one element. /// A span 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. - public StringBuilder AppendJoin(string? separator, /*params*/ ReadOnlySpan values) + public StringBuilder AppendJoin(string? separator, params ReadOnlySpan values) { separator ??= string.Empty; return AppendJoinCore(ref separator.GetRawStringData(), separator.Length, values); @@ -1175,7 +1175,7 @@ public StringBuilder AppendJoin(string? separator, params string?[] values) /// The string to use as a separator. is included in the joined strings only if has more than one element. /// A span 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. - public StringBuilder AppendJoin(string? separator, /*params*/ ReadOnlySpan values) + public StringBuilder AppendJoin(string? separator, params ReadOnlySpan values) { separator ??= string.Empty; return AppendJoinCore(ref separator.GetRawStringData(), separator.Length, values); @@ -1198,7 +1198,7 @@ public StringBuilder AppendJoin(char separator, params object?[] values) /// The character to use as a separator. is included in the joined strings only if has more than one element. /// A span 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. - public StringBuilder AppendJoin(char separator, /*params*/ ReadOnlySpan values) => + public StringBuilder AppendJoin(char separator, params ReadOnlySpan values) => AppendJoinCore(ref separator, 1, values); public StringBuilder AppendJoin(char separator, IEnumerable values) @@ -1228,7 +1228,7 @@ public StringBuilder AppendJoin(char separator, params string?[] values) /// The character to use as a separator. is included in the joined strings only if has more than one element. /// A span 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. - public StringBuilder AppendJoin(char separator, /*params*/ ReadOnlySpan values) => + public StringBuilder AppendJoin(char separator, params ReadOnlySpan values) => AppendJoinCore(ref separator, 1, values); private StringBuilder AppendJoinCore(ref char separator, int separatorLength, IEnumerable values) @@ -1466,7 +1466,7 @@ public StringBuilder AppendFormat([StringSyntax(StringSyntaxAttribute.CompositeF /// -or- /// The index of a format item is less than 0 (zero), or greater than or equal to the length of the span. /// - public StringBuilder AppendFormat([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, /*params*/ ReadOnlySpan args) + public StringBuilder AppendFormat([StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan args) { return AppendFormat(null, format, args); } @@ -1515,7 +1515,7 @@ public StringBuilder AppendFormat(IFormatProvider? provider, [StringSyntax(Strin /// -or- /// The index of a format item is less than 0 (zero), or greater than or equal to the length of the span. /// - public StringBuilder AppendFormat(IFormatProvider? provider, [StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, /*params*/ ReadOnlySpan args) + public StringBuilder AppendFormat(IFormatProvider? provider, [StringSyntax(StringSyntaxAttribute.CompositeFormat)] string format, params ReadOnlySpan args) { ArgumentNullException.ThrowIfNull(format); @@ -1875,7 +1875,7 @@ public StringBuilder AppendFormat(IFormatProvider? provider, CompositeFormat for /// A reference to this instance after the append operation has completed. /// is null. /// The index of a format item is greater than or equal to the number of supplied arguments. - public StringBuilder AppendFormat(IFormatProvider? provider, CompositeFormat format, /*params*/ ReadOnlySpan args) + public StringBuilder AppendFormat(IFormatProvider? provider, CompositeFormat format, params ReadOnlySpan args) { ArgumentNullException.ThrowIfNull(format); format.ValidateNumberOfArgs(args.Length); diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs index 092b9467232157..f1358083a220fc 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs @@ -877,7 +877,7 @@ public static CancellationTokenSource CreateLinkedTokenSource(params Cancellatio /// /// The CancellationToken instances to observe. /// A that is linked to the source tokens. - public static CancellationTokenSource CreateLinkedTokenSource(/*params*/ ReadOnlySpan tokens) + public static CancellationTokenSource CreateLinkedTokenSource(params ReadOnlySpan tokens) { return tokens.Length switch { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs index ab532be3e3da4e..4bf84b92a64d44 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs @@ -4704,7 +4704,7 @@ public static void WaitAll(params Task[] tasks) /// the execution of at least one of the instances. /// [UnsupportedOSPlatform("browser")] - public static void WaitAll(/*params*/ ReadOnlySpan tasks) + public static void WaitAll(params ReadOnlySpan tasks) { bool waitResult = WaitAllCore(tasks, Timeout.Infinite, default); Debug.Assert(waitResult, "expected wait to succeed"); @@ -5973,7 +5973,7 @@ public static Task WhenAll(params Task[] tasks) /// /// /// The array contained a null task. - public static Task WhenAll(/*params*/ ReadOnlySpan tasks) => + public static Task WhenAll(params ReadOnlySpan tasks) => tasks.Length != 0 ? new WhenAllPromise(tasks) : CompletedTask; /// A Task that gets completed when all of its constituent tasks complete. @@ -6300,7 +6300,7 @@ public static Task WhenAll(params Task[] tasks) /// /// The array contained a null task. /// - public static Task WhenAll(/*params*/ ReadOnlySpan> tasks) + public static Task WhenAll(params ReadOnlySpan> tasks) { if (tasks.IsEmpty) { @@ -6471,7 +6471,7 @@ public static Task WhenAny(params Task[] tasks) /// /// The array contained a null task, or was empty. /// - public static Task WhenAny(/*params*/ ReadOnlySpan tasks) => + public static Task WhenAny(params ReadOnlySpan tasks) => WhenAnyCore(tasks); /// @@ -6755,7 +6755,7 @@ public static Task> WhenAny(params Task[] tasks) /// /// The array contained a null task, or was empty. /// - public static Task> WhenAny(/*params*/ ReadOnlySpan> tasks) => + public static Task> WhenAny(params ReadOnlySpan> tasks) => WhenAnyCore(tasks); /// Creates a task that will complete when either of the supplied tasks have completed. diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs index 5dfc7b80945f15..f288010e344798 100644 --- a/src/libraries/System.Runtime/ref/System.Runtime.cs +++ b/src/libraries/System.Runtime/ref/System.Runtime.cs @@ -2170,7 +2170,7 @@ protected Delegate([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAt [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute("b")] public static System.Delegate? Combine(System.Delegate? a, System.Delegate? b) { throw null; } public static System.Delegate? Combine(params System.Delegate?[]? delegates) { throw null; } - public static System.Delegate? Combine(System.ReadOnlySpan delegates) { throw null; } + public static System.Delegate? Combine(params System.ReadOnlySpan delegates) { throw null; } protected virtual System.Delegate CombineImpl(System.Delegate? d) { throw null; } public static System.Delegate CreateDelegate(System.Type type, object? firstArgument, System.Reflection.MethodInfo method) { throw null; } public static System.Delegate? CreateDelegate(System.Type type, object? firstArgument, System.Reflection.MethodInfo method, bool throwOnBindFailure) { throw null; } @@ -5265,7 +5265,7 @@ public unsafe String(sbyte* value, int startIndex, int length, System.Text.Encod public static string Concat(object? arg0, object? arg1) { throw null; } public static string Concat(object? arg0, object? arg1, object? arg2) { throw null; } public static string Concat(params object?[] args) { throw null; } - public static string Concat(System.ReadOnlySpan args) { throw null; } + public static string Concat(params System.ReadOnlySpan args) { throw null; } public static string Concat(System.ReadOnlySpan str0, System.ReadOnlySpan str1) { throw null; } public static string Concat(System.ReadOnlySpan str0, System.ReadOnlySpan str1, System.ReadOnlySpan str2) { throw null; } public static string Concat(System.ReadOnlySpan str0, System.ReadOnlySpan str1, System.ReadOnlySpan str2, System.ReadOnlySpan str3) { throw null; } @@ -5273,7 +5273,7 @@ public unsafe String(sbyte* value, int startIndex, int length, System.Text.Encod public static string Concat(string? str0, string? str1, string? str2) { throw null; } public static string Concat(string? str0, string? str1, string? str2, string? str3) { throw null; } public static string Concat(params string?[] values) { throw null; } - public static string Concat(System.ReadOnlySpan values) { throw null; } + public static string Concat(params System.ReadOnlySpan values) { throw null; } public static string Concat(System.Collections.Generic.IEnumerable values) { throw null; } public bool Contains(char value) { throw null; } public bool Contains(char value, System.StringComparison comparisonType) { throw null; } @@ -5301,14 +5301,14 @@ public void CopyTo(System.Span destination) { } public static string Format(System.IFormatProvider? provider, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1) { throw null; } public static string Format(System.IFormatProvider? provider, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1, object? arg2) { throw null; } public static string Format(System.IFormatProvider? provider, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params object?[] args) { throw null; } - public static string Format(System.IFormatProvider? provider, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, System.ReadOnlySpan args) { throw null; } + public static string Format(System.IFormatProvider? provider, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params System.ReadOnlySpan args) { throw null; } public static string Format(System.IFormatProvider? provider, System.Text.CompositeFormat format, params object?[] args) { throw null; } - public static string Format(System.IFormatProvider? provider, System.Text.CompositeFormat format, System.ReadOnlySpan args) { throw null; } + public static string Format(System.IFormatProvider? provider, System.Text.CompositeFormat format, params System.ReadOnlySpan args) { throw null; } public static string Format([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0) { throw null; } public static string Format([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1) { throw null; } public static string Format([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1, object? arg2) { throw null; } public static string Format([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params object?[] args) { throw null; } - public static string Format([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, System.ReadOnlySpan args) { throw null; } + public static string Format([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params System.ReadOnlySpan args) { throw null; } public static string Format(System.IFormatProvider? provider, System.Text.CompositeFormat format, TArg0 arg0) { throw null; } public static string Format(System.IFormatProvider? provider, System.Text.CompositeFormat format, TArg0 arg0, TArg1 arg1) { throw null; } public static string Format(System.IFormatProvider? provider, System.Text.CompositeFormat format, TArg0 arg0, TArg1 arg1, TArg2 arg2) { throw null; } @@ -5341,15 +5341,15 @@ public void CopyTo(System.Span destination) { } public static bool IsNullOrEmpty([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(false)] string? value) { throw null; } public static bool IsNullOrWhiteSpace([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(false)] string? value) { throw null; } public static string Join(char separator, params object?[] values) { throw null; } - public static string Join(char separator, System.ReadOnlySpan values) { throw null; } + public static string Join(char separator, params System.ReadOnlySpan values) { throw null; } public static string Join(char separator, params string?[] value) { throw null; } - public static string Join(char separator, System.ReadOnlySpan value) { throw null; } + public static string Join(char separator, params System.ReadOnlySpan value) { throw null; } public static string Join(char separator, string?[] value, int startIndex, int count) { throw null; } public static string Join(string? separator, System.Collections.Generic.IEnumerable values) { throw null; } public static string Join(string? separator, params object?[] values) { throw null; } - public static string Join(string? separator, System.ReadOnlySpan values) { throw null; } + public static string Join(string? separator, params System.ReadOnlySpan values) { throw null; } public static string Join(string? separator, params string?[] value) { throw null; } - public static string Join(string? separator, System.ReadOnlySpan value) { throw null; } + public static string Join(string? separator, params System.ReadOnlySpan value) { throw null; } public static string Join(string? separator, string?[] value, int startIndex, int count) { throw null; } public static string Join(char separator, System.Collections.Generic.IEnumerable values) { throw null; } public static string Join(string? separator, System.Collections.Generic.IEnumerable values) { throw null; } @@ -5385,7 +5385,7 @@ public void CopyTo(System.Span destination) { } public string[] Split(char separator, int count, System.StringSplitOptions options = System.StringSplitOptions.None) { throw null; } public string[] Split(char separator, System.StringSplitOptions options = System.StringSplitOptions.None) { throw null; } public string[] Split(params char[]? separator) { throw null; } - public string[] Split(System.ReadOnlySpan separator) { throw null; } + public string[] Split(params System.ReadOnlySpan separator) { throw null; } public string[] Split(char[]? separator, int count) { throw null; } public string[] Split(char[]? separator, int count, System.StringSplitOptions options) { throw null; } public string[] Split(char[]? separator, System.StringSplitOptions options) { throw null; } @@ -5433,15 +5433,15 @@ public void CopyTo(System.Span destination) { } public string Trim() { throw null; } public string Trim(char trimChar) { throw null; } public string Trim(params char[]? trimChars) { throw null; } - public string Trim(System.ReadOnlySpan trimChars) { throw null; } + public string Trim(params System.ReadOnlySpan trimChars) { throw null; } public string TrimEnd() { throw null; } public string TrimEnd(char trimChar) { throw null; } public string TrimEnd(params char[]? trimChars) { throw null; } - public string TrimEnd(System.ReadOnlySpan trimChars) { throw null; } + public string TrimEnd(params System.ReadOnlySpan trimChars) { throw null; } public string TrimStart() { throw null; } public string TrimStart(char trimChar) { throw null; } public string TrimStart(params char[]? trimChars) { throw null; } - public string TrimStart(System.ReadOnlySpan trimChars) { throw null; } + public string TrimStart(params System.ReadOnlySpan trimChars) { throw null; } public bool TryCopyTo(System.Span destination) { throw null; } } public abstract partial class StringComparer : System.Collections.Generic.IComparer, System.Collections.Generic.IEqualityComparer, System.Collections.IComparer, System.Collections.IEqualityComparer @@ -7567,7 +7567,7 @@ public override void Write(string? s) { } public override void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0) { } public override void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1) { } public override void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params object?[] arg) { } - public override void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, System.ReadOnlySpan arg) { } + public override void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params System.ReadOnlySpan arg) { } public override System.Threading.Tasks.Task WriteAsync(char value) { throw null; } public override System.Threading.Tasks.Task WriteAsync(char[] buffer, int index, int count) { throw null; } public override System.Threading.Tasks.Task WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -7587,7 +7587,7 @@ public override void WriteLine(string? s) { } public override void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0) { } public override void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1) { } public override void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params object?[] arg) { } - public override void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, System.ReadOnlySpan arg) { } + public override void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params System.ReadOnlySpan arg) { } [System.CLSCompliantAttribute(false)] public override void WriteLine(uint value) { } public override System.Threading.Tasks.Task WriteLineAsync() { throw null; } @@ -10154,7 +10154,7 @@ public static partial class Path public static string Combine(string path1, string path2, string path3) { throw null; } public static string Combine(string path1, string path2, string path3, string path4) { throw null; } public static string Combine(params string[] paths) { throw null; } - public static string Combine(System.ReadOnlySpan paths) { throw null; } + public static string Combine(params System.ReadOnlySpan paths) { throw null; } public static bool EndsInDirectorySeparator(System.ReadOnlySpan path) { throw null; } public static bool EndsInDirectorySeparator([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? path) { throw null; } public static bool Exists([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? path) { throw null; } @@ -10192,7 +10192,7 @@ public static partial class Path public static string Join(string? path1, string? path2, string? path3) { throw null; } public static string Join(string? path1, string? path2, string? path3, string? path4) { throw null; } public static string Join(params string?[] paths) { throw null; } - public static string Join(System.ReadOnlySpan paths) { throw null; } + public static string Join(params System.ReadOnlySpan paths) { throw null; } public static System.ReadOnlySpan TrimEndingDirectorySeparator(System.ReadOnlySpan path) { throw null; } public static string TrimEndingDirectorySeparator(string path) { throw null; } public static bool TryJoin(System.ReadOnlySpan path1, System.ReadOnlySpan path2, System.ReadOnlySpan path3, System.Span destination, out int charsWritten) { throw null; } @@ -10359,7 +10359,7 @@ public override void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribut public override void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1) { } public override void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1, object? arg2) { } public override void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params object?[] arg) { } - public override void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, System.ReadOnlySpan arg) { } + public override void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params System.ReadOnlySpan arg) { } public override System.Threading.Tasks.Task WriteAsync(char value) { throw null; } public override System.Threading.Tasks.Task WriteAsync(char[] buffer, int index, int count) { throw null; } public override System.Threading.Tasks.Task WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -10370,7 +10370,7 @@ public override void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttr public override void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1) { } public override void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1, object? arg2) { } public override void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params object?[] arg) { } - public override void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, System.ReadOnlySpan arg) { } + public override void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params System.ReadOnlySpan arg) { } public override System.Threading.Tasks.Task WriteLineAsync() { throw null; } public override System.Threading.Tasks.Task WriteLineAsync(char value) { throw null; } public override System.Threading.Tasks.Task WriteLineAsync(char[] buffer, int index, int count) { throw null; } @@ -10488,7 +10488,7 @@ public virtual void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute public virtual void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1) { } public virtual void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1, object? arg2) { } public virtual void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params object?[] arg) { } - public virtual void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, System.ReadOnlySpan arg) { } + public virtual void Write([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params System.ReadOnlySpan arg) { } public virtual void Write(System.Text.StringBuilder? value) { } [System.CLSCompliantAttribute(false)] public virtual void Write(uint value) { } @@ -10517,7 +10517,7 @@ public virtual void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttri public virtual void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1) { } public virtual void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1, object? arg2) { } public virtual void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params object?[] arg) { } - public virtual void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, System.ReadOnlySpan arg) { } + public virtual void WriteLine([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params System.ReadOnlySpan arg) { } public virtual void WriteLine(System.Text.StringBuilder? value) { } [System.CLSCompliantAttribute(false)] public virtual void WriteLine(uint value) { } @@ -14973,25 +14973,25 @@ public StringBuilder(string? value, int startIndex, int length, int capacity) { public System.Text.StringBuilder AppendFormat(System.IFormatProvider? provider, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1) { throw null; } public System.Text.StringBuilder AppendFormat(System.IFormatProvider? provider, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1, object? arg2) { throw null; } public System.Text.StringBuilder AppendFormat(System.IFormatProvider? provider, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params object?[] args) { throw null; } - public System.Text.StringBuilder AppendFormat(System.IFormatProvider? provider, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, System.ReadOnlySpan args) { throw null; } + public System.Text.StringBuilder AppendFormat(System.IFormatProvider? provider, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params System.ReadOnlySpan args) { throw null; } public System.Text.StringBuilder AppendFormat(System.IFormatProvider? provider, System.Text.CompositeFormat format, params object?[] args) { throw null; } - public System.Text.StringBuilder AppendFormat(System.IFormatProvider? provider, System.Text.CompositeFormat format, System.ReadOnlySpan args) { throw null; } + public System.Text.StringBuilder AppendFormat(System.IFormatProvider? provider, System.Text.CompositeFormat format, params System.ReadOnlySpan args) { throw null; } public System.Text.StringBuilder AppendFormat([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0) { throw null; } public System.Text.StringBuilder AppendFormat([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1) { throw null; } public System.Text.StringBuilder AppendFormat([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, object? arg0, object? arg1, object? arg2) { throw null; } public System.Text.StringBuilder AppendFormat([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params object?[] args) { throw null; } - public System.Text.StringBuilder AppendFormat([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, System.ReadOnlySpan args) { throw null; } + public System.Text.StringBuilder AppendFormat([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("CompositeFormat")] string format, params System.ReadOnlySpan args) { throw null; } public System.Text.StringBuilder AppendFormat(System.IFormatProvider? provider, System.Text.CompositeFormat format, TArg0 arg0) { throw null; } public System.Text.StringBuilder AppendFormat(System.IFormatProvider? provider, System.Text.CompositeFormat format, TArg0 arg0, TArg1 arg1) { throw null; } public System.Text.StringBuilder AppendFormat(System.IFormatProvider? provider, System.Text.CompositeFormat format, TArg0 arg0, TArg1 arg1, TArg2 arg2) { throw null; } public System.Text.StringBuilder AppendJoin(char separator, params object?[] values) { throw null; } public System.Text.StringBuilder AppendJoin(char separator, params string?[] values) { throw null; } - public System.Text.StringBuilder AppendJoin(char separator, System.ReadOnlySpan values) { throw null; } - public System.Text.StringBuilder AppendJoin(char separator, System.ReadOnlySpan values) { throw null; } + public System.Text.StringBuilder AppendJoin(char separator, params System.ReadOnlySpan values) { throw null; } + public System.Text.StringBuilder AppendJoin(char separator, params System.ReadOnlySpan values) { throw null; } public System.Text.StringBuilder AppendJoin(string? separator, params object?[] values) { throw null; } public System.Text.StringBuilder AppendJoin(string? separator, params string?[] values) { throw null; } - public System.Text.StringBuilder AppendJoin(string? separator, System.ReadOnlySpan values) { throw null; } - public System.Text.StringBuilder AppendJoin(string? separator, System.ReadOnlySpan values) { throw null; } + public System.Text.StringBuilder AppendJoin(string? separator, params System.ReadOnlySpan values) { throw null; } + public System.Text.StringBuilder AppendJoin(string? separator, params System.ReadOnlySpan values) { throw null; } public System.Text.StringBuilder AppendJoin(char separator, System.Collections.Generic.IEnumerable values) { throw null; } public System.Text.StringBuilder AppendJoin(string? separator, System.Collections.Generic.IEnumerable values) { throw null; } public System.Text.StringBuilder AppendLine() { throw null; } @@ -15167,7 +15167,7 @@ public void CancelAfter(System.TimeSpan delay) { } public System.Threading.Tasks.Task CancelAsync() { throw null; } public static System.Threading.CancellationTokenSource CreateLinkedTokenSource(System.Threading.CancellationToken token) { throw null; } public static System.Threading.CancellationTokenSource CreateLinkedTokenSource(System.Threading.CancellationToken token1, System.Threading.CancellationToken token2) { throw null; } - public static System.Threading.CancellationTokenSource CreateLinkedTokenSource(System.ReadOnlySpan tokens) { throw null; } + public static System.Threading.CancellationTokenSource CreateLinkedTokenSource(params System.ReadOnlySpan tokens) { throw null; } public static System.Threading.CancellationTokenSource CreateLinkedTokenSource(params System.Threading.CancellationToken[] tokens) { throw null; } public void Dispose() { } protected virtual void Dispose(bool disposing) { } @@ -15373,7 +15373,7 @@ public void Wait(System.Threading.CancellationToken cancellationToken) { } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] public static void WaitAll(System.Collections.Generic.IEnumerable tasks, System.Threading.CancellationToken cancellationToken = default) { } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] - public static void WaitAll(System.ReadOnlySpan tasks) { } + public static void WaitAll(params System.ReadOnlySpan tasks) { } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] public static void WaitAll(params System.Threading.Tasks.Task[] tasks) { } [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] @@ -15395,18 +15395,18 @@ public static void WaitAll(System.Threading.Tasks.Task[] tasks, System.Threading public System.Threading.Tasks.Task WaitAsync(System.TimeSpan timeout, System.TimeProvider timeProvider) { throw null; } public System.Threading.Tasks.Task WaitAsync(System.TimeSpan timeout, System.TimeProvider timeProvider, System.Threading.CancellationToken cancellationToken) { throw null; } public static System.Threading.Tasks.Task WhenAll(System.Collections.Generic.IEnumerable tasks) { throw null; } - public static System.Threading.Tasks.Task WhenAll(System.ReadOnlySpan tasks) { throw null; } + public static System.Threading.Tasks.Task WhenAll(params System.ReadOnlySpan tasks) { throw null; } public static System.Threading.Tasks.Task WhenAll(params System.Threading.Tasks.Task[] tasks) { throw null; } public static System.Threading.Tasks.Task WhenAll(System.Collections.Generic.IEnumerable> tasks) { throw null; } - public static System.Threading.Tasks.Task WhenAll(System.ReadOnlySpan> tasks) { throw null; } + public static System.Threading.Tasks.Task WhenAll(params System.ReadOnlySpan> tasks) { throw null; } public static System.Threading.Tasks.Task WhenAll(params System.Threading.Tasks.Task[] tasks) { throw null; } public static System.Threading.Tasks.Task WhenAny(System.Collections.Generic.IEnumerable tasks) { throw null; } public static System.Threading.Tasks.Task WhenAny(System.Threading.Tasks.Task task1, System.Threading.Tasks.Task task2) { throw null; } - public static System.Threading.Tasks.Task WhenAny(System.ReadOnlySpan tasks) { throw null; } + public static System.Threading.Tasks.Task WhenAny(params System.ReadOnlySpan tasks) { throw null; } public static System.Threading.Tasks.Task WhenAny(params System.Threading.Tasks.Task[] tasks) { throw null; } public static System.Threading.Tasks.Task> WhenAny(System.Collections.Generic.IEnumerable> tasks) { throw null; } public static System.Threading.Tasks.Task> WhenAny(System.Threading.Tasks.Task task1, System.Threading.Tasks.Task task2) { throw null; } - public static System.Threading.Tasks.Task> WhenAny(System.ReadOnlySpan> tasks) { throw null; } + public static System.Threading.Tasks.Task> WhenAny(params System.ReadOnlySpan> tasks) { throw null; } public static System.Threading.Tasks.Task> WhenAny(params System.Threading.Tasks.Task[] tasks) { throw null; } public static System.Collections.Generic.IAsyncEnumerable WhenEach(System.Collections.Generic.IEnumerable tasks) { throw null; } public static System.Collections.Generic.IAsyncEnumerable WhenEach(params System.Threading.Tasks.Task[] tasks) { throw null; } diff --git a/src/libraries/System.Runtime/tests/System.IO.Tests/IndentedTextWriter.cs b/src/libraries/System.Runtime/tests/System.IO.Tests/IndentedTextWriter.cs index 84ebd066786a22..11b9ad7b82a193 100644 --- a/src/libraries/System.Runtime/tests/System.IO.Tests/IndentedTextWriter.cs +++ b/src/libraries/System.Runtime/tests/System.IO.Tests/IndentedTextWriter.cs @@ -104,7 +104,7 @@ public override void Write(string format, params object[] arg) LastCalledMethod = nameof(Write); } - public override void Write(string format, /*params*/ ReadOnlySpan arg) + public override void Write(string format, params ReadOnlySpan arg) { base.Write(format, arg); LastCalledMethod = nameof(Write); @@ -218,7 +218,7 @@ public override void WriteLine(string format, params object[] arg) LastCalledMethod = nameof(WriteLine); } - public override void WriteLine(string format, /*params*/ ReadOnlySpan arg) + public override void WriteLine(string format, params ReadOnlySpan arg) { base.WriteLine(format, arg); LastCalledMethod = nameof(WriteLine); diff --git a/src/libraries/System.Text.Json/ref/System.Text.Json.cs b/src/libraries/System.Text.Json/ref/System.Text.Json.cs index aac63df154c35b..3fd6af13262bf1 100644 --- a/src/libraries/System.Text.Json/ref/System.Text.Json.cs +++ b/src/libraries/System.Text.Json/ref/System.Text.Json.cs @@ -668,9 +668,9 @@ namespace System.Text.Json.Nodes public sealed partial class JsonArray : System.Text.Json.Nodes.JsonNode, System.Collections.Generic.ICollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.IList, System.Collections.IEnumerable { public JsonArray(System.Text.Json.Nodes.JsonNodeOptions? options = default(System.Text.Json.Nodes.JsonNodeOptions?)) { } - public JsonArray(System.Text.Json.Nodes.JsonNodeOptions options, System.ReadOnlySpan items) { } + public JsonArray(System.Text.Json.Nodes.JsonNodeOptions options, params System.ReadOnlySpan items) { } public JsonArray(System.Text.Json.Nodes.JsonNodeOptions options, params System.Text.Json.Nodes.JsonNode?[] items) { } - public JsonArray(System.ReadOnlySpan items) { } + public JsonArray(params System.ReadOnlySpan items) { } public JsonArray(params System.Text.Json.Nodes.JsonNode?[] items) { } public int Count { get { throw null; } } bool System.Collections.Generic.ICollection.IsReadOnly { get { throw null; } } @@ -1363,7 +1363,7 @@ public enum JsonTypeInfoKind } public static partial class JsonTypeInfoResolver { - public static System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Combine(System.ReadOnlySpan resolvers) { throw null; } + public static System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Combine(params System.ReadOnlySpan resolvers) { throw null; } public static System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Combine(params System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] resolvers) { throw null; } public static System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver WithAddedModifier(this System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver resolver, System.Action modifier) { throw null; } } diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonArray.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonArray.cs index f6f4bb0d873f83..8dd4b6f9d98e76 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonArray.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonArray.cs @@ -44,7 +44,7 @@ public JsonArray(JsonNodeOptions options, params JsonNode?[] items) : base(optio /// /// Options to control the behavior. /// The items to add to the new . - public JsonArray(JsonNodeOptions options, /*params*/ ReadOnlySpan items) : base(options) + public JsonArray(JsonNodeOptions options, params ReadOnlySpan items) : base(options) { InitializeFromSpan(items); } @@ -62,7 +62,7 @@ public JsonArray(params JsonNode?[] items) : base() /// Initializes a new instance of the class that contains items from the specified span. /// /// The items to add to the new . - public JsonArray(/*params*/ ReadOnlySpan items) : base() + public JsonArray(params ReadOnlySpan items) : base() { InitializeFromSpan(items); } diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfoResolver.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfoResolver.cs index 9bd63188cbe525..58cc32c795e45e 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfoResolver.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfoResolver.cs @@ -47,7 +47,7 @@ public static IJsonTypeInfoResolver Combine(params IJsonTypeInfoResolver?[] reso /// which typically define contract metadata for small subsets of types. /// It can also be used to fall back to wherever necessary. /// - public static IJsonTypeInfoResolver Combine(/*params*/ ReadOnlySpan resolvers) + public static IJsonTypeInfoResolver Combine(params ReadOnlySpan resolvers) { var resolverChain = new JsonTypeInfoResolverChain(); foreach (IJsonTypeInfoResolver? resolver in resolvers)