Compartir a través de


ServiceCollection<T> Class

Definition

Use this collection to store 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 will perform a comparison of the Guid properties of the Type key instead of doing a reference comparison which will fail in type embedding scenarios.

This collection is not thread-safe.

generic <typename T>
public ref class ServiceCollection : System::Collections::Generic::Dictionary<Type ^, T>
public class ServiceCollection<T> : System.Collections.Generic.Dictionary<Type,T>
type ServiceCollection<'T> = class
    inherit Dictionary<Type, 'T>
Public Class ServiceCollection(Of T)
Inherits Dictionary(Of Type, T)

Type Parameters

T
Inheritance
ServiceCollection<T>

Remarks

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.

Constructors

ServiceCollection<T>()

Initializes a new instance of TMicrosoft.VisualStudio.Shell.ServiceCollection`1.

Applies to