Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / TransactionBridge / Microsoft / Transactions / Wsat / Messaging / TwoPhaseCommitProxy.cs / 1 / TwoPhaseCommitProxy.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- // Define the interfaces and infrastructure needed to send 2PC messages using System; using System.ServiceModel.Channels; using System.ServiceModel; using System.Transactions; using Microsoft.Transactions.Wsat.Protocol; namespace Microsoft.Transactions.Wsat.Messaging { class TwoPhaseCommitCoordinatorProxy : DatagramProxy { public TwoPhaseCommitCoordinatorProxy(CoordinationService coordination, EndpointAddress to, EndpointAddress from) : base(coordination, to, from) { } public IAsyncResult BeginSendPrepared(AsyncCallback callback, object state) { Message message = new PreparedMessage(this.messageVersion, this.protocolVersion); return BeginSendMessage(message, callback, state); } public IAsyncResult BeginSendReadOnly(AsyncCallback callback, object state) { Message message = new ReadOnlyMessage(this.messageVersion, this.protocolVersion); return BeginSendMessage(message, callback, state); } public IAsyncResult BeginSendCommitted(AsyncCallback callback, object state) { Message message = new CommittedMessage(this.messageVersion, this.protocolVersion); return BeginSendMessage(message, callback, state); } public IAsyncResult BeginSendAborted(AsyncCallback callback, object state) { Message message = new AbortedMessage(this.messageVersion, this.protocolVersion); return BeginSendMessage(message, callback, state); } public IAsyncResult BeginSendRecoverMessage(AsyncCallback callback, object state) { Message message = NotificationMessage.CreateRecoverMessage(this.messageVersion, this.protocolVersion); return BeginSendMessage(message, callback, state); } } class TwoPhaseCommitParticipantProxy : DatagramProxy { public TwoPhaseCommitParticipantProxy (CoordinationService coordination, EndpointAddress to, EndpointAddress from) : base(coordination, to, from) { } public IAsyncResult BeginSendPrepare(AsyncCallback callback, object state) { Message message = new PrepareMessage(this.messageVersion, this.protocolVersion); return BeginSendMessage(message, callback, state); } public IAsyncResult BeginSendCommit(AsyncCallback callback, object state) { Message message = new CommitMessage(this.messageVersion, this.protocolVersion); return BeginSendMessage(message, callback, state); } public IAsyncResult BeginSendRollback(AsyncCallback callback, object state) { Message message = new RollbackMessage(this.messageVersion, this.protocolVersion); return BeginSendMessage(message, callback, state); } } } // 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
- DataGridViewColumn.cs
- ControlUtil.cs
- CapabilitiesUse.cs
- NumberSubstitution.cs
- TargetException.cs
- AttributeUsageAttribute.cs
- UniqueIdentifierService.cs
- SoapHeaders.cs
- RealizationDrawingContextWalker.cs
- AsymmetricSecurityBindingElement.cs
- PixelFormats.cs
- StrokeCollection.cs
- XmlNavigatorFilter.cs
- DriveInfo.cs
- DesignerListAdapter.cs
- ToolStripDropTargetManager.cs
- HttpProfileBase.cs
- DataServiceResponse.cs
- SHA512.cs
- HtmlElement.cs
- TextEditorContextMenu.cs
- Stroke.cs
- __Error.cs
- PrinterUnitConvert.cs
- ImageSourceTypeConverter.cs
- contentDescriptor.cs
- View.cs
- PersonalizableTypeEntry.cs
- TextFormatterImp.cs
- ScrollItemPattern.cs
- ConfigXmlText.cs
- SiteMapDataSource.cs
- QueryGeneratorBase.cs
- SqlDataSourceCommandEventArgs.cs
- BuildTopDownAttribute.cs
- Currency.cs
- WrappingXamlSchemaContext.cs
- ChtmlTextWriter.cs
- MonitorWrapper.cs
- Int32Storage.cs
- jithelpers.cs
- XmlRootAttribute.cs
- DataGridColumnDropSeparator.cs
- PropertyMetadata.cs
- XmlSerializerNamespaces.cs
- COM2PictureConverter.cs
- Normalization.cs
- TextContainerChangedEventArgs.cs
- SelectorItemAutomationPeer.cs
- CodePageEncoding.cs
- SqlUserDefinedAggregateAttribute.cs
- ViewStateAttachedPropertyFeature.cs
- SrgsElementFactory.cs
- baseaxisquery.cs
- UIPermission.cs
- CustomLineCap.cs
- SolidColorBrush.cs
- RoleGroup.cs
- X509ServiceCertificateAuthentication.cs
- StackBuilderSink.cs
- ISFTagAndGuidCache.cs
- DataServiceBuildProvider.cs
- CodeObject.cs
- MetadataArtifactLoaderCompositeFile.cs
- RecognitionEventArgs.cs
- CheckBoxPopupAdapter.cs
- PersonalizationState.cs
- ReferencedCollectionType.cs
- EmbossBitmapEffect.cs
- DashStyles.cs
- WindowInteractionStateTracker.cs
- WebPartTransformerCollection.cs
- Inflater.cs
- XhtmlBasicLabelAdapter.cs
- SerializationSectionGroup.cs
- ContractsBCL.cs
- WebDisplayNameAttribute.cs
- ComponentChangingEvent.cs
- validationstate.cs
- TextEditorMouse.cs
- IndexerNameAttribute.cs
- AddDataControlFieldDialog.cs
- recordstatescratchpad.cs
- Stroke2.cs
- PreviewKeyDownEventArgs.cs
- PersistenceMetadataNamespace.cs
- FormParameter.cs
- ListBindingConverter.cs
- AudioFormatConverter.cs
- TreeView.cs
- ObjectParameter.cs
- TextPenaltyModule.cs
- WinInetCache.cs
- EDesignUtil.cs
- EventSourceCreationData.cs
- FilterFactory.cs
- SecurityTokenAuthenticator.cs
- FragmentQuery.cs
- ControlUtil.cs
- ErrorsHelper.cs