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
- Crypto.cs
- NativeMethods.cs
- XomlDesignerLoader.cs
- EntityDataSourceState.cs
- CatalogPartChrome.cs
- Char.cs
- XamlReaderHelper.cs
- WindowsGraphics.cs
- MenuStrip.cs
- AttributeEmitter.cs
- AttachedAnnotation.cs
- Size.cs
- Literal.cs
- CheckBoxBaseAdapter.cs
- RealProxy.cs
- SqlUtils.cs
- StrongBox.cs
- DiagnosticsConfiguration.cs
- DBConnection.cs
- StyleSheet.cs
- webproxy.cs
- LinkClickEvent.cs
- WebControlsSection.cs
- ObjectViewQueryResultData.cs
- Evidence.cs
- Translator.cs
- CurrencyManager.cs
- DynamicEntity.cs
- UnsafeCollabNativeMethods.cs
- AmbientLight.cs
- TableColumn.cs
- ClientScriptManager.cs
- Compiler.cs
- ContextMenuStripActionList.cs
- NativeMethods.cs
- StorageMappingItemCollection.cs
- TabItem.cs
- StrokeNodeData.cs
- AutomationPeer.cs
- DPTypeDescriptorContext.cs
- HostedTcpTransportManager.cs
- StrongNameKeyPair.cs
- MatchAttribute.cs
- DescendantQuery.cs
- ConfigurationValidatorAttribute.cs
- PanelContainerDesigner.cs
- Decoder.cs
- HostExecutionContextManager.cs
- CompilerTypeWithParams.cs
- VBCodeProvider.cs
- PolyLineSegment.cs
- GeneralTransformGroup.cs
- Roles.cs
- CompilerInfo.cs
- Registry.cs
- DeploymentSectionCache.cs
- SafeNativeMethods.cs
- MultilineStringConverter.cs
- ContractMapping.cs
- LiteralTextParser.cs
- ComponentGlyph.cs
- ExpressionsCollectionEditor.cs
- WebPartDisplayModeCancelEventArgs.cs
- ProxyElement.cs
- GlyphRunDrawing.cs
- Directory.cs
- MemberExpressionHelper.cs
- PropertyState.cs
- IsolatedStorageFile.cs
- ContainerControl.cs
- DataServiceClientException.cs
- TreeNodeSelectionProcessor.cs
- IntegerCollectionEditor.cs
- StylusEditingBehavior.cs
- LazyInitializer.cs
- SessionEndingEventArgs.cs
- CompiledXpathExpr.cs
- Assert.cs
- AuthenticationSection.cs
- ClientBuildManager.cs
- ProxyWebPartManager.cs
- PerformanceCounterPermissionAttribute.cs
- WaitHandle.cs
- FaultHandlingFilter.cs
- SamlConditions.cs
- IssuedTokenParametersElement.cs
- SqlTypeSystemProvider.cs
- StatusBarItemAutomationPeer.cs
- IisNotInstalledException.cs
- PlainXmlSerializer.cs
- BevelBitmapEffect.cs
- HttpCookie.cs
- EventListener.cs
- MILUtilities.cs
- XPathArrayIterator.cs
- AuthorizationRuleCollection.cs
- WindowsGraphicsWrapper.cs
- TextServicesCompartmentEventSink.cs
- Int32Converter.cs
- NotSupportedException.cs