ServiceCollection<T> Class

 

Represents a collection of services.

Namespace:   Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

System.Object
  System.Collections.Generic.Dictionary<TKey, TValue>
    Microsoft.VisualStudio.Shell.ServiceCollection<T>

public class ServiceCollection<T> : Dictionary<Type, T>

Type Parameters

T

The type of the collection.

NameDescription
System_CAPS_pubmethodServiceCollection<T>()

Initializes a new instance of T:Microsoft.VisualStudio.Shell.ServiceCollection`1.

Use this collection to store the mapping from the type of a service to the object that provides it in a way that is aware of embedded types. The comparer for this collection performs a comparison of the GUID properties of the Type key instead of doing a reference comparison, which will fail in type-embedding scenarios.

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

Return to top
Show: