ServiceBehaviorAttribute.SetWellKnownSingleton(Object) Método

Definición

Especifica un objeto que implementa el servicio y que se utiliza como instancia singleton del servicio.Specifies an object that implements the service and that is used as the singleton instance of the service.

public:
 void SetWellKnownSingleton(System::Object ^ value);
public void SetWellKnownSingleton (object value);
member this.SetWellKnownSingleton : obj -> unit
Public Sub SetWellKnownSingleton (value As Object)

Parámetros

value
Object

Instancia singleton del servicio.The singleton instance of the service.

Excepciones

El valor establecido es null.The value set is null.

Comentarios

Esto proporciona la instancia de servicio a la que se enviarán todos los mensajes dirigidos al servicio.This provides the service instance to which all messages addressed to the service will be dispatched.

Si SetWellKnownSingleton se establece con un valor diferente de null, InstanceContextMode debe establecerse como Single o se iniciará InvalidOperationException.If SetWellKnownSingleton is set to a non-null value, then the InstanceContextMode must be set to Single or an InvalidOperationException is thrown.

Se aplica a