ServiceProviders.AddService(Type, Object) Método

Definición

Agrega un servicio a la lista.Adds a service to the list.

public:
 void AddService(Type ^ serviceType, System::Object ^ service);
public void AddService (Type serviceType, object service);
member this.AddService : Type * obj -> unit
Public Sub AddService (serviceType As Type, service As Object)

Parámetros

serviceType
Type

Tipo de servicio del nuevo servicio.Service type of the new service.

service
Object

Clase de implementación del servicio.The service implementation class.

Excepciones

serviceType o service es null.serviceType or service is null.

Se intenta agregar un servicio que ya existe en el diccionario.Attempted to add a service that already exists in the dictionary.

Se aplica a