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
- ValueType.cs
- __TransparentProxy.cs
- CommandHelper.cs
- DependencyObjectProvider.cs
- GACIdentityPermission.cs
- FactoryRecord.cs
- NotConverter.cs
- ManagementObjectSearcher.cs
- SmtpFailedRecipientsException.cs
- ServiceManagerHandle.cs
- WebPartConnectionsCloseVerb.cs
- IQueryable.cs
- OdbcConnectionStringbuilder.cs
- HttpResponseHeader.cs
- SafeProcessHandle.cs
- TrackingMemoryStreamFactory.cs
- MachineKeySection.cs
- ButtonBase.cs
- EncryptedHeader.cs
- RoutedEventArgs.cs
- GroupAggregateExpr.cs
- SqlCommand.cs
- InvalidEnumArgumentException.cs
- EventSetterHandlerConverter.cs
- PrimitiveDataContract.cs
- bindurihelper.cs
- EmbeddedObject.cs
- SmtpFailedRecipientException.cs
- OperationSelectorBehavior.cs
- Encoding.cs
- ProjectionPruner.cs
- Int32Rect.cs
- PixelFormats.cs
- FunctionDetailsReader.cs
- CheckBox.cs
- SchemaImporter.cs
- CacheVirtualItemsEvent.cs
- ControlDesigner.cs
- SimpleHandlerBuildProvider.cs
- ContractAdapter.cs
- DataServiceStreamResponse.cs
- DirectoryGroupQuery.cs
- VBCodeProvider.cs
- ContentOperations.cs
- ObjectStateEntryDbDataRecord.cs
- TabletDevice.cs
- TextContainerChangeEventArgs.cs
- Codec.cs
- SmtpNtlmAuthenticationModule.cs
- UnsafePeerToPeerMethods.cs
- UIElement3DAutomationPeer.cs
- SrgsRuleRef.cs
- AlternationConverter.cs
- Merger.cs
- XamlGridLengthSerializer.cs
- IndentedWriter.cs
- GlyphTypeface.cs
- WeakEventManager.cs
- XmlNodeChangedEventManager.cs
- ConstantExpression.cs
- ListViewDataItem.cs
- _NegotiateClient.cs
- XhtmlBasicControlAdapter.cs
- TrackingServices.cs
- EncryptedPackage.cs
- ServiceOperation.cs
- HwndSourceParameters.cs
- TemplateKey.cs
- MouseBinding.cs
- PrivilegedConfigurationManager.cs
- NamedObject.cs
- MergablePropertyAttribute.cs
- Privilege.cs
- SqlProcedureAttribute.cs
- ReferenceSchema.cs
- CollectionDataContract.cs
- ClaimTypeElement.cs
- SolidColorBrush.cs
- TypeExtensionConverter.cs
- SrgsRuleRef.cs
- LinkConverter.cs
- FileSystemWatcher.cs
- PageParserFilter.cs
- XmlException.cs
- Label.cs
- xmlformatgeneratorstatics.cs
- XmlSubtreeReader.cs
- MatrixCamera.cs
- ToolStripSettings.cs
- Point3DValueSerializer.cs
- IpcPort.cs
- DataView.cs
- Inflater.cs
- ExcCanonicalXml.cs
- HitTestParameters.cs
- DragDeltaEventArgs.cs
- RSACryptoServiceProvider.cs
- coordinator.cs
- ExceptionList.cs
- DesignerActionList.cs