Code:
/ FX-1434 / FX-1434 / 1.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
- TagNameToTypeMapper.cs
- IBuiltInEvidence.cs
- OracleColumn.cs
- RecognitionEventArgs.cs
- UnsafeNativeMethodsCLR.cs
- ProfileParameter.cs
- CaretElement.cs
- DataGridViewCellCollection.cs
- SoapAttributes.cs
- LiteralSubsegment.cs
- ValueConversionAttribute.cs
- UrlMappingsModule.cs
- RegexRunner.cs
- BreadCrumbTextConverter.cs
- DetailsViewUpdateEventArgs.cs
- DesignerVerb.cs
- _ListenerRequestStream.cs
- OdbcParameter.cs
- XMLSchema.cs
- DesignerHelpers.cs
- hwndwrapper.cs
- NotSupportedException.cs
- MatrixTransform3D.cs
- EnumValidator.cs
- DataGridViewAdvancedBorderStyle.cs
- ListDictionary.cs
- DropDownButton.cs
- DynamicPropertyHolder.cs
- XamlGridLengthSerializer.cs
- ScaleTransform.cs
- EventPrivateKey.cs
- ApplyImportsAction.cs
- ConfigXmlReader.cs
- EventLogPropertySelector.cs
- BooleanStorage.cs
- OperandQuery.cs
- ModelItemCollectionImpl.cs
- backend.cs
- TypeGeneratedEventArgs.cs
- TreeNodeCollection.cs
- GrammarBuilderRuleRef.cs
- Table.cs
- PermissionRequestEvidence.cs
- XsdBuildProvider.cs
- TypeSystem.cs
- WebPart.cs
- TraceSection.cs
- OutputCacheSettingsSection.cs
- InfocardExtendedInformationCollection.cs
- Scheduler.cs
- TagPrefixInfo.cs
- StructureChangedEventArgs.cs
- Types.cs
- MethodImplAttribute.cs
- RelationshipDetailsCollection.cs
- BinaryReader.cs
- BatchWriter.cs
- HtmlInputCheckBox.cs
- Page.cs
- SafeFileMappingHandle.cs
- DictionaryKeyPropertyAttribute.cs
- XmlWhitespace.cs
- TypeUtil.cs
- XamlTreeBuilder.cs
- SizeValueSerializer.cs
- While.cs
- DataGridViewRowCollection.cs
- DesignTimeValidationFeature.cs
- XmlException.cs
- SHA1Managed.cs
- ResourceContainer.cs
- PingReply.cs
- DPCustomTypeDescriptor.cs
- ConnectionStringEditor.cs
- TextBlock.cs
- XmlElementCollection.cs
- DetailsViewInsertedEventArgs.cs
- DetailsView.cs
- Trace.cs
- EventMappingSettings.cs
- ItemDragEvent.cs
- TrackingLocationCollection.cs
- ConcurrentStack.cs
- XmlLanguageConverter.cs
- PackWebResponse.cs
- DataRowChangeEvent.cs
- GroupDescription.cs
- SQLInt32.cs
- MergeFilterQuery.cs
- PeerCredential.cs
- XmlDataSourceView.cs
- WebRequestModulesSection.cs
- WindowManager.cs
- ExceptionHelpers.cs
- FullTextState.cs
- GridViewColumnHeaderAutomationPeer.cs
- LicenseException.cs
- RestClientProxyHandler.cs
- Version.cs
- OleDbSchemaGuid.cs