Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / TransactionBridge / Microsoft / Transactions / Wsat / Messaging / AsyncCallback.cs / 1 / AsyncCallback.cs
//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
// Define asynchronous callback classes used when sending async messages
using System;
using System.ServiceModel.Channels;
using System.Diagnostics;
using System.ServiceModel;
using System.Transactions;
using System.Xml;
namespace Microsoft.Transactions.Wsat.Messaging
{
// This class represents the completion of a request/reply message dispatched by ServiceModel
class RequestAsyncResult : AsyncResult
{
Message reply;
MessageVersion messageVersion;
UniqueId messageID;
public RequestAsyncResult (Message message, AsyncCallback callback, object state) : base (callback, state)
{
this.messageVersion = message.Version;
this.messageID = message.Headers.MessageId;
}
public MessageVersion MessageVersion
{
get { return this.messageVersion; }
}
public UniqueId MessageId
{
get { return this.messageID; }
}
public Message Reply
{
get { return this.reply; }
}
public void Finished (Message reply)
{
this.reply = reply;
this.Complete (false);
}
public void Finished (Exception exception)
{
this.Complete (false, exception);
}
public void End()
{
AsyncResult.End(this);
}
}
// This class exists to provide the illusion that a BeginSend operation only throws on End
class SendMessageFailureAsyncResult : AsyncResult
{
public SendMessageFailureAsyncResult (Exception e, AsyncCallback callback, object state) : base (callback, state)
{
base.Complete (true, e);
}
public void End()
{
AsyncResult.End(this);
}
}
}
// 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
- DeclarativeConditionsCollection.cs
- QilParameter.cs
- MaskedTextBox.cs
- DataViewManager.cs
- GPStream.cs
- DbDataAdapter.cs
- _emptywebproxy.cs
- JsonObjectDataContract.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- ToolStripButton.cs
- Utils.cs
- CombinedGeometry.cs
- HashMembershipCondition.cs
- ProfileParameter.cs
- ConfigurationSection.cs
- PackagePart.cs
- DiscoveryDefaults.cs
- CheckBoxList.cs
- PagesSection.cs
- BaseDataList.cs
- ParsedAttributeCollection.cs
- MouseWheelEventArgs.cs
- TimelineCollection.cs
- TemplateBindingExtension.cs
- FormViewInsertedEventArgs.cs
- GenericEnumConverter.cs
- DrawingCollection.cs
- FormParameter.cs
- ClassDataContract.cs
- ExtractCollection.cs
- IDQuery.cs
- CfgArc.cs
- Expressions.cs
- Shape.cs
- ErrorEventArgs.cs
- __Filters.cs
- ProfileParameter.cs
- Point.cs
- AuditLog.cs
- MemberAccessException.cs
- RawStylusInputCustomData.cs
- SafeLibraryHandle.cs
- NetworkInformationPermission.cs
- PropertyMapper.cs
- WebCategoryAttribute.cs
- FlowThrottle.cs
- RegistrySecurity.cs
- Odbc32.cs
- ClientUtils.cs
- ScriptResourceHandler.cs
- ProcessInputEventArgs.cs
- BeginEvent.cs
- DataControlFieldCell.cs
- EntityDesignerDataSourceView.cs
- FileDialog.cs
- EmptyStringExpandableObjectConverter.cs
- DateTimeParse.cs
- FormViewRow.cs
- SystemWebSectionGroup.cs
- BuildManager.cs
- CharacterString.cs
- DataGridViewRowCollection.cs
- DataContractJsonSerializerOperationBehavior.cs
- CharacterBuffer.cs
- BoundColumn.cs
- CodeTypeDelegate.cs
- MetadataSource.cs
- EdmItemError.cs
- InfoCardProofToken.cs
- DocumentOrderQuery.cs
- WebPartVerbCollection.cs
- ButtonField.cs
- HttpCachePolicy.cs
- GreaterThan.cs
- TypeLoadException.cs
- ExpandableObjectConverter.cs
- ProfileGroupSettingsCollection.cs
- DockingAttribute.cs
- Tag.cs
- Int32CAMarshaler.cs
- BStrWrapper.cs
- UniqueConstraint.cs
- SubqueryRules.cs
- TimeSpanSecondsConverter.cs
- VarRemapper.cs
- ParserStreamGeometryContext.cs
- RewritingValidator.cs
- IconHelper.cs
- RecognizedWordUnit.cs
- ComponentEditorPage.cs
- TemplateKey.cs
- TraceSwitch.cs
- EventHandlersStore.cs
- TextServicesProperty.cs
- RuleSettings.cs
- SapiRecognizer.cs
- SecurityKeyIdentifier.cs
- EventHandlerService.cs
- ArglessEventHandlerProxy.cs
- StaticResourceExtension.cs