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
- ProtectedConfigurationSection.cs
- TreeViewHitTestInfo.cs
- RowsCopiedEventArgs.cs
- AncestorChangedEventArgs.cs
- CustomAttribute.cs
- ChooseAction.cs
- PowerStatus.cs
- SqlConnectionStringBuilder.cs
- TransformerInfo.cs
- OpCodes.cs
- ServiceOperationHelpers.cs
- NativeMethods.cs
- HierarchicalDataBoundControl.cs
- CapabilitiesState.cs
- Transaction.cs
- SafeReversePInvokeHandle.cs
- DataGridViewCellPaintingEventArgs.cs
- ParameterToken.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- EditorZoneBase.cs
- SvcMapFileSerializer.cs
- NameSpaceExtractor.cs
- RC2CryptoServiceProvider.cs
- OracleInternalConnection.cs
- TypeReference.cs
- MarkupExtensionParser.cs
- StylusButtonCollection.cs
- CrossAppDomainChannel.cs
- TimeSpanOrInfiniteConverter.cs
- XmlHierarchicalDataSourceView.cs
- SqlConnectionPoolProviderInfo.cs
- DynamicArgumentDesigner.xaml.cs
- HeaderedContentControl.cs
- ImageConverter.cs
- StandardCommands.cs
- DictionarySectionHandler.cs
- HebrewCalendar.cs
- Point3DCollection.cs
- RuleElement.cs
- WebDisplayNameAttribute.cs
- BitmapCodecInfoInternal.cs
- SignedXml.cs
- SqlIdentifier.cs
- EncoderFallback.cs
- RawUIStateInputReport.cs
- TypeUtil.cs
- UnhandledExceptionEventArgs.cs
- StringSource.cs
- EngineSiteSapi.cs
- MediaCommands.cs
- GridLengthConverter.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- CommunicationException.cs
- GcSettings.cs
- ReflectPropertyDescriptor.cs
- XmlDataLoader.cs
- TextBlock.cs
- EmptyControlCollection.cs
- NetNamedPipeBindingElement.cs
- ExpressionVisitor.cs
- XmlSchemaSimpleContentRestriction.cs
- SiteMapPath.cs
- ChannelServices.cs
- AdornerHitTestResult.cs
- Helpers.cs
- ModulesEntry.cs
- InnerItemCollectionView.cs
- SettingsSavedEventArgs.cs
- CatalogPart.cs
- FlowDocumentFormatter.cs
- SqlNodeAnnotations.cs
- LoginStatusDesigner.cs
- ProfilePropertySettingsCollection.cs
- DependencyPropertyKind.cs
- DataSourceHelper.cs
- GridViewRowPresenter.cs
- NavigateEvent.cs
- PropertyRecord.cs
- FixedSOMContainer.cs
- MarkupProperty.cs
- StylusOverProperty.cs
- RoutedEventConverter.cs
- SoapIncludeAttribute.cs
- IgnoreSectionHandler.cs
- CustomSignedXml.cs
- FixedPageProcessor.cs
- XmlPropertyBag.cs
- XmlIlVisitor.cs
- GridViewUpdatedEventArgs.cs
- SiteMapNodeCollection.cs
- SecurityResources.cs
- FileDialogPermission.cs
- FreezableDefaultValueFactory.cs
- CheckBox.cs
- ProcessModuleCollection.cs
- DataObject.cs
- Animatable.cs
- peersecuritysettings.cs
- WebBrowserPermission.cs
- ReverseInheritProperty.cs