Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- autovalidator.cs
- TextServicesCompartmentContext.cs
- ResourceSet.cs
- HwndSubclass.cs
- _HelperAsyncResults.cs
- CommittableTransaction.cs
- StyleHelper.cs
- SecurityNegotiationException.cs
- OdbcPermission.cs
- CatalogZoneDesigner.cs
- SecurityManager.cs
- LicenseContext.cs
- AuthenticationModuleElement.cs
- EventItfInfo.cs
- CompressEmulationStream.cs
- XmlILConstructAnalyzer.cs
- DelegateSerializationHolder.cs
- SerialReceived.cs
- Utility.cs
- GeneralTransform3DTo2DTo3D.cs
- ParserContext.cs
- FileUpload.cs
- UrlPropertyAttribute.cs
- SQLDecimal.cs
- ActiveXSerializer.cs
- RTLAwareMessageBox.cs
- CopyNodeSetAction.cs
- BindingMemberInfo.cs
- x509store.cs
- EncoderFallback.cs
- ComplexTypeEmitter.cs
- GACIdentityPermission.cs
- ObjectDataSourceStatusEventArgs.cs
- PreDigestedSignedInfo.cs
- RtfFormatStack.cs
- Vector.cs
- RSAOAEPKeyExchangeDeformatter.cs
- SmtpDigestAuthenticationModule.cs
- Query.cs
- MetabaseReader.cs
- XhtmlBasicListAdapter.cs
- _AutoWebProxyScriptHelper.cs
- EntityModelBuildProvider.cs
- SqlBuffer.cs
- XmlQueryCardinality.cs
- Options.cs
- InputReferenceExpression.cs
- Double.cs
- FlowDocumentPaginator.cs
- CodeCatchClauseCollection.cs
- ReachDocumentReferenceSerializerAsync.cs
- Crc32.cs
- ServiceModelExtensionElement.cs
- RectKeyFrameCollection.cs
- UriWriter.cs
- IListConverters.cs
- behaviorssection.cs
- TraceSection.cs
- DropShadowBitmapEffect.cs
- DataGridViewTopLeftHeaderCell.cs
- WebServiceClientProxyGenerator.cs
- LayoutSettings.cs
- StylusOverProperty.cs
- CompositeDispatchFormatter.cs
- NumericExpr.cs
- AppSettingsExpressionBuilder.cs
- Win32PrintDialog.cs
- DesignerSelectionListAdapter.cs
- PageParser.cs
- BinaryFormatter.cs
- BuildProvider.cs
- GridViewColumnCollection.cs
- SerializerProvider.cs
- FlowchartDesigner.xaml.cs
- InkCanvasSelectionAdorner.cs
- DefaultValueAttribute.cs
- SplineKeyFrames.cs
- __ComObject.cs
- FixedFindEngine.cs
- DataGridViewButtonColumn.cs
- ReadOnlyObservableCollection.cs
- GrammarBuilderBase.cs
- EncoderFallback.cs
- StickyNoteContentControl.cs
- RegistrySecurity.cs
- FileNotFoundException.cs
- JsonByteArrayDataContract.cs
- XmlDeclaration.cs
- ContextMenuStrip.cs
- CodeAccessPermission.cs
- BasicViewGenerator.cs
- ProfileEventArgs.cs
- TextTrailingWordEllipsis.cs
- RoutedPropertyChangedEventArgs.cs
- IdentifierCollection.cs
- SplashScreenNativeMethods.cs
- TypeSystemHelpers.cs
- MatrixValueSerializer.cs
- ConfigurationSection.cs
- SqlNotificationEventArgs.cs