PersonalizationStateInfoCollection 类

定义

public ref class PersonalizationStateInfoCollection sealed : System::Collections::ICollection
[System.Serializable]
public sealed class PersonalizationStateInfoCollection : System.Collections.ICollection
type PersonalizationStateInfoCollection = class
    interface ICollection
    interface IEnumerable
Public NotInheritable Class PersonalizationStateInfoCollection
Implements ICollection
继承
PersonalizationStateInfoCollection
属性
实现

注解

类为一SharedPersonalizationStateInfo组和UserPersonalizationStateInfo实例提供基于集合的包装。 PersonalizationStateInfoCollectionThe PersonalizationStateInfoCollection class provides a collection-based wrapper over a set of SharedPersonalizationStateInfo and UserPersonalizationStateInfo instances. 这些实例可通过按顺序在集合上按序号索引或键值来进行检索。These instances are retrieved by iterating sequentially over the collection, by ordinal index or by key value.

实例按路径和用户名的组合进行索引。Instances are indexed on a combination of path and user name. 这是必需的SharedPersonalizationStateInfo , 因为表示共享数据的实例是Path根据对象进行UserPersonalizationStateInfo索引的, 而实例是根据Path对象和Username对象建立索引的。This is necessary because SharedPersonalizationStateInfo instances representing shared data are indexed according to Path object, whereas UserPersonalizationStateInfo instances are indexed according to both a Path object and a Username object.

信息对象在集合中的维护顺序与从提供程序接收信息对象的顺序相同。The information objects are maintained in the collection in the order in which they were received from the provider. 集合不会尝试更改实例的顺序, 也不会在集合中维护特定的排序顺序。The collection does not attempt to change the order of the instances or maintain a specific sort order within the collection.

构造函数

PersonalizationStateInfoCollection()

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

属性

Count

获取集合中项的数目。Gets the number of items in a collection.

IsSynchronized

获取一个值,该值指示对 PersonalizationStateInfoCollection 集合的访问是否同步(线程安全)。Gets a value indicating whether access to the PersonalizationStateInfoCollection collection is synchronized (thread safe).

Item[Int32]

获取集合中指定序号索引处的 PersonalizationStateInfo 实例。Gets a PersonalizationStateInfo instance located at the specified ordinal index in the collection.

Item[String, String]

根据指定的参数从集合中获取元素。Gets an element from the collection based on the specified parameters.

SyncRoot

获取可用于同步对 PersonalizationStateInfoCollection 实例的访问的对象。Gets an object that can be used to synchronize access to the PersonalizationStateInfoCollection instance.

方法

Add(PersonalizationStateInfo)

PersonalizationStateInfo 派生实例添加到集合的结尾。Adds a PersonalizationStateInfo-derived instance to the end of the collection.

Clear()

清除所有项的集合。Clears the collection of all items.

CopyTo(PersonalizationStateInfo[], Int32)

从指定位置开始,将 PersonalizationStateInfoCollection 集合中的元素复制到 PersonalizationStateInfo 数组。Copies the elements of the PersonalizationStateInfoCollection collection into a PersonalizationStateInfo array, starting at the specified position.

Equals(Object)

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

(继承自 Object)
GetEnumerator()

返回能遍历集合的标准枚举数。Returns a standard enumerator capable of iterating over the collection. 不能继承此方法。This method cannot be inherited.

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(String, String)

从集合中移除一个 PersonalizationStateInfo 派生对象。Removes a PersonalizationStateInfo-derived object from the collection.

SetReadOnly()

将集合标记为只读。Marks the collection as read-only.

ToString()

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

(继承自 Object)

显式界面实现

ICollection.CopyTo(Array, Int32)

实现基 CopyTo(Array, Int32) 方法。Implements the base CopyTo(Array, Int32) method.

扩展方法

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.

适用于