SymbolResolver SymbolResolver SymbolResolver SymbolResolver Class

定义

SymbolResolver 是一种用于提供宿主 LocationReferenceEnvironment(包含可通过字符串名称取消引用的对象)的扩展。SymbolResolver is an extension for providing a host LocationReferenceEnvironment containing objects that can be dereferenced by a string name. 不会保留通过 SymbolResolver 提供的值。Values provided through a SymbolResolver are not persisted. 宿主负责保留 SymbolResolver 值。Persistence of SymbolResolver values is a host responsibility.

public ref class SymbolResolver sealed : 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 ^>>
public sealed class SymbolResolver : 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>>
type SymbolResolver = class
    interface IDictionary<string, obj>
    interface ICollection<KeyValuePair<string, obj>>
    interface seq<KeyValuePair<string, obj>>
    interface IEnumerable
Public NotInheritable Class SymbolResolver
Implements ICollection(Of KeyValuePair(Of String, Object)), IDictionary(Of String, Object), IEnumerable(Of KeyValuePair(Of String, Object))
继承
SymbolResolverSymbolResolverSymbolResolverSymbolResolver
实现

构造函数

SymbolResolver() SymbolResolver() SymbolResolver() SymbolResolver()

初始化 SymbolResolver 类的新实例。Initializes a new instance of the SymbolResolver class.

属性

Count Count Count Count

获取 SymbolResolver 中包含的符号数。Gets the number of symbols contained in the SymbolResolver.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

获取一个值,该值指示 SymbolResolver 中由符号组成的字典是否为只读。Gets a value that indicates whether the dictionary of symbols in the SymbolResolver is read-only.

Item[String] Item[String] Item[String] Item[String]

获取或设置与指定键关联的项的值。Gets or sets the value of the item associated with the specified key.

Keys Keys Keys Keys

获取 SymbolResolver 中的所有键的集合。Gets a collection of all keys in the SymbolResolver.

Values Values Values Values

获取 SymbolResolver 中的所有值的集合。Gets a collection of all values in the SymbolResolver.

方法

Add(KeyValuePair<String,Object>) Add(KeyValuePair<String,Object>) Add(KeyValuePair<String,Object>) Add(KeyValuePair<String,Object>)

使用指定的键/值对添加符号。Adds a symbol using the specified key/value pair.

Add(String, Object) Add(String, Object) Add(String, Object) Add(String, Object)

使用指定的符号名称和值添加符号。Adds a symbol using the specified symbol name and value.

Add(String, Object, Type) Add(String, Object, Type) Add(String, Object, Type) Add(String, Object, Type)

使用指定的符号名称、值和类型添加符号。Adds a symbol using the specified symbol name, value, and type.

Add(String, Type) Add(String, Type) Add(String, Type) Add(String, Type)

使用指定的符号名称和类型添加符号。Adds a symbol using the specified symbol name and type.

AsLocationReferenceEnvironment() AsLocationReferenceEnvironment() AsLocationReferenceEnvironment() AsLocationReferenceEnvironment()

返回 LocationReferenceEnvironment 实例,利用该实例可访问 SymbolResolver 中以 LocationReference 对象形式表示的符号值引用。Returns a LocationReferenceEnvironment instance that enables access to references of symbol values in SymbolResolver represented as LocationReference objects.

Clear() Clear() Clear() Clear()

SymbolResolver 中移除所有符号。Removes all symbols from the SymbolResolver.

Contains(KeyValuePair<String,Object>) Contains(KeyValuePair<String,Object>) Contains(KeyValuePair<String,Object>) Contains(KeyValuePair<String,Object>)

返回一个值,该值指示 SymbolResolver 是否包含指定的符号。Returns a value that indicates whether the SymbolResolver contains the specified symbol.

ContainsKey(String) ContainsKey(String) ContainsKey(String) ContainsKey(String)

返回一个值,该值指示 SymbolResolver 是否包含具有指定键的符号。Returns a value that indicates whether the SymbolResolver contains a symbol with the specified key.

CopyTo(KeyValuePair<String,Object>[], Int32) CopyTo(KeyValuePair<String,Object>[], Int32) CopyTo(KeyValuePair<String,Object>[], Int32) CopyTo(KeyValuePair<String,Object>[], Int32)

SymbolResolver 中的符号复制到现有的键/值对一维数组,从指定的数组索引处开始。Copies the symbols in the SymbolResolver to an existing one-dimensional array of key/value pairs, starting at the specified array index.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

返回一个循环访问键/值对集合的枚举器,其中键为符号名称,值为符号值。Returns an enumerator that iterates through a collection of key/value pairs where the keys are the symbol names and values the symbol values.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

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

(Inherited from Object)
GetType() GetType() GetType() GetType()

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

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

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

(Inherited from Object)
Remove(KeyValuePair<String,Object>) Remove(KeyValuePair<String,Object>) Remove(KeyValuePair<String,Object>) Remove(KeyValuePair<String,Object>)

SymbolResolver 中移除指定的符号。Removes the specified symbol from the SymbolResolver.

Remove(String) Remove(String) Remove(String) Remove(String)

使用指定的键从 SymbolResolver 中移除符号。Removes a symbol from the SymbolResolver using a specified key.

ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)
TryGetValue(String, Object) TryGetValue(String, Object) TryGetValue(String, Object) TryGetValue(String, Object)

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

显式界面实现

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

返回一个循环访问键/值对集合的枚举器,其中键为符号名称,值为符号值。Returns an enumerator that iterates through a collection of key/value pairs where the keys are the symbol names and values the symbol values.

扩展方法

CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) 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) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) 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) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) 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) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

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

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

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

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

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

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) 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) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) 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>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>)

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

Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) 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) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) 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>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) 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) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) 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>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) 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>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>)

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

Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>)

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

适用于