Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / System.Runtime.DurableInstancing / System / Runtime / TypedAsyncResult.cs / 1305376 / TypedAsyncResult.cs
//---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------------------- namespace System.Runtime { abstract class TypedAsyncResult: AsyncResult { T data; public TypedAsyncResult(AsyncCallback callback, object state) : base(callback, state) { } public T Data { get { return data; } } protected void Complete(T data, bool completedSynchronously) { this.data = data; Complete(completedSynchronously); } public static T End(IAsyncResult result) { TypedAsyncResult completedResult = AsyncResult.End >(result); return completedResult.Data; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------------------- namespace System.Runtime { abstract class TypedAsyncResult : AsyncResult { T data; public TypedAsyncResult(AsyncCallback callback, object state) : base(callback, state) { } public T Data { get { return data; } } protected void Complete(T data, bool completedSynchronously) { this.data = data; Complete(completedSynchronously); } public static T End(IAsyncResult result) { TypedAsyncResult completedResult = AsyncResult.End >(result); return completedResult.Data; } } } // 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
- BindingsSection.cs
- GenericIdentity.cs
- securestring.cs
- InkCanvasSelectionAdorner.cs
- ActivationArguments.cs
- SortQuery.cs
- AuthenticationModeHelper.cs
- WebPartZoneBase.cs
- BindingNavigator.cs
- CommentEmitter.cs
- fixedPageContentExtractor.cs
- DataGridViewCellStyleConverter.cs
- ZipIOExtraFieldZip64Element.cs
- CssStyleCollection.cs
- PlaceHolder.cs
- DiscoveryInnerClientAdhocCD1.cs
- CollectionChangeEventArgs.cs
- UnsafeNativeMethods.cs
- TextPointerBase.cs
- MexHttpsBindingCollectionElement.cs
- IsolationInterop.cs
- PenCursorManager.cs
- QueryTask.cs
- PreDigestedSignedInfo.cs
- PropertyPath.cs
- PropertyBuilder.cs
- XmlEntityReference.cs
- CodeDirectoryCompiler.cs
- OdbcFactory.cs
- SplitterPanel.cs
- TerminatingOperationBehavior.cs
- AdRotator.cs
- UICuesEvent.cs
- SmiXetterAccessMap.cs
- CatalogZoneDesigner.cs
- SelectionEditor.cs
- FormViewDeleteEventArgs.cs
- DataSourceNameHandler.cs
- DoubleAnimationClockResource.cs
- HwndMouseInputProvider.cs
- ObfuscateAssemblyAttribute.cs
- Menu.cs
- BindingFormattingDialog.cs
- SafeRightsManagementHandle.cs
- TextPattern.cs
- Bold.cs
- CheckBoxRenderer.cs
- Hex.cs
- MultiPageTextView.cs
- ErrorProvider.cs
- WsdlParser.cs
- CounterSample.cs
- Automation.cs
- HtmlInputFile.cs
- GorillaCodec.cs
- FullTextState.cs
- SrgsElement.cs
- SerializationInfo.cs
- OSFeature.cs
- ProcessThreadCollection.cs
- ImageKeyConverter.cs
- IisHelper.cs
- TextBoxBase.cs
- CodeLabeledStatement.cs
- tooltip.cs
- RowUpdatedEventArgs.cs
- CreateUserErrorEventArgs.cs
- UInt32.cs
- WeakReferenceEnumerator.cs
- RelationshipEndCollection.cs
- SerializationEventsCache.cs
- ProcessInfo.cs
- HttpRawResponse.cs
- RecordManager.cs
- Substitution.cs
- ObjectReaderCompiler.cs
- SystemDiagnosticsSection.cs
- DataGridClipboardCellContent.cs
- SubpageParaClient.cs
- XmlTextReaderImplHelpers.cs
- HttpCacheVary.cs
- Error.cs
- DetailsViewUpdateEventArgs.cs
- MenuCommandService.cs
- VideoDrawing.cs
- ToolStripArrowRenderEventArgs.cs
- CombinedGeometry.cs
- StringOutput.cs
- WizardForm.cs
- UTF7Encoding.cs
- SqlProfileProvider.cs
- PropertyEmitter.cs
- XmlSerializerSection.cs
- DivideByZeroException.cs
- NamespaceList.cs
- SplineKeyFrames.cs
- ExecutionScope.cs
- UnsafeNetInfoNativeMethods.cs
- XmlWriterTraceListener.cs
- WebPartDisplayModeCancelEventArgs.cs