### StringValues Constructors Source: https://learn.microsoft.com/dotnet/api/microsoft.extensions.primitives.stringvalues Initializes a new instance of the StringValues structure. ```APIDOC ## StringValues(String) ### Description Initializes a new instance of the StringValues structure using the specified string. ### Parameters #### Path Parameters - **value** (String) - Description: The string to initialize the StringValues with. ``` ```APIDOC ## StringValues(String[]) ### Description Initializes a new instance of the StringValues structure using the specified array of strings. ### Parameters #### Path Parameters - **values** (String[]) - Description: The array of strings to initialize the StringValues with. ``` -------------------------------- ### StringValues Methods Source: https://learn.microsoft.com/dotnet/api/microsoft.extensions.primitives.stringvalues Provides documentation for the methods available on the StringValues struct, enabling operations such as concatenation, equality comparison, iteration, and conversion to other types. ```APIDOC ## Concat Methods ### Concat(String, StringValues) Concatenates a specified instance of String with a specified StringValues. ### Concat(StringValues, String) Concatenates a specified instance of StringValues with a specified String. ### Concat(StringValues, StringValues) Concatenates two specified instances of StringValues. ## Equality Methods ### Equals(Object) Determines whether this instance and a specified object have the same value. ### Equals(String, StringValues) Determines whether the specified String and StringValues objects have the same values. ### Equals(String) Determines whether this instance and a specified String have the same value. ### Equals(String[], StringValues) Determines whether the specified string array and StringValues objects have the same values. ### Equals(String[]) Determines whether this instance and a specified string array have the same values. ### Equals(StringValues, String) Determines whether the specified StringValues and String objects have the same values. ### Equals(StringValues, String[]) Determines whether the specified StringValues and string array objects have the same values. ### Equals(StringValues, StringValues) Determines whether two specified StringValues objects have the same values in the same order. ### Equals(StringValues) Determines whether this instance and another specified StringValues object have the same values. ## Enumeration and Hashing ### GetEnumerator() Retrieves an object that can iterate through the individual strings in this StringValues. ### GetHashCode() Returns a hash code for this instance. ## Utility Methods ### IsNullOrEmpty(StringValues) Indicates whether the specified StringValues contains no string values. ### ToArray() Creates a string array from the current StringValues object. ### ToString() Converts the value of the current StringValues object to its equivalent string representation, with multiple values joined as a comma separated string. ``` -------------------------------- ### Explicit Interface Implementations for StringValues Source: https://learn.microsoft.com/dotnet/api/microsoft.extensions.primitives.stringvalues These methods are explicit implementations of ICollection and IList for StringValues, providing collection manipulation capabilities. ```APIDOC ## ICollection.Add(String) ### Description Adds an item to the collection. ### Method `ICollection.Add` ### Parameters - **item** (String) - The string to add to the collection. ``` ```APIDOC ## ICollection.Clear() ### Description Removes all items from the collection. ### Method `ICollection.Clear` ``` ```APIDOC ## ICollection.Contains(String) ### Description Determines whether a string is in the StringValues. ### Method `ICollection.Contains` ### Parameters - **item** (String) - The string to check for existence in the collection. ``` ```APIDOC ## ICollection.CopyTo(String[], Int32) ### Description Copies the entire StringValues to a string array, starting at the specified index of the target array. ### Method `ICollection.CopyTo` ### Parameters - **array** (String[]) - The one-dimensional Array that is the destination of the elements copied from StringValues. The Array must have zero-based indexing. - **arrayIndex** (Int32) - The zero-based index in array at which copying begins. ``` ```APIDOC ## ICollection.IsReadOnly ### Description Gets a value indicating whether the collection is read-only. ### Method `ICollection.IsReadOnly` ### Returns `true` if the collection is read-only; otherwise, `false`. ``` ```APIDOC ## ICollection.Remove(String) ### Description Removes the first occurrence of a specific object from the collection. ### Method `ICollection.Remove` ### Parameters - **item** (String) - The string to remove from the collection. ### Returns `true` if the item was successfully removed; otherwise, `false`. ``` ```APIDOC ## IEnumerable.GetEnumerator() ### Description Returns an enumerator that iterates through a collection. ### Method `IEnumerable.GetEnumerator` ``` ```APIDOC ## IEnumerable.GetEnumerator() ### Description Returns an enumerator that iterates through the collection. ### Method `IEnumerable.GetEnumerator` ``` ```APIDOC ## IList.IndexOf(String) ### Description Returns the zero-based index of the first occurrence of an item in the StringValues. ### Method `IList.IndexOf` ### Parameters - **item** (String) - The string to locate in the StringValues. ### Returns The zero-based index of the item if found; otherwise, -1. ``` ```APIDOC ## IList.Insert(Int32, String) ### Description Inserts an item to the IList at the specified index. ### Method `IList.Insert` ### Parameters - **index** (Int32) - The zero-based index at which the item should be inserted. - **item** (String) - The string to insert into the collection. ``` ```APIDOC ## IList.Item[Int32] ### Description Gets the String at the specified index. ### Method `IList.Item` ### Parameters - **index** (Int32) - The zero-based index of the element to get. ### Returns The string at the specified index. ``` ```APIDOC ## IList.RemoveAt(Int32) ### Description Removes the IList item at the specified index. ### Method `IList.RemoveAt` ### Parameters - **index** (Int32) - The zero-based index of the item to remove. ``` -------------------------------- ### Extension Methods for IEnumerable Source: https://learn.microsoft.com/dotnet/api/microsoft.extensions.primitives.stringvalues Provides extension methods to create various immutable collection types from an IEnumerable source. ```APIDOC ## ToAsyncEnumerable(IEnumerable) ### Description Creates a new IAsyncEnumerable that iterates through `source`. ### Method `ToAsyncEnumerable` ### Parameters - **source** (IEnumerable) - An IEnumerable to convert to an IAsyncEnumerable. ``` ```APIDOC ## ToFrozenDictionary(IEnumerable, Func, Func, IEqualityComparer) ### Description Creates a FrozenDictionary from an IEnumerable according to specified key selector and element selector functions. ### Method `ToFrozenDictionary` ### Parameters - **source** (IEnumerable) - The source IEnumerable to create a dictionary from. - **keySelector** (Func) - A function to extract the key from each element. - **elementSelector** (Func) - A function to select the value from each element. - **comparer** (IEqualityComparer) - An IEqualityComparer to compare keys. ``` ```APIDOC ## ToFrozenDictionary(IEnumerable, Func, IEqualityComparer) ### Description Creates a FrozenDictionary from an IEnumerable according to specified key selector function. ### Method `ToFrozenDictionary` ### Parameters - **source** (IEnumerable) - The source IEnumerable to create a dictionary from. - **keySelector** (Func) - A function to extract the key from each element. - **comparer** (IEqualityComparer) - An IEqualityComparer to compare keys. ``` ```APIDOC ## ToFrozenSet(IEnumerable, IEqualityComparer) ### Description Creates a FrozenSet with the specified values. ### Method `ToFrozenSet` ### Parameters - **source** (IEnumerable) - The source IEnumerable to create a set from. - **comparer** (IEqualityComparer) - An IEqualityComparer to compare elements. ``` ```APIDOC ## ToImmutableArray(IEnumerable) ### Description Creates an immutable array from the specified collection. ### Method `ToImmutableArray` ### Parameters - **source** (IEnumerable) - The collection of elements to create an immutable array from. ``` ```APIDOC ## ToImmutableDictionary(IEnumerable, Func, Func, IEqualityComparer, IEqualityComparer) ### Description Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key and value comparers. ### Method `ToImmutableDictionary` ### Parameters - **source** (IEnumerable) - The sequence to create an immutable dictionary from. - **keySelector** (Func) - A function to extract the key from each element. - **elementSelector** (Func) - A function to select the value from each element. - **keyComparer** (IEqualityComparer) - An IEqualityComparer to compare keys. - **valueComparer** (IEqualityComparer) - An IEqualityComparer to compare values. ``` ```APIDOC ## ToImmutableDictionary(IEnumerable, Func, Func, IEqualityComparer) ### Description Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key comparer. ### Method `ToImmutableDictionary` ### Parameters - **source** (IEnumerable) - The sequence to create an immutable dictionary from. - **keySelector** (Func) - A function to extract the key from each element. - **elementSelector** (Func) - A function to select the value from each element. - **keyComparer** (IEqualityComparer) - An IEqualityComparer to compare keys. ``` ```APIDOC ## ToImmutableDictionary(IEnumerable, Func, Func) ### Description Enumerates and transforms a sequence, and produces an immutable dictionary of its contents. ### Method `ToImmutableDictionary` ### Parameters - **source** (IEnumerable) - The sequence to create an immutable dictionary from. - **keySelector** (Func) - A function to extract the key from each element. - **elementSelector** (Func) - A function to select the value from each element. ``` ```APIDOC ## ToImmutableDictionary(IEnumerable, Func, IEqualityComparer) ### Description Constructs an immutable dictionary based on some transformation of a sequence. ### Method `ToImmutableDictionary` ### Parameters - **source** (IEnumerable) - The sequence to create an immutable dictionary from. - **keySelector** (Func) - A function to extract the key from each element. - **comparer** (IEqualityComparer) - An IEqualityComparer to compare keys. ``` ```APIDOC ## ToImmutableDictionary(IEnumerable, Func) ### Description Constructs an immutable dictionary from an existing collection of elements, applying a transformation function to the source keys. ### Method `ToImmutableDictionary` ### Parameters - **source** (IEnumerable) - The collection of elements to create an immutable dictionary from. - **keySelector** (Func) - A function to extract the key from each element. ``` ```APIDOC ## ToImmutableHashSet(IEnumerable, IEqualityComparer) ### Description Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type. ### Method `ToImmutableHashSet` ### Parameters - **source** (IEnumerable) - The sequence to create an immutable hash set from. - **comparer** (IEqualityComparer) - An IEqualityComparer to compare elements. ``` ```APIDOC ## ToImmutableHashSet(IEnumerable) ### Description Enumerates a sequence and produces an immutable hash set of its contents. ### Method `ToImmutableHashSet` ### Parameters - **source** (IEnumerable) - The sequence to create an immutable hash set from. ``` ```APIDOC ## ToImmutableList(IEnumerable) ### Description Enumerates a sequence and produces an immutable list of its contents. ### Method `ToImmutableList` ### Parameters - **source** (IEnumerable) - The sequence to create an immutable list from. ``` ```APIDOC ## ToImmutableSortedDictionary(IEnumerable, Func, Func, IComparer, IEqualityComparer) ### Description Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key and value comparers. ### Method `ToImmutableSortedDictionary` ### Parameters - **source** (IEnumerable) - The sequence to create an immutable sorted dictionary from. - **keySelector** (Func) - A function to extract the key from each element. - **elementSelector** (Func) - A function to select the value from each element. - **keyComparer** (IComparer) - An IComparer to compare keys. - **valueComparer** (IEqualityComparer) - An IEqualityComparer to compare values. ``` ```APIDOC ## ToImmutableSortedDictionary(IEnumerable, Func, Func, IComparer) ### Description Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key comparer. ### Method `ToImmutableSortedDictionary` ### Parameters - **source** (IEnumerable) - The sequence to create an immutable sorted dictionary from. - **keySelector** (Func) - A function to extract the key from each element. - **elementSelector** (Func) - A function to select the value from each element. - **keyComparer** (IComparer) - An IComparer to compare keys. ``` ```APIDOC ## ToImmutableSortedDictionary(IEnumerable, Func, Func) ### Description Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents. ### Method `ToImmutableSortedDictionary` ### Parameters - **source** (IEnumerable) - The sequence to create an immutable sorted dictionary from. - **keySelector** (Func) - A function to extract the key from each element. - **elementSelector** (Func) - A function to select the value from each element. ``` ```APIDOC ## ToImmutableSortedSet(IEnumerable, IComparer) ### Description Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer. ### Method `ToImmutableSortedSet` ### Parameters - **source** (IEnumerable) - The sequence to create an immutable sorted set from. - **comparer** (IComparer) - An IComparer to compare elements. ``` ```APIDOC ## ToImmutableSortedSet(IEnumerable) ### Description Enumerates a sequence and produces an immutable sorted set of its contents. ### Method `ToImmutableSortedSet` ### Parameters - **source** (IEnumerable) - The sequence to create an immutable sorted set from. ``` -------------------------------- ### StringValues Properties Source: https://learn.microsoft.com/dotnet/api/microsoft.extensions.primitives.stringvalues Properties of the StringValues struct. ```APIDOC ## Count ### Description Gets the number of String elements contained in this StringValues. ### Type Int32 ``` ```APIDOC ## Item[Int32] ### Description Gets the String at the specified index. ### Parameters #### Path Parameters - **index** (Int32) - Description: The zero-based index of the element to get. ``` -------------------------------- ### StringValues Fields Source: https://learn.microsoft.com/dotnet/api/microsoft.extensions.primitives.stringvalues Provides static members for the StringValues struct. ```APIDOC ## Empty ### Description A readonly instance of the StringValues struct whose value is an empty string array. ### Type StringValues ``` -------------------------------- ### StringValues Operators Source: https://learn.microsoft.com/dotnet/api/microsoft.extensions.primitives.stringvalues Details the operators defined for the StringValues struct, facilitating comparisons and conversions between StringValues, String, Object, and string arrays. ```APIDOC ## Equality Operators ### Equality(Object, StringValues) Determines whether the specified Object (StringValues, String, or String array) and StringValues have the same value. ### Equality(String, StringValues) Determines whether the specified String and StringValues objects have the same values. ### Equality(String[], StringValues) Determines whether the specified string array and StringValues objects have the same values. ### Equality(StringValues, Object) Determines whether the specified StringValues and Object (StringValues, String, or String array) have the same value. ### Equality(StringValues, String) Determines whether the specified StringValues and String objects have the same values. ### Equality(StringValues, String[]) Determines whether the specified StringValues and string array objects have the same values. ### Equality(StringValues, StringValues) Determines whether two specified StringValues have the same values. ## Inequality Operators ### Inequality(Object, StringValues) Determines whether the specified Object and StringValues object have different values. ### Inequality(String, StringValues) Determines whether the specified String and StringValues objects have different values. ### Inequality(String[], StringValues) Determines whether the specified string array and StringValues have different values. ### Inequality(StringValues, Object) Determines whether the specified StringValues and Object (StringValues, String, or String array) have different values. ### Inequality(StringValues, String) Determines whether the specified StringValues and String objects have different values. ### Inequality(StringValues, String[]) Determines whether the specified StringValues and string array have different values. ### Inequality(StringValues, StringValues) Determines whether two specified StringValues have different values. ## Implicit Conversion Operators ### Implicit(String to StringValues) Defines an implicit conversion of a given string to a StringValues. ### Implicit(String[] to StringValues) Defines an implicit conversion of a given string array to a StringValues. ### Implicit(StringValues to String) Defines an implicit conversion of a given StringValues to a string, with multiple values joined as a comma separated string. ### Implicit(StringValues to String[]) Defines an implicit conversion of a given StringValues to a string array. ``` -------------------------------- ### StringValues Struct Definition (VB.NET) Source: https://learn.microsoft.com/dotnet/api/microsoft.extensions.primitives.stringvalues Defines the StringValues structure in VB.NET, highlighting its implementation of multiple interfaces for string handling. ```vbnet Public Structure StringValues Implements ICollection(Of String), IEnumerable(Of String), IEquatable(Of String()), IEquatable(Of String), IEquatable(Of StringValues), IList(Of String), IReadOnlyCollection(Of String), IReadOnlyList(Of String) ``` -------------------------------- ### StringValues Struct Definition (F#) Source: https://learn.microsoft.com/dotnet/api/microsoft.extensions.primitives.stringvalues Defines the StringValues struct in F#, showing its implementation of various list and collection interfaces. ```fsharp type StringValues = struct interface IList interface ICollection interface seq interface IEnumerable interface IReadOnlyList interface IReadOnlyCollection ``` -------------------------------- ### StringValues Struct Definition (C#) Source: https://learn.microsoft.com/dotnet/api/microsoft.extensions.primitives.stringvalues Defines the StringValues struct in C#, indicating its implementation of multiple interfaces for string collection and comparison. ```csharp public readonly struct StringValues : IEquatable, IEquatable, IEquatable, System.Collections.Generic.ICollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.IList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IReadOnlyList ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.