다음을 통해 공유


ChannelDispatcher.ErrorHandlers 속성

정의

엔드포인트에 대한 사용자 지정 오류 처리 기능을 삽입하는 데 사용할 수 있는 IErrorHandler 개체 집합을 가져옵니다.

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)

속성 값

Collection<IErrorHandler>

SynchronizedCollection<T> 개체의 IErrorHandler입니다.

예제

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

적용 대상