Struct StringValues
- Namespace
- Acuit.Pinpoint.Primitives
- Assembly
- Acuit.Pinpoint.Configuration.dll
Represents zero/null, one, or many strings in an efficient way.
public readonly struct StringValues : IList<string>, ICollection<string>, IReadOnlyList<string>, IReadOnlyCollection<string>, IEnumerable<string>, IEnumerable, IEquatable<StringValues>, IEquatable<string>, IEquatable<string[]>
- Implements
-
IEquatable<string[]>
- Inherited Members
Constructors
StringValues(string)
public StringValues(string value)
Parameters
value
string
StringValues(string[])
public StringValues(string[] values)
Parameters
values
string[]
Fields
Empty
public static readonly StringValues Empty
Field Value
Properties
Count
Gets the number of elements contained in the ICollection<T>.
public int Count { get; }
Property Value
- int
The number of elements contained in the ICollection<T>.
this[int]
Gets the element at the specified index in the read-only list.
public string this[int index] { get; }
Parameters
index
intThe zero-based index of the element to get.
Property Value
- string
The element at the specified index in the read-only list.
Methods
Concat(StringValues, StringValues)
public static StringValues Concat(StringValues values1, StringValues values2)
Parameters
values1
StringValuesvalues2
StringValues
Returns
Concat(in StringValues, string)
public static StringValues Concat(in StringValues values, string value)
Parameters
values
StringValuesvalue
string
Returns
Concat(string, in StringValues)
public static StringValues Concat(string value, in StringValues values)
Parameters
value
stringvalues
StringValues
Returns
Equals(StringValues)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(StringValues other)
Parameters
other
StringValuesAn object to compare with this object.
Returns
Equals(StringValues, StringValues)
public static bool Equals(StringValues left, StringValues right)
Parameters
left
StringValuesright
StringValues
Returns
Equals(StringValues, string)
public static bool Equals(StringValues left, string right)
Parameters
left
StringValuesright
string
Returns
Equals(StringValues, string[])
public static bool Equals(StringValues left, string[] right)
Parameters
left
StringValuesright
string[]
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
Equals(string)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(string other)
Parameters
other
stringAn object to compare with this object.
Returns
Equals(string, StringValues)
public static bool Equals(string left, StringValues right)
Parameters
left
stringright
StringValues
Returns
Equals(string[])
Indicates whether the current object is equal to another object of the same type.
public bool Equals(string[] other)
Parameters
other
string[]An object to compare with this object.
Returns
Equals(string[], StringValues)
public static bool Equals(string[] left, StringValues right)
Parameters
left
string[]right
StringValues
Returns
GetEnumerator()
public StringValues.Enumerator GetEnumerator()
Returns
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
IsNullOrEmpty(StringValues)
public static bool IsNullOrEmpty(StringValues value)
Parameters
value
StringValues
Returns
ToArray()
public string[] ToArray()
Returns
- string[]
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(StringValues, StringValues)
public static bool operator ==(StringValues left, StringValues right)
Parameters
left
StringValuesright
StringValues
Returns
operator ==(StringValues, object)
public static bool operator ==(StringValues left, object right)
Parameters
left
StringValuesright
object
Returns
operator ==(StringValues, string)
public static bool operator ==(StringValues left, string right)
Parameters
left
StringValuesright
string
Returns
operator ==(StringValues, string[])
public static bool operator ==(StringValues left, string[] right)
Parameters
left
StringValuesright
string[]
Returns
operator ==(object, StringValues)
public static bool operator ==(object left, StringValues right)
Parameters
left
objectright
StringValues
Returns
operator ==(string, StringValues)
public static bool operator ==(string left, StringValues right)
Parameters
left
stringright
StringValues
Returns
operator ==(string[], StringValues)
public static bool operator ==(string[] left, StringValues right)
Parameters
left
string[]right
StringValues
Returns
implicit operator string(StringValues)
public static implicit operator string(StringValues values)
Parameters
values
StringValues
Returns
implicit operator string[](StringValues)
public static implicit operator string[](StringValues value)
Parameters
value
StringValues
Returns
- string[]
implicit operator StringValues(string)
public static implicit operator StringValues(string value)
Parameters
value
string
Returns
implicit operator StringValues(string[])
public static implicit operator StringValues(string[] values)
Parameters
values
string[]
Returns
operator !=(StringValues, StringValues)
public static bool operator !=(StringValues left, StringValues right)
Parameters
left
StringValuesright
StringValues
Returns
operator !=(StringValues, object)
public static bool operator !=(StringValues left, object right)
Parameters
left
StringValuesright
object
Returns
operator !=(StringValues, string)
public static bool operator !=(StringValues left, string right)
Parameters
left
StringValuesright
string
Returns
operator !=(StringValues, string[])
public static bool operator !=(StringValues left, string[] right)
Parameters
left
StringValuesright
string[]
Returns
operator !=(object, StringValues)
public static bool operator !=(object left, StringValues right)
Parameters
left
objectright
StringValues
Returns
operator !=(string, StringValues)
public static bool operator !=(string left, StringValues right)
Parameters
left
stringright
StringValues
Returns
operator !=(string[], StringValues)
public static bool operator !=(string[] left, StringValues right)
Parameters
left
string[]right
StringValues