Table of Contents

Class StringKeyStoreCollection

Namespace
Sisk.Core.Entity
Assembly
Sisk.Core.dll

Represents a collection of string keys associated with multiple string values.

public class StringKeyStoreCollection : IDictionary<string, string[]>, ICollection<KeyValuePair<string, string[]>>, IEnumerable<KeyValuePair<string, string[]>>, IEnumerable
Inheritance
StringKeyStoreCollection
Implements
Derived
Inherited Members

Constructors

StringKeyStoreCollection()

Initializes a new instance of the StringKeyStoreCollection class,

StringKeyStoreCollection(IEqualityComparer<string>)

Initializes a new instance of the StringKeyStoreCollection class with a specified comparer.

StringKeyStoreCollection(IEqualityComparer<string>, IDictionary<string, string[]>?)

Initializes a new instance of the StringKeyStoreCollection class,

Properties

Comparer

Gets the IEqualityComparer<T> used to compare keys in this StringKeyStoreCollection.

Count

Gets the number of key-value pairs in the StringKeyStoreCollection.

IsReadOnly

Gets a value indicating whether the StringKeyStoreCollection is read-only.

this[string]

Gets or sets the array of values associated with the specified key. Returns null if the key does not exist in the store.

Keys

Gets the collection of keys in the StringKeyStoreCollection.

Values

Gets the collection of values in the StringKeyStoreCollection as arrays. Each key may have multiple associated values.

Methods

Add(KeyValuePair<string, string[]>)

Adds a key-value pair to the StringKeyStoreCollection.

Add(string, IEnumerable<string>)

Adds a collection of values associated with the specified key.

Add(string, string)

Adds a single value associated with the specified key.

Add(string, string[])

Adds an array of values associated with the specified key.

AddRange(IEnumerable<KeyValuePair<string, string[]>>)

Adds the elements of the specified collection to the end of this collection.

AddRange(IEnumerable<KeyValuePair<string, string?>>)

Adds the elements of the specified collection to the end of this collection.

AsDictionary()

Copies the contents of this StringKeyStoreCollection into an Dictionary<TKey, TValue>.

AsNameValueCollection()

Copies the contents of this StringKeyStoreCollection into an NameValueCollection, with values separated with an comma (,).

AsStringValueCollection()

Copies the contents of this StringKeyStoreCollection into an StringValueCollection.

Clear()

Removes all key-value pairs from the StringKeyStoreCollection. Throws an exception if the store is read-only.

ContainsKey(string)

Determines whether the StringKeyStoreCollection contains a specific key.

FromCookieString(string)

Creates a new instance of the StringKeyStoreCollection from a cookie string. The query string should be in the format of "key1=value1; key2=value2".

FromNameValueCollection(NameValueCollection)

Creates a new instance of the StringKeyStoreCollection from a NameValueCollection.

FromQueryString(string)

Creates a new instance of the StringKeyStoreCollection from a query string. The query string should be in the format of "key1=value1&key2=value2".

GetEnumerator()
GetValue(string)

Retrieves the last value associated with the specified key. Returns null if the key does not exist.

GetValues(string)

Retrieves all values associated with the specified key. Returns an empty array if the key does not exist.

ImportCookieString(string)

Imports key-value pairs from a cookie string into the StringKeyStoreCollection. The query string should be in the format of "key1=value1; key2=value2".

ImportNameValueCollection(NameValueCollection)

Imports key-value pairs from a NameValueCollection into the StringKeyStoreCollection. Each key can have multiple associated values.

ImportQueryString(string)

Imports key-value pairs from a query string into the StringKeyStoreCollection. The query string should be in the format of "key1=value1&key2=value2".

MakeReadOnly()

Marks the StringKeyStoreCollection as read-only, preventing further modifications.

Remove(string)

Removes the value associated with the specified key from the StringKeyStoreCollection. Throws an exception if the store is read-only.

Set(KeyValuePair<string, string[]>)

Sets the value associated with the specified key, replacing any existing values.

Set(string, IEnumerable<string>)

Sets the collection of values associated with the specified key, replacing any existing values.

Set(string, string)

Sets the value associated with the specified key, replacing any existing values.

SetRange(IEnumerable<KeyValuePair<string, string[]>>)

Sets the elements of the specified collection, replacing existing values.

ToString()

Returns a string that represents the current object.

ToString(IFormatProvider?)

Returns a string that represents the current object, using the specified format provider.

TryGetValue(string, out string[])

Tries to get the array of values associated with the specified key.