internal void Init() { errorBehavior = new ErrorBehavior(this); filterTable = new EndpointDispatcherTable(ThisLock); for (int i = 0; i < endpointDispatchers.Count; i++) { EndpointDispatcher endpoint = endpointDispatchers[i]; // Force a build of the runtime to catch any unexpected errors before we are done opening. endpoint.DispatchRuntime.GetRuntime(); // Lock down the DispatchRuntime. endpoint.DispatchRuntime.LockDownProperties(); filterTable.AddEndpoint(endpoint); if ((addressTable != null) && (endpoint.OriginalAddress != null)) { addressTable.Add(endpoint.AddressFilter, endpoint.OriginalAddress, endpoint.FilterPriority); } //if (DiagnosticUtility.ShouldTraceInformation) //{ // this.TraceEndpointLifetime(endpoint, TraceCode.EndpointListenerOpen, SR.Format(SR.TraceCodeEndpointListenerOpen)); //} } }
public ServiceDispatcher(Uri baseAddress, Binding binding, EndpointDispatcherTable endpointDispatcherTable) { BaseAddress = baseAddress; Binding = binding; _endpointDispatcherTable = endpointDispatcherTable; // TODO: Maybe make lazy _requestReplyCorrelator = new RequestReplyCorrelator(); }
private void OnRemoveEndpoint(EndpointDispatcher endpoint) { lock (ThisLock) { if (State == CommunicationState.Opened) { EndpointDispatcherTable.RemoveEndpoint(endpoint); } endpoint.Detach(this); } }
private void OnAddEndpoint(EndpointDispatcher endpoint) { lock (ThisLock) { endpoint.Attach(this); if (State == CommunicationState.Opened) { EndpointDispatcherTable.AddEndpoint(endpoint); } } }