Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Net / System / Net / _NestedMultipleAsyncResult.cs / 1 / _NestedMultipleAsyncResult.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Net {
//
// The NestedAsyncResult - used to wrap async requests
// this is used to hold another async result made
// through a call to another Begin call within.
//
internal class NestedMultipleAsyncResult : LazyAsyncResult {
//
// this is usually for operations on streams/buffers,
// we save information passed in on the Begin call:
// since some calls might need several completions, we
// need to save state on the user's IO request
//
internal BufferOffsetSize[] Buffers;
internal int Size;
//
// Constructor:
//
internal NestedMultipleAsyncResult(Object asyncObject, Object asyncState, AsyncCallback asyncCallback, BufferOffsetSize[] buffers)
: base( asyncObject, asyncState, asyncCallback ) {
Buffers = buffers;
Size = 0;
for (int i = 0; i < Buffers.Length; i++) {
Size += Buffers[i].Size;
}
}
}; // class NestedMultipleAsyncResult
} // namespace System.Net
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Net {
//
// The NestedAsyncResult - used to wrap async requests
// this is used to hold another async result made
// through a call to another Begin call within.
//
internal class NestedMultipleAsyncResult : LazyAsyncResult {
//
// this is usually for operations on streams/buffers,
// we save information passed in on the Begin call:
// since some calls might need several completions, we
// need to save state on the user's IO request
//
internal BufferOffsetSize[] Buffers;
internal int Size;
//
// Constructor:
//
internal NestedMultipleAsyncResult(Object asyncObject, Object asyncState, AsyncCallback asyncCallback, BufferOffsetSize[] buffers)
: base( asyncObject, asyncState, asyncCallback ) {
Buffers = buffers;
Size = 0;
for (int i = 0; i < Buffers.Length; i++) {
Size += Buffers[i].Size;
}
}
}; // class NestedMultipleAsyncResult
} // namespace System.Net
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XamlWriter.cs
- PropertyPath.cs
- Token.cs
- IDispatchConstantAttribute.cs
- codemethodreferenceexpression.cs
- TableAutomationPeer.cs
- RelationshipNavigation.cs
- CodePrimitiveExpression.cs
- EventNotify.cs
- RSAPKCS1KeyExchangeFormatter.cs
- EditorAttribute.cs
- AvTrace.cs
- ImageDrawing.cs
- DesignerActionKeyboardBehavior.cs
- Error.cs
- NameNode.cs
- MeasureItemEvent.cs
- Int32Converter.cs
- PaginationProgressEventArgs.cs
- ColorTransformHelper.cs
- EnumerableCollectionView.cs
- PriorityBinding.cs
- ApplicationServicesHostFactory.cs
- AnnotationObservableCollection.cs
- FixedTextBuilder.cs
- WorkflowOperationFault.cs
- HelpEvent.cs
- TrackingStringDictionary.cs
- DBCSCodePageEncoding.cs
- IdentityHolder.cs
- NotifyParentPropertyAttribute.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- MD5CryptoServiceProvider.cs
- RuleSettingsCollection.cs
- InputLanguageManager.cs
- InstanceContextManager.cs
- AssertSection.cs
- ConvertEvent.cs
- RepeaterItemEventArgs.cs
- ResolvedKeyFrameEntry.cs
- XPathNodeHelper.cs
- ListItem.cs
- MetadataUtilsSmi.cs
- log.cs
- TextBox.cs
- ZoneMembershipCondition.cs
- QilXmlWriter.cs
- DropSource.cs
- ParsedRoute.cs
- PrintEvent.cs
- TimeIntervalCollection.cs
- Invariant.cs
- RawAppCommandInputReport.cs
- EventDescriptorCollection.cs
- CLSCompliantAttribute.cs
- CodeDirectionExpression.cs
- SynchronizationLockException.cs
- ControlBuilderAttribute.cs
- Color.cs
- InkCanvas.cs
- Expression.cs
- TabItemWrapperAutomationPeer.cs
- EventListener.cs
- HttpResponseWrapper.cs
- FormParameter.cs
- PopOutPanel.cs
- DefinitionUpdate.cs
- PerformanceCounterLib.cs
- ExpandedWrapper.cs
- ProfilePropertySettingsCollection.cs
- DisplayClaim.cs
- CorePropertiesFilter.cs
- AggregateNode.cs
- Literal.cs
- TypeContext.cs
- IMembershipProvider.cs
- SQLDouble.cs
- ElementAtQueryOperator.cs
- DeploymentSectionCache.cs
- DependencyPropertyKey.cs
- SecurityTokenTypes.cs
- GlobalProxySelection.cs
- RewritingSimplifier.cs
- MembershipSection.cs
- HyperLinkColumn.cs
- DiscardableAttribute.cs
- GetPageCompletedEventArgs.cs
- BindableTemplateBuilder.cs
- CLSCompliantAttribute.cs
- Matrix.cs
- TextServicesManager.cs
- SelectionChangedEventArgs.cs
- HTTPNotFoundHandler.cs
- SpeechAudioFormatInfo.cs
- ValidationHelper.cs
- InvalidOperationException.cs
- Ops.cs
- TcpConnectionPoolSettingsElement.cs
- RIPEMD160Managed.cs
- ImageButton.cs