HyphenationDictionaryCollection Class
Represents a collection of HyphenationDictionary instances associated with specified culture information.
public sealed class HyphenationDictionaryCollection : IDictionary<CultureInfo, HyphenationDictionary>, ICollection<KeyValuePair<CultureInfo, HyphenationDictionary>>, IEnumerable<KeyValuePair<CultureInfo, HyphenationDictionary>>, IEnumerable
Public NotInheritable Class HyphenationDictionaryCollection
Implements IDictionary(Of CultureInfo, HyphenationDictionary), ICollection(Of KeyValuePair(Of CultureInfo, HyphenationDictionary)), IEnumerable(Of KeyValuePair(Of CultureInfo, HyphenationDictionary)), IEnumerable
- Inheritance:
- System.ObjectHyphenationDictionaryCollection
Implements
Properties
Count
Gets the number of key/value pairs contained in the HyphenationDictionaryCollection.
Property Value
- System.Int32
The number of key/value pairs contained in the HyphenationDictionaryCollection.
Item[CultureInfo]
Gets or sets the value associated with the specified key.
public HyphenationDictionary this[CultureInfo key] { get; set; }
Public Property Item(key As CultureInfo) As HyphenationDictionary
Parameters
key
- System.Globalization.CultureInfo
The key of the value to get or set.
Property Value
The value associated with the specified key.
Keys
Gets a collection containing the keys in the HyphenationDictionaryCollection.
public ICollection<CultureInfo> Keys { get; }
Public ReadOnly Property Keys As ICollection(Of CultureInfo)
Property Value
- System.Collections.Generic.ICollection<System.Globalization.CultureInfo>
A collection containing the keys in the HyphenationDictionaryCollection.
Values
Gets a collection containing the values in the HyphenationDictionaryCollection.
public ICollection<HyphenationDictionary> Values { get; }
Public ReadOnly Property Values As ICollection(Of HyphenationDictionary)
Property Value
- System.Collections.Generic.ICollection<HyphenationDictionary>
A collection containing the values in the HyphenationDictionaryCollection.
Methods
Add(CultureInfo, HyphenationDictionary)
Adds the specified key and value to the HyphenationDictionaryCollection.
public void Add(CultureInfo key, HyphenationDictionary value)
Public Sub Add(key As CultureInfo, value As HyphenationDictionary)
Parameters
key
- System.Globalization.CultureInfo
The key of the element to add.
The value of the element to add.
Clear()
Removes all keys and values from the HyphenationDictionaryCollection.
ContainsKey(CultureInfo)
Determines whether the HyphenationDictionaryCollection contains the specified key.
public bool ContainsKey(CultureInfo key)
Public Function ContainsKey(key As CultureInfo) As Boolean
Parameters
key
- System.Globalization.CultureInfo
The key to locate in the HyphenationDictionaryCollection.
Returns
- System.Boolean
true
if the HyphenationDictionaryCollection contains an element with the specified key; otherwise, false
.
Remove(CultureInfo)
Removes the value with the specified key from the HyphenationDictionaryCollection.
Parameters
key
- System.Globalization.CultureInfo
The key of the element to remove.
Returns
- System.Boolean
true
if the element is successfully found and removed; otherwise, false
. This method returns false
if key is not found in the HyphenationDictionaryCollection.
TryGetValue(CultureInfo, out HyphenationDictionary)
Gets the value associated with the specified key.
public bool TryGetValue(CultureInfo key, out HyphenationDictionary value)
Public Function TryGetValue(key As CultureInfo, ByRef value As HyphenationDictionary) As Boolean
Parameters
key
- System.Globalization.CultureInfo
The key of the value to get.
When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value
parameter. This parameter is passed uninitialized.
Returns
- System.Boolean
true
if the HyphenationDictionaryCollection contains an element with the specified key; otherwise, false
.
Events
HyphenationDictionaryLoading
Occurs when a hyphenation dictionary is being loaded for the specified culture information. This event must be handled in cases when no hyphenation dictionary was found for the specified culture information.
public event EventHandler<HyphenationDictionaryLoadingEventArgs> HyphenationDictionaryLoading
Public Event HyphenationDictionaryLoading As EventHandler(Of HyphenationDictionaryLoadingEventArgs)
Event Type
- System.EventHandler<HyphenationDictionaryLoadingEventArgs>