Partager via


WeakCollection<T> Class

Microsoft internal use only.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.PlatformUI.WeakCollection<T>

Namespace:  Microsoft.VisualStudio.PlatformUI
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
Public Class WeakCollection(Of T As Class) _
    Implements IEnumerable(Of T), IEnumerable
public class WeakCollection<T> : IEnumerable<T>, 
    IEnumerable 
where T : class
generic<typename T>
where T : ref class 
public ref class WeakCollection : IEnumerable<T>, 
    IEnumerable
type WeakCollection<'T when 'T : not struct> =  
    class 
        interface IEnumerable<'T>
        interface IEnumerable 
    end
JScript does not support generic types or methods.

Type Parameters

  • T

The WeakCollection<T> type exposes the following members.

Constructors

  Name Description
Public method WeakCollection<T> Microsoft internal use only.

Top

Methods

  Name Description
Public method Add Microsoft internal use only. Adds a WeakReference to the item to the collection.
Public method Clear Microsoft internal use only. Clears all items from the list.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetAliveItemsCount Gets the number of strong references remaining in the collection.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Remove Microsoft internal use only. Removes an item from the underlying collection, if it exists.
Public method ToList Gets a list containing strong references to the items in this collection.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IEnumerable<T>.GetEnumerator Microsoft internal use only.
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator Microsoft internal use only.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.PlatformUI Namespace