ChannelDispatcher.ErrorHandlers Özellik

Tanım

Uç nokta için özel hata işleme işlevselliği eklemek için kullanılabilecek bir nesne kümesi IErrorHandler alır.

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)

Özellik Değeri

Nesnelerden SynchronizedCollection<T> oluşan IErrorHandler bir.

Örnekler

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

Şunlara uygulanır