CharacterMetricsDictionary 类

定义

表示通过 Unicode 标量值编制索引的设备字体的 CharacterMetrics 对象字典。Represents a dictionary of CharacterMetrics objects for a device font that is indexed by Unicode scalar values.

public ref class CharacterMetricsDictionary sealed : System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<int, System::Windows::Media::CharacterMetrics ^>>, System::Collections::Generic::IDictionary<int, System::Windows::Media::CharacterMetrics ^>, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<int, System::Windows::Media::CharacterMetrics ^>>, System::Collections::IDictionary
public sealed class CharacterMetricsDictionary : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<int,System.Windows.Media.CharacterMetrics>>, System.Collections.Generic.IDictionary<int,System.Windows.Media.CharacterMetrics>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<int,System.Windows.Media.CharacterMetrics>>, System.Collections.IDictionary
type CharacterMetricsDictionary = class
    interface IDictionary<int, CharacterMetrics>
    interface ICollection<KeyValuePair<int, CharacterMetrics>>
    interface seq<KeyValuePair<int, CharacterMetrics>>
    interface IEnumerable
    interface IDictionary
    interface ICollection
Public NotInheritable Class CharacterMetricsDictionary
Implements ICollection(Of KeyValuePair(Of Integer, CharacterMetrics)), IDictionary, IDictionary(Of Integer, CharacterMetrics), IEnumerable(Of KeyValuePair(Of Integer, CharacterMetrics))
继承
CharacterMetricsDictionary
实现

属性

Count

获取集合中的元素数。Gets the number of elements in the collection.

IsReadOnly

获取一个值,该值指示 CharacterMetricsDictionary 是否为只读。Gets a value indicating whether the CharacterMetricsDictionary is read-only.

Item[Int32]

获取或设置与指定键匹配的集合中的项的值。Gets or sets a value for the item in the collection that matches a specified key.

Keys

获取 CharacterMetricsDictionary 中的字符代码的集合。Gets a collection of character codes from CharacterMetricsDictionary.

Values

获取 CharacterMetricsCharacterMetricsDictionary 值的集合。Gets the collection of CharacterMetrics values in the CharacterMetricsDictionary.

方法

Add(Int32, CharacterMetrics)

向集合中添加字符代码和关联的 CharacterMetrics 值。Adds a character code and associated CharacterMetrics value to the collection.

Add(KeyValuePair<Int32,CharacterMetrics>)

使用键/值对向集合中添加字符代码和关联的 CharacterMetrics 值。Adds a character code and associated CharacterMetrics value to the collection using a key/value pair.

Clear()

移除集合中的所有元素。Removes all elements from the collection.

Contains(KeyValuePair<Int32,CharacterMetrics>)

确定集合是否包含指定的键/值对。Determines whether the collection contains the specified key/value pair.

ContainsKey(Int32)

确定集合是否包含指定的字符代码。Determines whether the collection contains the specified character code.

CopyTo(KeyValuePair<Int32,CharacterMetrics>[], Int32)

从特定的数组索引开始,将集合中的项复制到数组中。Copies the items in the collection to an array, starting at a specific array index.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetEnumerator()

返回一个循环访问集合的枚举器。Returns an enumerator that iterates through the collection.

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Remove(Int32)

根据指定的字符代码从 CharacterMetricsDictionary 中移除该元素。Removes the element from CharacterMetricsDictionary based on the specified character code.

Remove(KeyValuePair<Int32,CharacterMetrics>)

根据指定的键/值对从 CharacterMetricsDictionary 中移除元素。Removes the element from CharacterMetricsDictionary based on the specified key/value pair.

ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)
TryGetValue(Int32, CharacterMetrics)

针对指定的字符代码值检索字典中的 CharacterMetrics 值。Retrieves the CharacterMetrics value in the dictionary for a specified character code value.

显式界面实现

ICollection.CopyTo(Array, Int32)

有关此成员的说明,请参见 CopyTo(Array, Int32)For a description of this member, see CopyTo(Array, Int32).

ICollection.IsSynchronized

有关此成员的说明,请参见 IsSynchronizedFor a description of this member, see IsSynchronized.

ICollection.SyncRoot

有关此成员的说明,请参见 SyncRootFor a description of this member, see SyncRoot.

IDictionary.Add(Object, Object)

有关此成员的说明,请参见 Add(Object, Object)For a description of this member, see Add(Object, Object).

IDictionary.Contains(Object)

有关此成员的说明,请参见 Contains(Object)For a description of this member, see Contains(Object).

IDictionary.GetEnumerator()

有关此成员的说明,请参见 GetEnumerator()For a description of this member, see GetEnumerator().

IDictionary.IsFixedSize

有关此成员的说明,请参见 IsFixedSizeFor a description of this member, see IsFixedSize.

IDictionary.Item[Object]

有关此成员的说明,请参见 Item[Object]For a description of this member, see Item[Object].

IDictionary.Keys

有关此成员的说明,请参见 KeysFor a description of this member, see Keys.

IDictionary.Remove(Object)

有关此成员的说明,请参见 Remove(Object)For a description of this member, see Remove(Object).

IDictionary.Values

有关此成员的说明,请参见 ValuesFor a description of this member, see Values.

IEnumerable.GetEnumerator()

有关此成员的说明,请参见 GetEnumerator()For a description of this member, see GetEnumerator().

扩展方法

Remove<TKey,TValue>(IDictionary<TKey,TValue>, TKey, TValue)

尝试从 dictionary 中删除具有指定的 key 的值。Tries to remove the value with the specified key from the dictionary.

TryAdd<TKey,TValue>(IDictionary<TKey,TValue>, TKey, TValue)

尝试将指定的 keyvalue 添加到 dictionaryTries to add the specified key and value to the dictionary.

CopyToDataTable<T>(IEnumerable<T>)

在给定其泛型参数 TDataTable 的输入 DataRow 对象的情况下,返回包含 IEnumerable<T> 对象副本的 DataRowReturns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个节点的上级。Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个节点的上级。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子代节点的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>)

返回源集合中每个元素和文档的子元素的集合。Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName)

返回源集合中经过筛选的每个元素和文档的子元素集合。Returns a filtered collection of the child elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>)

返回节点集合(其中包含源集合中的所有节点),并按文档顺序排列。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子节点集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>)

将源集合中的每个节点从其父节点中移除。Removes every node in the source collection from its parent node.

适用于