Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / TypedCompletedAsyncResult.cs / 1 / TypedCompletedAsyncResult.cs
//---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------------------- namespace System.ServiceModel { class TypedCompletedAsyncResult: TypedAsyncResult { public TypedCompletedAsyncResult(T data, AsyncCallback callback, object state) : base(callback, state) { Complete(data, true); } public new static T End(IAsyncResult result) { TypedCompletedAsyncResult completedResult = result as TypedCompletedAsyncResult ; if (completedResult == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SR.GetString(SR.InvalidAsyncResult), "result")); } return TypedAsyncResult .End(completedResult); } } class TypedCompletedAsyncResult : TypedAsyncResult { U parameter; public TypedCompletedAsyncResult(T data, U parameter, AsyncCallback callback, object state) : base(callback, state) { this.parameter = parameter; Complete(data, true); } public static T End(IAsyncResult result, out U parameter) { if (result == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("result")); } TypedCompletedAsyncResult completedResult = result as TypedCompletedAsyncResult ; if (completedResult == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SR.GetString(SR.InvalidAsyncResult), "result")); } parameter = completedResult.parameter; return TypedAsyncResult .End(completedResult); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ContentTextAutomationPeer.cs
- BamlRecordReader.cs
- Wildcard.cs
- UshortList2.cs
- ContentPlaceHolder.cs
- FileUtil.cs
- LongCountAggregationOperator.cs
- DetailsViewInsertEventArgs.cs
- XmlSerializerSection.cs
- ObjectStateEntry.cs
- NameService.cs
- Utils.cs
- XmlTextEncoder.cs
- SerializationInfoEnumerator.cs
- TlsSspiNegotiation.cs
- ExpressionLexer.cs
- UrlMappingsSection.cs
- FixedSOMFixedBlock.cs
- PropertyChange.cs
- IsolatedStorage.cs
- CharUnicodeInfo.cs
- ChangeTracker.cs
- BrushMappingModeValidation.cs
- Transform.cs
- FileReader.cs
- TextHidden.cs
- CookielessHelper.cs
- LocationReferenceEnvironment.cs
- CodeDelegateCreateExpression.cs
- HttpFileCollection.cs
- Logging.cs
- JavascriptCallbackMessageInspector.cs
- SchemaTableColumn.cs
- StreamWriter.cs
- CustomCategoryAttribute.cs
- Compiler.cs
- ProtocolsSection.cs
- MappingModelBuildProvider.cs
- NullableDecimalMinMaxAggregationOperator.cs
- AttributeSetAction.cs
- DesignerDataParameter.cs
- HelpKeywordAttribute.cs
- MobileCapabilities.cs
- XhtmlBasicTextBoxAdapter.cs
- DataGridViewTopRowAccessibleObject.cs
- FormsAuthenticationModule.cs
- DateTimeOffset.cs
- OdbcConnectionString.cs
- Popup.cs
- ExecutionEngineException.cs
- DropTarget.cs
- PersonalizationProviderHelper.cs
- SafeNativeMethods.cs
- InProcStateClientManager.cs
- SingleAnimationUsingKeyFrames.cs
- AccessDataSourceWizardForm.cs
- xml.cs
- ResXFileRef.cs
- TypeDelegator.cs
- SqlGatherProducedAliases.cs
- RegexInterpreter.cs
- Assert.cs
- LinqDataSourceView.cs
- DataRowChangeEvent.cs
- ReadOnlyNameValueCollection.cs
- ResourcePermissionBaseEntry.cs
- ConfigXmlSignificantWhitespace.cs
- ValidationRuleCollection.cs
- FunctionCommandText.cs
- Message.cs
- PenThreadPool.cs
- CompareInfo.cs
- Permission.cs
- LineUtil.cs
- XsltCompileContext.cs
- ResourceDescriptionAttribute.cs
- TabControlEvent.cs
- SynchronizedDispatch.cs
- TableLayoutStyleCollection.cs
- Base64WriteStateInfo.cs
- UnionCodeGroup.cs
- Border.cs
- CommonServiceBehaviorElement.cs
- CoreSwitches.cs
- XpsS0ValidatingLoader.cs
- ColorConvertedBitmap.cs
- NativeObjectSecurity.cs
- SqlGenericUtil.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- EntityStoreSchemaFilterEntry.cs
- QilIterator.cs
- StructuredTypeInfo.cs
- HyperLink.cs
- xsdvalidator.cs
- streamingZipPartStream.cs
- LayoutEvent.cs
- MonikerProxyAttribute.cs
- ResourcePermissionBase.cs
- DeadCharTextComposition.cs
- ForceCopyBuildProvider.cs