Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / InputQueueChannelAcceptor.cs / 1 / InputQueueChannelAcceptor.cs
//---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------------------- namespace System.ServiceModel.Channels { class InputQueueChannelAcceptor: ChannelAcceptor where TChannel : class, IChannel { InputQueue channelQueue; public InputQueueChannelAcceptor(ChannelManagerBase channelManager) : base(channelManager) { this.channelQueue = new InputQueue (); } public int PendingCount { get { return this.channelQueue.PendingCount; } } public override TChannel AcceptChannel(TimeSpan timeout) { this.ThrowIfNotOpened(); return this.channelQueue.Dequeue(timeout); } public override IAsyncResult BeginAcceptChannel(TimeSpan timeout, AsyncCallback callback, object state) { this.ThrowIfNotOpened(); return this.channelQueue.BeginDequeue(timeout, callback, state); } public void Dispatch() { this.channelQueue.Dispatch(); } public override TChannel EndAcceptChannel(IAsyncResult result) { return this.channelQueue.EndDequeue(result); } public void EnqueueAndDispatch(TChannel channel) { this.channelQueue.EnqueueAndDispatch(channel); } public void EnqueueAndDispatch(TChannel channel, ItemDequeuedCallback dequeuedCallback) { this.channelQueue.EnqueueAndDispatch(channel, dequeuedCallback); } public bool EnqueueWithoutDispatch(TChannel channel, ItemDequeuedCallback dequeuedCallback) { return this.channelQueue.EnqueueWithoutDispatch(channel, dequeuedCallback); } public virtual bool EnqueueWithoutDispatch(Exception exception, ItemDequeuedCallback dequeuedCallback) { return this.channelQueue.EnqueueWithoutDispatch(exception, dequeuedCallback); } public void EnqueueAndDispatch(TChannel channel, ItemDequeuedCallback dequeuedCallback, bool canDispatchOnThisThread) { this.channelQueue.EnqueueAndDispatch(channel, dequeuedCallback, canDispatchOnThisThread); } public virtual void EnqueueAndDispatch(Exception exception, ItemDequeuedCallback dequeuedCallback, bool canDispatchOnThisThread) { this.channelQueue.EnqueueAndDispatch(exception, dequeuedCallback, canDispatchOnThisThread); } public void FaultQueue() { this.Fault(); } protected override void OnClosed() { base.OnClosed(); this.channelQueue.Dispose(); } protected override void OnFaulted() { this.channelQueue.Shutdown(this.ChannelManager); base.OnFaulted(); } public override bool WaitForChannel(TimeSpan timeout) { this.ThrowIfNotOpened(); return this.channelQueue.WaitForItem(timeout); } public override IAsyncResult BeginWaitForChannel(TimeSpan timeout, AsyncCallback callback, object state) { this.ThrowIfNotOpened(); return this.channelQueue.BeginWaitForItem(timeout, callback, state); } public override bool EndWaitForChannel(IAsyncResult result) { return this.channelQueue.EndWaitForItem(result); } } } // 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
- WebServiceMethodData.cs
- SqlDataSourceCustomCommandPanel.cs
- ListItemCollection.cs
- TabRenderer.cs
- ProfileModule.cs
- CompoundFileStorageReference.cs
- HtmlCommandAdapter.cs
- oledbmetadatacolumnnames.cs
- RowsCopiedEventArgs.cs
- ToolboxItem.cs
- DiagnosticSection.cs
- CompareInfo.cs
- EditorPartCollection.cs
- EntityClientCacheKey.cs
- LocationEnvironment.cs
- DesignerToolboxInfo.cs
- BroadcastEventHelper.cs
- GenerateScriptTypeAttribute.cs
- WebRequest.cs
- FileDetails.cs
- OptionalColumn.cs
- ObjectConverter.cs
- DataView.cs
- ControlAdapter.cs
- SignedInfo.cs
- ComplexObject.cs
- ObjectItemCollection.cs
- SqlParameter.cs
- FrameworkTemplate.cs
- ReceiveReply.cs
- SchemaMapping.cs
- GroupItem.cs
- ResponseBodyWriter.cs
- DocumentManager.cs
- EncoderParameters.cs
- DataGridColumnsPage.cs
- Base64Stream.cs
- RelationshipType.cs
- SettingsProperty.cs
- DurableServiceAttribute.cs
- VerticalAlignConverter.cs
- WebPartTransformer.cs
- CannotUnloadAppDomainException.cs
- ExpressionCopier.cs
- SuppressMessageAttribute.cs
- XmlSchemaAnnotated.cs
- StorageFunctionMapping.cs
- TransformPattern.cs
- BindingEntityInfo.cs
- HtmlShimManager.cs
- DictionaryBase.cs
- HttpServerChannel.cs
- _BasicClient.cs
- CheckableControlBaseAdapter.cs
- ClipboardData.cs
- CustomErrorsSectionWrapper.cs
- WebMessageEncoderFactory.cs
- Automation.cs
- DataGridViewMethods.cs
- SourceFileInfo.cs
- ShaperBuffers.cs
- ReaderWriterLock.cs
- LinqDataSourceHelper.cs
- DetailsViewPagerRow.cs
- RealizationDrawingContextWalker.cs
- DecimalAnimation.cs
- RenameRuleObjectDialog.cs
- LoginName.cs
- CodeSubDirectory.cs
- SmtpFailedRecipientsException.cs
- HttpAsyncResult.cs
- CatalogPartCollection.cs
- CriticalHandle.cs
- CharEnumerator.cs
- TypeListConverter.cs
- URLAttribute.cs
- UpdateCompiler.cs
- bidPrivateBase.cs
- ManagementOperationWatcher.cs
- SafeFileHandle.cs
- WebOperationContext.cs
- OpenFileDialog.cs
- ToolStripGrip.cs
- Switch.cs
- ObjectResult.cs
- StorageBasedPackageProperties.cs
- CodeDirectionExpression.cs
- CleanUpVirtualizedItemEventArgs.cs
- XmlQueryContext.cs
- X509Certificate2.cs
- UdpDiscoveryEndpointProvider.cs
- FusionWrap.cs
- Model3DGroup.cs
- PassportAuthenticationModule.cs
- XamlRtfConverter.cs
- Activator.cs
- ExpressionBindingCollection.cs
- Selector.cs
- SchemaManager.cs
- ParallelDesigner.xaml.cs