protected Binding CreateEventServiceBinding(string address) { IChannelController[] controllers; // add mandatory controllers. // _trafficListener is used to monitor data sent and received via Client. // _semaphore is used to stop waiting for the answer. EndpointController controller = new EndpointController(new EndpointAddress(address)); WsaController wsaController = new WsaController(); controllers = new IChannelController[] { _trafficListener, _semaphore, _credentialsProvider, controller, wsaController, new SoapValidator(EventsSchemasSet.GetInstance()) }; Binding binding = CreateBinding(controllers); return(binding); }
public override EventPortTypeClient CreateClient(Binding binding, EndpointAddress address) { EndpointController controller = new EndpointController(new EndpointAddress(_serviceAddress)); WsaController wsaController = new WsaController(); Binding eventBinding = new HttpBinding(new IChannelController[] { this, controller, wsaController, _credentialsProvider }); return(new EventPortTypeClient(eventBinding, address)); }