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
- OracleCommandBuilder.cs
- ScaleTransform3D.cs
- PrefixHandle.cs
- KnownIds.cs
- XsdDuration.cs
- BridgeDataRecord.cs
- Exceptions.cs
- SvcMapFileSerializer.cs
- Update.cs
- CharacterString.cs
- WebScriptEnablingBehavior.cs
- AuthenticationModuleElementCollection.cs
- ReturnValue.cs
- COM2IPerPropertyBrowsingHandler.cs
- XmlSerializableWriter.cs
- EditorZoneAutoFormat.cs
- CodeNamespaceCollection.cs
- Expander.cs
- AnnotationHelper.cs
- Triplet.cs
- GridSplitterAutomationPeer.cs
- _KerberosClient.cs
- SessionEndingEventArgs.cs
- XmlSchemaChoice.cs
- Constants.cs
- _StreamFramer.cs
- StoragePropertyMapping.cs
- DocumentPageView.cs
- RegistryPermission.cs
- HandleRef.cs
- QueryModel.cs
- XmlReflectionImporter.cs
- RegexTree.cs
- DoubleUtil.cs
- CachedTypeface.cs
- Helpers.cs
- SoapHeader.cs
- StreamAsIStream.cs
- QilValidationVisitor.cs
- ParallelTimeline.cs
- TextBreakpoint.cs
- DetailsView.cs
- FileSystemWatcher.cs
- CustomSignedXml.cs
- System.Data_BID.cs
- MarginsConverter.cs
- UIElementAutomationPeer.cs
- MetadataProperty.cs
- HttpModuleCollection.cs
- XmlSchemaAnnotation.cs
- TreeView.cs
- DocumentSchemaValidator.cs
- UseAttributeSetsAction.cs
- HttpApplicationFactory.cs
- BaseCodePageEncoding.cs
- ZipFileInfoCollection.cs
- URIFormatException.cs
- MultiDataTrigger.cs
- DesignerLinkAdapter.cs
- WindowHideOrCloseTracker.cs
- AutomationPropertyInfo.cs
- CheckBoxStandardAdapter.cs
- HttpRuntime.cs
- DatePicker.cs
- DetailsViewDeletedEventArgs.cs
- base64Transforms.cs
- AxHostDesigner.cs
- ImageKeyConverter.cs
- ExpressionReplacer.cs
- ReadOnlyHierarchicalDataSourceView.cs
- ViewManager.cs
- HtmlTextBoxAdapter.cs
- ResourceManager.cs
- NGCPageContentSerializerAsync.cs
- ChangeDirector.cs
- FormsAuthenticationTicket.cs
- ToolStripRenderEventArgs.cs
- NotSupportedException.cs
- CompressStream.cs
- AuthorizationRuleCollection.cs
- RoutingEndpointTrait.cs
- FlowLayoutPanel.cs
- DataServiceQueryOfT.cs
- ConnectionManagementElement.cs
- ByteKeyFrameCollection.cs
- DesignerView.xaml.cs
- basenumberconverter.cs
- wgx_sdk_version.cs
- CheckedPointers.cs
- Control.cs
- TimestampInformation.cs
- ProviderConnectionPoint.cs
- RangeContentEnumerator.cs
- TypeConvertions.cs
- SQLCharsStorage.cs
- ObjectStateManager.cs
- MatchingStyle.cs
- Storyboard.cs
- ImageKeyConverter.cs
- InternalsVisibleToAttribute.cs