Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / DelegatingChannelListener.cs / 1 / DelegatingChannelListener.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Channels { abstract class DelegatingChannelListener: LayeredChannelListener where TChannel : class, IChannel { IChannelAcceptor channelAcceptor; protected DelegatingChannelListener(IDefaultCommunicationTimeouts timeouts, IChannelListener innerChannelListener) : base(timeouts, innerChannelListener) { } protected DelegatingChannelListener(bool sharedInnerListener) : base(sharedInnerListener) { } protected DelegatingChannelListener(bool sharedInnerListener, IDefaultCommunicationTimeouts timeouts) : base(sharedInnerListener, timeouts) { } protected DelegatingChannelListener(bool sharedInnerListener, IDefaultCommunicationTimeouts timeouts, IChannelListener innerChannelListener) : base(sharedInnerListener, timeouts, innerChannelListener) { } public IChannelAcceptor Acceptor { get { return this.channelAcceptor; } set { this.channelAcceptor = value; } } protected override TChannel OnAcceptChannel(TimeSpan timeout) { return this.channelAcceptor.AcceptChannel(timeout); } protected override IAsyncResult OnBeginAcceptChannel(TimeSpan timeout, AsyncCallback callback, object state) { return this.channelAcceptor.BeginAcceptChannel(timeout, callback, state); } protected override TChannel OnEndAcceptChannel(IAsyncResult result) { return this.channelAcceptor.EndAcceptChannel(result); } protected override bool OnWaitForChannel(TimeSpan timeout) { return this.channelAcceptor.WaitForChannel(timeout); } protected override IAsyncResult OnBeginWaitForChannel(TimeSpan timeout, AsyncCallback callback, object state) { return this.channelAcceptor.BeginWaitForChannel(timeout, callback, state); } protected override bool OnEndWaitForChannel(IAsyncResult result) { return this.channelAcceptor.EndWaitForChannel(result); } protected override void OnAbort() { base.OnAbort(); if (this.channelAcceptor != null) { this.channelAcceptor.Abort(); } } protected override IAsyncResult OnBeginClose(TimeSpan timeout, AsyncCallback callback, object state) { return new ChainedCloseAsyncResult(timeout, callback, state, base.OnBeginClose, base.OnEndClose, this.channelAcceptor); } protected override void OnEndClose(IAsyncResult result) { ChainedCloseAsyncResult.End(result); } protected override void OnClose(TimeSpan timeout) { TimeoutHelper timeoutHelper = new TimeoutHelper(timeout); base.OnClose(timeoutHelper.RemainingTime()); this.channelAcceptor.Close(timeoutHelper.RemainingTime()); } protected override IAsyncResult OnBeginOpen(TimeSpan timeout, AsyncCallback callback, object state) { return new ChainedOpenAsyncResult(timeout, callback, state, base.OnBeginOpen, base.OnEndOpen, this.channelAcceptor); } protected override void OnEndOpen(IAsyncResult result) { ChainedOpenAsyncResult.End(result); } protected override void OnOpen(TimeSpan timeout) { TimeoutHelper timeoutHelper = new TimeoutHelper(timeout); base.OnOpen(timeoutHelper.RemainingTime()); this.channelAcceptor.Open(timeoutHelper.RemainingTime()); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebRequestModuleElement.cs
- RuleSetReference.cs
- ConfigurationSettings.cs
- DetailsViewModeEventArgs.cs
- SignedInfo.cs
- CodeAttachEventStatement.cs
- IdnElement.cs
- AttachedPropertiesService.cs
- ProviderIncompatibleException.cs
- ResXResourceWriter.cs
- CrossSiteScriptingValidation.cs
- EncoderBestFitFallback.cs
- _ConnectStream.cs
- ResourceLoader.cs
- ProgressBarRenderer.cs
- unitconverter.cs
- CryptoStream.cs
- LinqToSqlWrapper.cs
- ProtectedConfiguration.cs
- SerTrace.cs
- ClientRuntimeConfig.cs
- ApplicationSettingsBase.cs
- RawAppCommandInputReport.cs
- TableLayoutColumnStyleCollection.cs
- SessionEndedEventArgs.cs
- MetadataItemSerializer.cs
- PasswordTextContainer.cs
- ConcurrencyMode.cs
- GeometryModel3D.cs
- PrintEvent.cs
- UnionExpr.cs
- InputManager.cs
- PersistenceTypeAttribute.cs
- TabItem.cs
- NotifyIcon.cs
- NavigationPropertyEmitter.cs
- ScriptControlDescriptor.cs
- CellParaClient.cs
- TrimSurroundingWhitespaceAttribute.cs
- MemoryMappedViewStream.cs
- DataControlPagerLinkButton.cs
- CssStyleCollection.cs
- QueryPageSettingsEventArgs.cs
- AsyncResult.cs
- XmlSchemaObject.cs
- IPipelineRuntime.cs
- PropertyToken.cs
- Visual3D.cs
- ISessionStateStore.cs
- BuildProviderCollection.cs
- NetTcpSecurityElement.cs
- RSAPKCS1KeyExchangeFormatter.cs
- DataGridViewHeaderCell.cs
- SubtreeProcessor.cs
- SymDocumentType.cs
- COM2IDispatchConverter.cs
- CodeIndexerExpression.cs
- WindowsPen.cs
- BidPrivateBase.cs
- RemotingSurrogateSelector.cs
- MetadataException.cs
- CellQuery.cs
- XpsInterleavingPolicy.cs
- SplitterCancelEvent.cs
- SmtpLoginAuthenticationModule.cs
- AnnotationHelper.cs
- NotifyCollectionChangedEventArgs.cs
- XmlEntity.cs
- XmlIlGenerator.cs
- DataTemplate.cs
- SoapDocumentMethodAttribute.cs
- QueryExpr.cs
- ReadOnlyHierarchicalDataSource.cs
- SpStreamWrapper.cs
- SafeRightsManagementHandle.cs
- GiveFeedbackEventArgs.cs
- KeySplineConverter.cs
- Span.cs
- ComponentResourceManager.cs
- TimeSpanValidator.cs
- SerializationStore.cs
- ParserExtension.cs
- NTAccount.cs
- KeyPressEvent.cs
- NullableBoolConverter.cs
- SHA512Managed.cs
- Attributes.cs
- AssemblyInfo.cs
- CqlParserHelpers.cs
- InfoCardKeyedHashAlgorithm.cs
- ResourceManager.cs
- BevelBitmapEffect.cs
- ToolstripProfessionalRenderer.cs
- cookie.cs
- ReaderWriterLockWrapper.cs
- Point3DAnimationBase.cs
- DataGridSortCommandEventArgs.cs
- TableDetailsCollection.cs
- PartialCachingAttribute.cs
- SessionPageStateSection.cs