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
- TextEffect.cs
- QuaternionValueSerializer.cs
- WrapPanel.cs
- FieldToken.cs
- AuditLog.cs
- Condition.cs
- WinFormsUtils.cs
- PeerNodeTraceRecord.cs
- RangeValueProviderWrapper.cs
- CreateInstanceBinder.cs
- TableDetailsRow.cs
- TextTreeExtractElementUndoUnit.cs
- CellTreeNode.cs
- SweepDirectionValidation.cs
- RangeValueProviderWrapper.cs
- CodeConditionStatement.cs
- CommonGetThemePartSize.cs
- log.cs
- XmlDocumentFragment.cs
- Aggregates.cs
- HMACSHA512.cs
- XmlSerializerAssemblyAttribute.cs
- PropertyValueChangedEvent.cs
- IntAverageAggregationOperator.cs
- HttpCapabilitiesBase.cs
- AutomationEvent.cs
- AssemblyAssociatedContentFileAttribute.cs
- TraceContextRecord.cs
- Page.cs
- TableCell.cs
- ReachSerializationCacheItems.cs
- ADMembershipUser.cs
- ReflectEventDescriptor.cs
- Panel.cs
- FirstMatchCodeGroup.cs
- MissingMemberException.cs
- Operand.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- VerificationException.cs
- ParameterBinding.cs
- LineBreak.cs
- RefExpr.cs
- LiteralControl.cs
- ListManagerBindingsCollection.cs
- PrintPreviewControl.cs
- AccessibleObject.cs
- FormsAuthenticationEventArgs.cs
- ConfigurationManagerInternal.cs
- TagPrefixCollection.cs
- ConstraintStruct.cs
- HttpCacheParams.cs
- MsmqIntegrationChannelListener.cs
- AnnotationObservableCollection.cs
- ExpandableObjectConverter.cs
- DataGridViewRowHeaderCell.cs
- Compiler.cs
- RtfToXamlLexer.cs
- ConnectionManagementSection.cs
- SectionUpdates.cs
- AccessText.cs
- CompositeCollection.cs
- DataGridViewRowsRemovedEventArgs.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- ReferenceConverter.cs
- RealProxy.cs
- PropertyPath.cs
- TagPrefixInfo.cs
- WindowsSolidBrush.cs
- PagesSection.cs
- SharedPersonalizationStateInfo.cs
- DBSchemaTable.cs
- DataGridViewColumnHeaderCell.cs
- XmlCharType.cs
- TemplateParser.cs
- DesignTable.cs
- PropertyNames.cs
- ControlValuePropertyAttribute.cs
- TableColumn.cs
- SafeRightsManagementHandle.cs
- ToolStripHighContrastRenderer.cs
- ScrollBarRenderer.cs
- InfoCardTraceRecord.cs
- RuntimeHelpers.cs
- WebControlsSection.cs
- HttpHandler.cs
- Vector3DKeyFrameCollection.cs
- CompositeFontParser.cs
- SortedDictionary.cs
- Speller.cs
- XpsS0ValidatingLoader.cs
- TraceProvider.cs
- ActiveXSerializer.cs
- MaterializeFromAtom.cs
- SafeEventLogReadHandle.cs
- X509SecurityToken.cs
- IntegerValidator.cs
- ElapsedEventArgs.cs
- DesignerCommandAdapter.cs
- HighContrastHelper.cs
- Grammar.cs