Compartir vía


ChannelDispatcher.ErrorHandlers Propiedad

Definición

Obtiene un conjunto de los objetos IErrorHandler que se pueden utilizar para insertar funcionalidad de control de errores personalizada para un punto de conexión.

public:
 property System::Collections::ObjectModel::Collection<System::ServiceModel::Dispatcher::IErrorHandler ^> ^ ErrorHandlers { System::Collections::ObjectModel::Collection<System::ServiceModel::Dispatcher::IErrorHandler ^> ^ get(); };
public System.Collections.ObjectModel.Collection<System.ServiceModel.Dispatcher.IErrorHandler> ErrorHandlers { get; }
member this.ErrorHandlers : System.Collections.ObjectModel.Collection<System.ServiceModel.Dispatcher.IErrorHandler>
Public ReadOnly Property ErrorHandlers As Collection(Of IErrorHandler)

Valor de propiedad

Collection<IErrorHandler>

Clase SynchronizedCollection<T> de objetos IErrorHandler.

Ejemplos

Uri baseAddress = new Uri("http://localhost:8001/Simple");
ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService), baseAddress);

serviceHost.AddServiceEndpoint(
    typeof(ICalculator),
    new WSHttpBinding(),
    "CalculatorServiceObject");

serviceHost.Open();

ChannelDispatcher dispatcher = (ChannelDispatcher)serviceHost.ChannelDispatchers[0];
Collection<IErrorHandler> col = dispatcher.ErrorHandlers;
Dim baseAddress As New Uri("http://localhost:8001/Simple")
Dim serviceHost As New ServiceHost(GetType(CalculatorService), baseAddress)

serviceHost.AddServiceEndpoint(GetType(ICalculator), New WSHttpBinding(), "CalculatorServiceObject")

serviceHost.Open()

Dim dispatcher As ChannelDispatcher = CType(serviceHost.ChannelDispatchers(0), ChannelDispatcher)
Dim col As Collection(Of IErrorHandler) = dispatcher.ErrorHandlers

Se aplica a