Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Dispatcher / SynchronizedChannelCollection.cs / 1 / SynchronizedChannelCollection.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Dispatcher { using System; using System.Collections.Generic; using System.ServiceModel.Channels; class SynchronizedChannelCollection: SynchronizedCollection where TChannel : IChannel { EventHandler onChannelClosed; EventHandler onChannelFaulted; internal SynchronizedChannelCollection(object syncRoot) : base(syncRoot) { this.onChannelClosed = new EventHandler(OnChannelClosed); this.onChannelFaulted = new EventHandler(OnChannelFaulted); } void AddingChannel(TChannel channel) { channel.Faulted += this.onChannelFaulted; channel.Closed += this.onChannelClosed; } void RemovingChannel(TChannel channel) { channel.Faulted -= this.onChannelFaulted; channel.Closed -= this.onChannelClosed; } void OnChannelClosed(object sender, EventArgs args) { TChannel channel = (TChannel)sender; this.Remove(channel); } void OnChannelFaulted(object sender, EventArgs args) { TChannel channel = (TChannel)sender; this.Remove(channel); } protected override void ClearItems() { List items = this.Items; for (int i=0; i
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Trigger.cs
- DateRangeEvent.cs
- CollectionTraceRecord.cs
- RelationshipEndCollection.cs
- CqlErrorHelper.cs
- WizardPanel.cs
- XmlDigitalSignatureProcessor.cs
- FixedSOMGroup.cs
- CodeCompileUnit.cs
- fixedPageContentExtractor.cs
- TransportContext.cs
- CodeExpressionCollection.cs
- ScrollBar.cs
- COM2EnumConverter.cs
- DefinitionBase.cs
- TimeIntervalCollection.cs
- CredentialManagerDialog.cs
- EpmContentDeSerializerBase.cs
- WsdlBuildProvider.cs
- CellCreator.cs
- ResourcePart.cs
- AlternationConverter.cs
- DrawingContext.cs
- ObfuscationAttribute.cs
- AssemblyCache.cs
- DetailsViewUpdateEventArgs.cs
- NotifyIcon.cs
- CallbackHandler.cs
- PeerInputChannelListener.cs
- MultipartContentParser.cs
- DataGridViewCellCollection.cs
- CharacterHit.cs
- TextRangeEditLists.cs
- VariableQuery.cs
- UtilityExtension.cs
- Color.cs
- WindowHelperService.cs
- UiaCoreApi.cs
- UInt64.cs
- basevalidator.cs
- ZipIOExtraFieldPaddingElement.cs
- ValidationSummary.cs
- RemotingAttributes.cs
- OleDbCommand.cs
- SafeThemeHandle.cs
- SamlAuthorityBinding.cs
- DataList.cs
- HttpHandlerAction.cs
- BaseDataBoundControl.cs
- NativeRecognizer.cs
- NamedObject.cs
- Span.cs
- FormViewInsertEventArgs.cs
- ModelItemImpl.cs
- ContainsSearchOperator.cs
- OpenTypeLayoutCache.cs
- ProvidePropertyAttribute.cs
- StructuredType.cs
- ExecutorLocksHeldException.cs
- XmlAnyElementAttribute.cs
- XmlProcessingInstruction.cs
- EventWaitHandle.cs
- BitmapEncoder.cs
- COM2ColorConverter.cs
- FontInfo.cs
- SessionStateUtil.cs
- PartialList.cs
- ExpressionConverter.cs
- SimpleNameService.cs
- FixedPosition.cs
- Avt.cs
- Enlistment.cs
- ModelTreeManager.cs
- X509AudioLogo.cs
- NetworkAddressChange.cs
- Debugger.cs
- DataGridViewCellCancelEventArgs.cs
- EditingScope.cs
- ControlBuilder.cs
- Resources.Designer.cs
- UIElementParaClient.cs
- SelectingProviderEventArgs.cs
- BufferModesCollection.cs
- CornerRadiusConverter.cs
- ExpressionVisitor.cs
- SafeFileMappingHandle.cs
- HistoryEventArgs.cs
- PersonalizationStateInfo.cs
- StrokeNode.cs
- ColumnResizeAdorner.cs
- LoginCancelEventArgs.cs
- SeverityFilter.cs
- HttpApplication.cs
- Debug.cs
- JsonObjectDataContract.cs
- unsafeIndexingFilterStream.cs
- TableLayoutSettings.cs
- CodeSubDirectory.cs
- QilFunction.cs
- ProfileEventArgs.cs