Class TranslationFamily
Class to represent a Translation Family Collection.
public class TranslationFamily : IDictionary<string, string>, ICollection<KeyValuePair<string, string>>, IEnumerable<KeyValuePair<string, string>>, IEnumerable
- Inheritance
-
TranslationFamily
- Implements
- Inherited Members
Constructors
TranslationFamily(string)
Initializes a new instance of TranslationFamily.
public TranslationFamily(string familyName)
Parameters
familyName
stringTranslation Family Name.
Properties
Count
Gets the number of elements contained in the TranslationFamily.
public int Count { get; }
Property Value
IsReadOnly
Gets a value indicating whether the TranslationFamily Collection is read-only.
public bool IsReadOnly { get; }
Property Value
this[string]
Gets or sets the element with the specified key.
public string this[string key] { get; set; }
Parameters
key
stringThe key of the element to get or set.
Property Value
- string
Element value.
Keys
Gets an ICollection containing the keys of the IDictionary.
public ICollection<string> Keys { get; }
Property Value
Values
Gets an ICollection containing the values of the IDictionary.
public ICollection<string> Values { get; }
Property Value
Methods
Add(KeyValuePair<string, string>)
Adds an element to the TranslationFamily.
public void Add(KeyValuePair<string, string> item)
Parameters
item
KeyValuePair<string, string>Element to be added.
Add(string, string)
Adds an element with the provided key and value to the TranslationFamily.
public void Add(string key, string value)
Parameters
key
stringThe object to use as the key of the element to add.
value
stringThe object to use as the value of the element to add.
Remarks
If the key already exist, the value will be replaced.
Clear()
Removes all items from the TranslationFamily.
public void Clear()
Contains(KeyValuePair<string, string>)
Determines whether the TranslationFamily contains a specific element.
public bool Contains(KeyValuePair<string, string> item)
Parameters
item
KeyValuePair<string, string>The element to be located in the TranslationFamily.
Returns
- bool
True if the TranslationFamily contains the element.
ContainsKey(string)
Determines whether the TranslationFamily contains an element with the specified key.
public bool ContainsKey(string key)
Parameters
key
stringThe key to locate in the TranslationFamily.
Returns
- bool
true if the TranslationFamily contains an element with the key.
CopyTo(KeyValuePair<string, string>[], int)
Copies the elements to an Array, starting at a particular Array index.
public void CopyTo(KeyValuePair<string, string>[] array, int arrayIndex)
Parameters
array
KeyValuePair<string, string>[]Destination Array.
arrayIndex
intIndex in array at which copying begins
~TranslationFamily()
Destructor class for the TranslationFamily objects.
protected ~TranslationFamily()
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
Returns
- IEnumerator<KeyValuePair<string, string>>
A IEnumerator that can be used to iterate through the collection.
Remove(KeyValuePair<string, string>)
Removes the first occurrence of a specific object from the TranslationFamily.
public bool Remove(KeyValuePair<string, string> item)
Parameters
item
KeyValuePair<string, string>The object to remove from the TranslationFamily.
Returns
Remove(string)
Removes the element with the specified key from the TranslationFamily.
public bool Remove(string key)
Parameters
key
stringThe key of the element to remove.
Returns
- bool
True if the element is successfully removed.
TryGetValue(string, out string)
Gets the value associated with the specified key.
public bool TryGetValue(string key, out string value)
Parameters
key
stringThe key whose value to get.
value
stringThe value associated with the specified key, if the key is found.
Returns
- bool
True if the object that implements IDictionary contains an element with the specified key.