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
- MessageDecoder.cs
- SrgsSemanticInterpretationTag.cs
- ClientRoleProvider.cs
- _HeaderInfo.cs
- PresentationAppDomainManager.cs
- CheckBoxAutomationPeer.cs
- BuildProviderUtils.cs
- StopStoryboard.cs
- BidOverLoads.cs
- PixelFormats.cs
- GlobalProxySelection.cs
- SHA384Managed.cs
- DocComment.cs
- externdll.cs
- columnmapkeybuilder.cs
- TripleDESCryptoServiceProvider.cs
- CompositeScriptReference.cs
- Material.cs
- DocumentViewerBase.cs
- RightNameExpirationInfoPair.cs
- LocalizationCodeDomSerializer.cs
- OracleConnectionString.cs
- WebPartEditorApplyVerb.cs
- SelectionListDesigner.cs
- FrameworkElementFactory.cs
- OleDbInfoMessageEvent.cs
- ConvertersCollection.cs
- InheritedPropertyDescriptor.cs
- BinaryWriter.cs
- ZipArchive.cs
- ClientConvert.cs
- versioninfo.cs
- PtsCache.cs
- Application.cs
- ToolBarButton.cs
- StringDictionary.cs
- FtpRequestCacheValidator.cs
- WmlSelectionListAdapter.cs
- DetailsViewPageEventArgs.cs
- TransactionChannelFactory.cs
- XmlTextReaderImpl.cs
- HashFinalRequest.cs
- GlyphRunDrawing.cs
- ComboBoxAutomationPeer.cs
- VersionUtil.cs
- DefinitionBase.cs
- MessageEncodingBindingElement.cs
- InvariantComparer.cs
- MimeReturn.cs
- NullableBoolConverter.cs
- DBParameter.cs
- DesignerWidgets.cs
- InputProcessorProfilesLoader.cs
- UnaryNode.cs
- IPCCacheManager.cs
- ChannelBase.cs
- BidOverLoads.cs
- RegistryConfigurationProvider.cs
- Validator.cs
- ScrollItemProviderWrapper.cs
- PenThreadPool.cs
- EntityDataSourceEntitySetNameItem.cs
- Converter.cs
- Shape.cs
- Visual3DCollection.cs
- DistinctQueryOperator.cs
- PropertyToken.cs
- ExceptionAggregator.cs
- SortedDictionary.cs
- ForceCopyBuildProvider.cs
- DescendantOverDescendantQuery.cs
- TextLineBreak.cs
- DefaultHttpHandler.cs
- DashStyles.cs
- Profiler.cs
- SQLMoneyStorage.cs
- XamlSerializer.cs
- ConstraintCollection.cs
- CompilerInfo.cs
- InfoCardMasterKey.cs
- PkcsUtils.cs
- TransformGroup.cs
- RadialGradientBrush.cs
- BuildProviderAppliesToAttribute.cs
- CatchBlock.cs
- DefaultValueTypeConverter.cs
- DesignTimeTemplateParser.cs
- HandleValueEditor.cs
- WebColorConverter.cs
- MailHeaderInfo.cs
- ProfileServiceManager.cs
- unsafenativemethodstextservices.cs
- Vertex.cs
- XmlHelper.cs
- _WebProxyDataBuilder.cs
- CommandID.cs
- TextPatternIdentifiers.cs
- XPathScanner.cs
- DiscreteKeyFrames.cs
- Set.cs