INameScopeDictionary 接口

定义

将可枚举的集合和字典支持进行了统一,可用于公开 XAML 名称范围中名称的字典。Unifies enumerable, collection, and dictionary support that are useful for exposing a dictionary of names in a XAML namescope.

public interface class INameScopeDictionary : System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>>, System::Collections::Generic::IDictionary<System::String ^, System::Object ^>, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>>, System::Windows::Markup::INameScope
public interface INameScopeDictionary : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,object>>, System.Collections.Generic.IDictionary<string,object>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object>>, System.Windows.Markup.INameScope
type INameScopeDictionary = interface
    interface INameScope
    interface IDictionary<string, obj>
    interface ICollection<KeyValuePair<string, obj>>
    interface seq<KeyValuePair<string, obj>>
    interface IEnumerable
Public Interface INameScopeDictionary
Implements ICollection(Of KeyValuePair(Of String, Object)), IDictionary(Of String, Object), IEnumerable(Of KeyValuePair(Of String, Object)), INameScope
派生
实现

注解

INameScopeDictionary不定义自己的成员。INameScopeDictionary defines no members of its own. 相反, 接口会继承IDictionary<TKey,TValue> ICollection<T> IEnumerable<T>和泛型接口, 并将StringObject (或其中KeyValuePair<TKey,TValue>的) 作为约束。Instead, the interface inherits IDictionary<TKey,TValue>, ICollection<T> and IEnumerable<T> generic interfaces, with String and Object (or a KeyValuePair<TKey,TValue> thereof) as constraints. INameScopeDictionary还继承INameScopeINameScopeDictionary also inherits INameScope.

INameScopeDictionary接口在内部用作信息传递类型, 作为 WPF XAML 实现的对象编写器上下文的一部分。The INameScopeDictionary interface is used internally as a type for information passing, as part of object writer context for the WPF XAML implementation.

属性

Count

获取 ICollection<T> 中包含的元素数。Gets the number of elements contained in the ICollection<T>.

(继承自 ICollection<T>)
IsReadOnly

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

(继承自 ICollection<T>)
Item[TKey]

获取或设置具有指定键的元素。Gets or sets the element with the specified key.

(继承自 IDictionary<TKey,TValue>)
Keys

获取包含 ICollection<T> 的键的 IDictionary<TKey,TValue>Gets an ICollection<T> containing the keys of the IDictionary<TKey,TValue>.

(继承自 IDictionary<TKey,TValue>)
Values

获取一个 ICollection<T>,它包含 IDictionary<TKey,TValue> 中的值。Gets an ICollection<T> containing the values in the IDictionary<TKey,TValue>.

(继承自 IDictionary<TKey,TValue>)

方法

Add(T)

将某项添加到 ICollection<T> 中。Adds an item to the ICollection<T>.

(继承自 ICollection<T>)
Add(TKey, TValue)

IDictionary<TKey,TValue> 中添加一个带有所提供的键和值的元素。Adds an element with the provided key and value to the IDictionary<TKey,TValue>.

(继承自 IDictionary<TKey,TValue>)
Clear()

ICollection<T> 中移除所有项。Removes all items from the ICollection<T>.

(继承自 ICollection<T>)
Contains(T)

确定 ICollection<T> 是否包含特定值。Determines whether the ICollection<T> contains a specific value.

(继承自 ICollection<T>)
ContainsKey(TKey)

确定是否 IDictionary<TKey,TValue> 包含带有指定键的元素。Determines whether the IDictionary<TKey,TValue> contains an element with the specified key.

(继承自 IDictionary<TKey,TValue>)
CopyTo(T[], Int32)

从特定的 ICollection<T> 索引开始,将 Array 的元素复制到一个 Array 中。Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.

(继承自 ICollection<T>)
FindName(String)

返回一个具有提供的标识名称的对象。Returns an object that has the provided identifying name.

(继承自 INameScope)
GetEnumerator()

返回循环访问集合的枚举数。Returns an enumerator that iterates through a collection.

(继承自 IEnumerable)
RegisterName(String, Object)

将提供的名称注册到当前的 XAML 名称范围中。Registers the provided name into the current XAML namescope.

(继承自 INameScope)
Remove(TKey)

IDictionary<TKey,TValue> 中移除包含指定键的元素。Removes the element with the specified key from the IDictionary<TKey,TValue>.

(继承自 IDictionary<TKey,TValue>)
TryGetValue(TKey, TValue)

获取与指定键关联的值。Gets the value associated with the specified key.

(继承自 IDictionary<TKey,TValue>)
UnregisterName(String)

从当前 XAML 名称范围中注销提供的名称。Unregisters the provided name from the current XAML namescope.

(继承自 INameScope)

扩展方法

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.

适用于