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)); //} } }
private void OnAddEndpoint(EndpointDispatcher endpoint) { lock (ThisLock) { endpoint.Attach(this); if (State == CommunicationState.Opened) { EndpointDispatcherTable.AddEndpoint(endpoint); } } }