Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / Mail / MultiAsyncResult.cs / 1 / MultiAsyncResult.cs
namespace System.Net.Mime { using System; internal class MultiAsyncResult : LazyAsyncResult { int outstanding; object context; internal MultiAsyncResult(object context, AsyncCallback callback, object state) : base(context,state,callback) { this.context = context; } internal object Context { get { return this.context; } } internal void Enter() { Increment(); } internal void Leave() { Decrement(); } internal void Leave(object result) { this.Result = result; Decrement(); } void Decrement() { if (System.Threading.Interlocked.Decrement(ref this.outstanding) == -1) { base.InvokeCallback(Result); } } void Increment() { System.Threading.Interlocked.Increment(ref this.outstanding); } internal void CompleteSequence() { Decrement(); } internal static object End(IAsyncResult result) { MultiAsyncResult thisPtr = (MultiAsyncResult)result; thisPtr.InternalWaitForCompletion(); return thisPtr.Result; } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DPTypeDescriptorContext.cs
- PtsPage.cs
- DependencyPropertyKind.cs
- HitTestFilterBehavior.cs
- EditingMode.cs
- BitmapEffectrendercontext.cs
- JavascriptCallbackBehaviorAttribute.cs
- ListView.cs
- ZipPackagePart.cs
- ColumnResult.cs
- EncryptedData.cs
- TextEditorThreadLocalStore.cs
- UserControl.cs
- TransformedBitmap.cs
- GradientSpreadMethodValidation.cs
- ScriptResourceAttribute.cs
- SecurityManager.cs
- GcSettings.cs
- ColorMatrix.cs
- DesignTimeTemplateParser.cs
- TrustManagerPromptUI.cs
- XmlMtomWriter.cs
- XmlRawWriterWrapper.cs
- ProxyWebPart.cs
- ClientBuildManager.cs
- PropertySegmentSerializer.cs
- ZipArchive.cs
- ActiveXHelper.cs
- HttpModuleAction.cs
- DrawToolTipEventArgs.cs
- CodeDOMUtility.cs
- OraclePermissionAttribute.cs
- Console.cs
- CfgParser.cs
- BuildProvider.cs
- CompilerGeneratedAttribute.cs
- SingleTagSectionHandler.cs
- TypeToken.cs
- LifetimeServices.cs
- ConstraintStruct.cs
- HttpWebResponse.cs
- EdmItemError.cs
- ObjectIDGenerator.cs
- IOThreadScheduler.cs
- HttpStreamXmlDictionaryReader.cs
- ProcessHost.cs
- WebHeaderCollection.cs
- SiteMapSection.cs
- COAUTHINFO.cs
- StickyNoteAnnotations.cs
- MenuItemCollection.cs
- Baml2006SchemaContext.cs
- IsolatedStorage.cs
- MessageSecurityOverMsmq.cs
- AssemblyContextControlItem.cs
- Model3DGroup.cs
- XmlDictionaryReaderQuotas.cs
- TransactionOptions.cs
- SessionPageStatePersister.cs
- ProcessingInstructionAction.cs
- FramingEncoders.cs
- PolyBezierSegment.cs
- ZoneButton.cs
- RoutedEventHandlerInfo.cs
- SafeProcessHandle.cs
- XmlSchemaSimpleTypeList.cs
- HtmlTernaryTree.cs
- ExpandoClass.cs
- ScriptModule.cs
- HtmlInputButton.cs
- PackageStore.cs
- DocumentPageHost.cs
- UpdatePanel.cs
- XMLSchema.cs
- SessionStateModule.cs
- DataGridTableCollection.cs
- XmlDigitalSignatureProcessor.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- ConsumerConnectionPoint.cs
- NetworkStream.cs
- SqlCrossApplyToCrossJoin.cs
- ListenerSessionConnectionReader.cs
- XmlUnspecifiedAttribute.cs
- ProfileProvider.cs
- XPathEmptyIterator.cs
- TrackBarDesigner.cs
- SystemResources.cs
- FormatConvertedBitmap.cs
- UncommonField.cs
- SoapCodeExporter.cs
- SQLBytes.cs
- FixedHighlight.cs
- GridLengthConverter.cs
- Block.cs
- _TLSstream.cs
- TextEmbeddedObject.cs
- ColumnWidthChangingEvent.cs
- AssemblyNameProxy.cs
- UnauthorizedWebPart.cs
- DllNotFoundException.cs