TransformedCollection<TSourceCollection, TSourceElement, TTargetElement> 类

提供元素的实时将变量的源集合的。

继承层次结构

System.Object
  System.Collections.ObjectModel.ReadOnlyCollection<TTargetElement>
    Microsoft.TeamFoundation.MVVM.TransformedCollection<TSourceCollection, TSourceElement, TTargetElement>

命名空间:  Microsoft.TeamFoundation.MVVM
程序集:  Microsoft.TeamFoundation.Controls(在 Microsoft.TeamFoundation.Controls.dll 中)

语法

声明
Public Class TransformedCollection(Of TSourceCollection As {Class, Object, IEnumerable(Of TSourceElement), INotifyCollectionChanged}, TSourceElement, TTargetElement) _
    Inherits ReadOnlyCollection(Of TTargetElement) _
    Implements INotifyCollectionChanged, INotifyPropertyChanged, IWeakEventListener, IDisposable
public class TransformedCollection<TSourceCollection, TSourceElement, TTargetElement> : ReadOnlyCollection<TTargetElement>, 
    INotifyCollectionChanged, INotifyPropertyChanged, IWeakEventListener, IDisposable
where TSourceCollection : class, Object, IEnumerable<TSourceElement>, INotifyCollectionChanged

类型参数

  • TSourceCollection
    此集合包含源集合的类型。
  • TSourceElement
    元素的类型源集合中的。
  • TTargetElement
    转换后的元素类型此集合中。

TransformedCollection<TSourceCollection, TSourceElement, TTargetElement> 类型公开以下成员。

构造函数

  名称 说明
公共方法 TransformedCollection<TSourceCollection, TSourceElement, TTargetElement>

页首

属性

  名称 说明
公共属性 Count 获取包含在 ReadOnlyCollection<T> 实例中的元素数。 (继承自 ReadOnlyCollection<TTargetElement>。)
公共属性 Item 获取指定索引处的元素。 (继承自 ReadOnlyCollection<TTargetElement>。)
受保护的属性 Items 返回 ReadOnlyCollection<T> 包装的 IList<T>。 (继承自 ReadOnlyCollection<TTargetElement>。)

页首

方法

  名称 说明
公共方法 Contains 确定某元素是否在 ReadOnlyCollection<T> 中。 (继承自 ReadOnlyCollection<TTargetElement>。)
公共方法 CopyTo 从目标数组的指定索引处开始将整个 ReadOnlyCollection<T> 复制到兼容的一维 Array。 (继承自 ReadOnlyCollection<TTargetElement>。)
公共方法 Dispose() 关闭转换的集合的所有元素,清除转换集合,并且停止听完源集合的更改事件。
受保护的方法 Dispose(Boolean)
公共方法 Equals 确定指定的对象是否等于当前对象。 (继承自 Object。)
受保护的方法 Finalize 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法 GetEnumerator 返回循环访问 ReadOnlyCollection<T> 的枚举数。 (继承自 ReadOnlyCollection<TTargetElement>。)
公共方法 GetHashCode 用作特定类型的哈希函数。 (继承自 Object。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 IndexOf 搜索指定的对象,并返回整个 ReadOnlyCollection<T> 中第一个匹配项的从零开始的索引。 (继承自 ReadOnlyCollection<TTargetElement>。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
受保护的方法 OnCollectionChanged
受保护的方法 OnPropertyChanged
受保护的方法 ReceiveWeakEvent
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

事件

  名称 说明
公共事件 CollectionChanged 当集合更改时发生。
公共事件 PropertyChanged 当属性更改时,发生。

页首

显式接口实现

  名称 说明
显式接口实现私有方法 IWeakEventListener.ReceiveWeakEvent
显式接口实现私有方法 ICollection<T>.Add 将某项添加到 ICollection<T> 中。此实现总是引发 NotSupportedException。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有方法 IList.Add 将某项添加到 IList 中。此实现总是引发 NotSupportedException。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有方法 ICollection<T>.Clear ICollection<T> 中移除所有项。此实现总是引发 NotSupportedException。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有方法 IList.Clear IList 中移除所有项。此实现总是引发 NotSupportedException。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有方法 IList.Contains 确定 IList 是否包含特定值。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有方法 ICollection.CopyTo 从特定的 Array 索引处开始,将 ICollection 的元素复制到一个 Array 中。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有方法 IEnumerable.GetEnumerator 返回一个循环访问集合的枚举数。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有方法 IList.IndexOf 确定 IList 中特定项的索引。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有方法 IList<T>.Insert 将一个项插入指定索引处的 IList<T>。此实现总是引发 NotSupportedException。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有方法 IList.Insert 将一个项插入指定索引处的 IList。此实现总是引发 NotSupportedException。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有属性 IList.IsFixedSize 获取一个值,该值指示 IList 是否具有固定大小。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有属性 ICollection<T>.IsReadOnly 获取一个值,该值指示 ICollection<T> 是否为只读。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有属性 IList.IsReadOnly 获取一个值,该值指示 IList 是否为只读。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有属性 ICollection.IsSynchronized 获取一个值,该值指示是否同步对 ICollection 的访问(线程安全)。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有属性 IList<T>.Item 获取或设置位于指定索引处的元素。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有属性 IList.Item 获取或设置位于指定索引处的元素。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有方法 ICollection<T>.Remove ICollection<T> 中移除特定对象的第一个匹配项。此实现总是引发 NotSupportedException。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有方法 IList.Remove IList 中移除特定对象的第一个匹配项。此实现总是引发 NotSupportedException。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有方法 IList<T>.RemoveAt 移除指定索引处的 IList<T> 项。此实现总是引发 NotSupportedException。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有方法 IList.RemoveAt 移除指定索引处的 IList 项。此实现总是引发 NotSupportedException。 (继承自 ReadOnlyCollection<TTargetElement>。)
显式接口实现私有属性 ICollection.SyncRoot 获取可用于同步对 ICollection 的访问的对象。 (继承自 ReadOnlyCollection<TTargetElement>。)

页首

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参见

参考

Microsoft.TeamFoundation.MVVM 命名空间