Class StringMap
Efficeintly maps string -> string for serialization.
Compared to Dictionary[string,string] this class yields 20%-50% better Slim serialization speed improvement and 5%-10% space improvement
Inheritance
System.Object
StringMap
Implements
System.Collections.Generic.IDictionary<System.String, System.String>
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String, System.String>>
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Azos.dll
Syntax
[Serializable]
public sealed class StringMap : IDictionary<string, string>, ICollection<KeyValuePair<string, string>>, IEnumerable<KeyValuePair<string, string>>, IEnumerable, IJSONWritable
Constructors
StringMap(Boolean)
Declaration
public StringMap(bool senseCase = true)
Parameters
Type |
Name |
Description |
System.Boolean |
senseCase |
|
Properties
CaseSensitive
Declaration
public bool CaseSensitive { get; }
Property Value
Type |
Description |
System.Boolean |
|
Count
Declaration
public int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
IsReadOnly
Declaration
public bool IsReadOnly { get; }
Property Value
Type |
Description |
System.Boolean |
|
Item[String]
Declaration
public string this[string key] { get; set; }
Parameters
Type |
Name |
Description |
System.String |
key |
|
Property Value
Type |
Description |
System.String |
|
Keys
Declaration
public ICollection<string> Keys { get; }
Property Value
Type |
Description |
System.Collections.Generic.ICollection<System.String> |
|
Values
Declaration
public ICollection<string> Values { get; }
Property Value
Type |
Description |
System.Collections.Generic.ICollection<System.String> |
|
Methods
Add(KeyValuePair<String, String>)
Declaration
public void Add(KeyValuePair<string, string> item)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<System.String, System.String> |
item |
|
Add(String, String)
Declaration
public void Add(string key, string value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.String |
value |
|
Clear()
Declaration
Contains(KeyValuePair<String, String>)
Declaration
public bool Contains(KeyValuePair<string, string> item)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<System.String, System.String> |
item |
|
Returns
Type |
Description |
System.Boolean |
|
ContainsKey(String)
Declaration
public bool ContainsKey(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
CopyTo(KeyValuePair<String, String>[], Int32)
Declaration
public void CopyTo(KeyValuePair<string, string>[] array, int arrayIndex)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<System.String, System.String>[] |
array |
|
System.Int32 |
arrayIndex |
|
GetEnumerator()
Declaration
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
Returns
Type |
Description |
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, System.String>> |
|
Remove(KeyValuePair<String, String>)
Declaration
public bool Remove(KeyValuePair<string, string> item)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<System.String, System.String> |
item |
|
Returns
Type |
Description |
System.Boolean |
|
Remove(String)
Declaration
public bool Remove(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
TryGetValue(String, out String)
Declaration
public bool TryGetValue(string key, out string value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.String |
value |
|
Returns
Type |
Description |
System.Boolean |
|
WriteAsJSON(TextWriter, Int32, JSONWritingOptions)
Declaration
public void WriteAsJSON(TextWriter wri, int nestingLevel, JSONWritingOptions options = null)
Parameters
Type |
Name |
Description |
System.IO.TextWriter |
wri |
|
System.Int32 |
nestingLevel |
|
JSONWritingOptions |
options |
|
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type |
Description |
System.Collections.IEnumerator |
|
Implements
System.Collections.Generic.IDictionary<TKey, TValue>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
Extension Methods