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
- TrustManager.cs
- FlowLayout.cs
- SymmetricKeyWrap.cs
- URLString.cs
- MatrixAnimationUsingKeyFrames.cs
- SubMenuStyleCollection.cs
- DispatcherOperation.cs
- RoutedCommand.cs
- Matrix3D.cs
- SurrogateSelector.cs
- RelatedEnd.cs
- PolicyValidationException.cs
- ComplexType.cs
- Calendar.cs
- OdbcParameterCollection.cs
- PolicyException.cs
- SelectionWordBreaker.cs
- FacetChecker.cs
- HttpException.cs
- StatusBarDrawItemEvent.cs
- EventHandlersStore.cs
- WorkflowServiceBehavior.cs
- MenuAdapter.cs
- ServiceModelEnhancedConfigurationElementCollection.cs
- ImpersonateTokenRef.cs
- PassportPrincipal.cs
- VSWCFServiceContractGenerator.cs
- SystemFonts.cs
- SpecularMaterial.cs
- EastAsianLunisolarCalendar.cs
- DataExpression.cs
- ConfigurationCollectionAttribute.cs
- Quaternion.cs
- DefaultAuthorizationContext.cs
- ClientType.cs
- InvokeWebService.cs
- Deserializer.cs
- TreeNodeEventArgs.cs
- Track.cs
- PermissionSet.cs
- TheQuery.cs
- ReflectionHelper.cs
- AnimationLayer.cs
- XDRSchema.cs
- OledbConnectionStringbuilder.cs
- ConsoleCancelEventArgs.cs
- QilList.cs
- OutputCacheModule.cs
- Script.cs
- ProtocolsConfigurationHandler.cs
- DbConnectionFactory.cs
- ControlHelper.cs
- LinkUtilities.cs
- DesignerWithHeader.cs
- HtmlWindowCollection.cs
- ParserHooks.cs
- SimpleHandlerFactory.cs
- FrameworkContextData.cs
- SHA384.cs
- WeakReferenceEnumerator.cs
- Model3DCollection.cs
- LicenseContext.cs
- StreamReader.cs
- Thumb.cs
- SqlIdentifier.cs
- SafeRegistryHandle.cs
- ByteArrayHelperWithString.cs
- SchemaElementLookUpTable.cs
- TdsParserStaticMethods.cs
- Point3DCollection.cs
- XmlSchemaChoice.cs
- xamlnodes.cs
- WebServiceData.cs
- TableCell.cs
- HttpResponseBase.cs
- InfoCardSymmetricAlgorithm.cs
- SecurityException.cs
- DbConnectionPoolIdentity.cs
- PermissionListSet.cs
- ScriptResourceInfo.cs
- RowType.cs
- SessionEndingEventArgs.cs
- ADRoleFactoryConfiguration.cs
- LogicalTreeHelper.cs
- DropDownHolder.cs
- Helper.cs
- KnownTypesProvider.cs
- filewebrequest.cs
- SpanIndex.cs
- Fonts.cs
- Package.cs
- ErrorStyle.cs
- Clipboard.cs
- FusionWrap.cs
- ConnectionPointConverter.cs
- LogEntryUtils.cs
- OracleRowUpdatedEventArgs.cs
- XamlFigureLengthSerializer.cs
- ComponentEditorPage.cs
- TimeSpan.cs