private void Initialize(SharedRuntimeState shared) { _shared = shared; _endpointDispatchers = new EndpointDispatcherCollection(this); _channelInitializers = this.NewBehaviorCollection <IChannelInitializer>(); _channels = new CommunicationObjectManager <IChannel>(this.ThisLock); _pendingChannels = new SynchronizedChannelCollection <IChannel>(this.ThisLock); _errorHandlers = new Collection <IErrorHandler>(); _receiveSynchronously = false; _transactionTimeout = TimeSpan.Zero; _maxPendingReceives = 1; //Default maxpending receives is 1; if (_listener != null) { _listener.Faulted += new EventHandler(OnListenerFaulted); } }
private void Initialize(SharedRuntimeState shared) { this.shared = shared; this.endpointDispatchers = new EndpointDispatcherCollection(this); this.channelInitializers = this.NewBehaviorCollection <IChannelInitializer>(); this.channels = new CommunicationObjectManager <IChannel>(base.ThisLock); this.pendingChannels = new SynchronizedChannelCollection <IChannel>(base.ThisLock); this.errorHandlers = new Collection <IErrorHandler>(); this.isTransactedReceive = false; this.receiveSynchronously = false; this.serviceThrottle = null; this.transactionTimeout = TimeSpan.Zero; this.maxPendingReceives = 1; if (this.listener != null) { this.listener.Faulted += new EventHandler(this.OnListenerFaulted); } }