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
- CodeActivity.cs
- SoapElementAttribute.cs
- SqlExpressionNullability.cs
- TextRange.cs
- CompareInfo.cs
- DateBoldEvent.cs
- sqlpipe.cs
- LogicalChannelCollection.cs
- MultiBindingExpression.cs
- BStrWrapper.cs
- RecognizerInfo.cs
- SchemaSetCompiler.cs
- HttpCacheParams.cs
- SafeRightsManagementPubHandle.cs
- FactoryMaker.cs
- PropertyHelper.cs
- SerialPort.cs
- HotSpot.cs
- ProviderSettings.cs
- WebPartHeaderCloseVerb.cs
- WithParamAction.cs
- Trace.cs
- xdrvalidator.cs
- HyperLinkField.cs
- Image.cs
- DataGridRowHeaderAutomationPeer.cs
- EditCommandColumn.cs
- ConsoleTraceListener.cs
- SyndicationDeserializer.cs
- TableRowGroupCollection.cs
- OdbcConnectionPoolProviderInfo.cs
- SHA384.cs
- EastAsianLunisolarCalendar.cs
- TreeIterator.cs
- GAC.cs
- ToggleProviderWrapper.cs
- Avt.cs
- FlowDocumentView.cs
- WindowsFormsHostAutomationPeer.cs
- CorrelationValidator.cs
- DataGridSortCommandEventArgs.cs
- BitmapMetadataBlob.cs
- GenericTypeParameterBuilder.cs
- ToolBarButton.cs
- FontUnitConverter.cs
- OracleCommandSet.cs
- BitmapEffectOutputConnector.cs
- MetaChildrenColumn.cs
- MultipleViewPattern.cs
- configsystem.cs
- InArgumentConverter.cs
- EtwTrace.cs
- CellTreeSimplifier.cs
- MailAddressCollection.cs
- SetStoryboardSpeedRatio.cs
- RootDesignerSerializerAttribute.cs
- AddIn.cs
- MenuBindingsEditor.cs
- AutomationFocusChangedEventArgs.cs
- Directory.cs
- ContextMenu.cs
- TemplateApplicationHelper.cs
- DispatchWrapper.cs
- SessionStateModule.cs
- AspNetSynchronizationContext.cs
- RectAnimationUsingKeyFrames.cs
- MouseGesture.cs
- Collection.cs
- ComplexTypeEmitter.cs
- CacheChildrenQuery.cs
- XPathAncestorIterator.cs
- VariantWrapper.cs
- HtmlInputPassword.cs
- SecurityRequiresReviewAttribute.cs
- IndexOutOfRangeException.cs
- DataObjectFieldAttribute.cs
- WindowsRegion.cs
- XPathDocumentIterator.cs
- EntityRecordInfo.cs
- ImageSourceConverter.cs
- TemplateControlParser.cs
- TextDecorationLocationValidation.cs
- SR.cs
- Soap.cs
- ParserExtension.cs
- ProxyElement.cs
- DesignerTransactionCloseEvent.cs
- PrintPreviewDialog.cs
- TemplatePagerField.cs
- MembershipPasswordException.cs
- AssociationEndMember.cs
- CopyNodeSetAction.cs
- WsdlBuildProvider.cs
- RegexParser.cs
- PassportAuthenticationModule.cs
- TileBrush.cs
- ExpressionConverter.cs
- WSUtilitySpecificationVersion.cs
- OutputCacheProviderCollection.cs
- ModifiableIteratorCollection.cs