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
- ByteStack.cs
- ProvidersHelper.cs
- NumericUpDownAcceleration.cs
- XmlSchemaComplexContentRestriction.cs
- listitem.cs
- InfiniteIntConverter.cs
- MdiWindowListStrip.cs
- SqlTransaction.cs
- WindowsPrincipal.cs
- XmlQueryTypeFactory.cs
- TextPointer.cs
- ElementProxy.cs
- ToolBarButtonDesigner.cs
- MultipleFilterMatchesException.cs
- CertificateElement.cs
- Hyperlink.cs
- ListItem.cs
- SecurityTokenTypes.cs
- ConfigurationValidatorAttribute.cs
- HostAdapter.cs
- FormParameter.cs
- RayHitTestParameters.cs
- BrowserTree.cs
- WindowInteractionStateTracker.cs
- DataServiceContext.cs
- FixedPageProcessor.cs
- ListViewTableCell.cs
- DecoderExceptionFallback.cs
- XmlUtf8RawTextWriter.cs
- HttpDebugHandler.cs
- ConstraintManager.cs
- WebPartConnectionsCloseVerb.cs
- CompilationLock.cs
- KnownAssemblyEntry.cs
- ActivityExecutorSurrogate.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- NavigationPropertyEmitter.cs
- FormsAuthenticationEventArgs.cs
- WebContentFormatHelper.cs
- EntityReference.cs
- FixedSOMLineRanges.cs
- VarInfo.cs
- FullTextLine.cs
- ListView.cs
- FileController.cs
- RoutedUICommand.cs
- TextBoxAutoCompleteSourceConverter.cs
- ListViewDeleteEventArgs.cs
- BasePattern.cs
- TextRangeBase.cs
- ListViewDataItem.cs
- HtmlTableCell.cs
- ControlBuilderAttribute.cs
- SQLMoney.cs
- DbCommandDefinition.cs
- XmlSchemaFacet.cs
- TextSyndicationContent.cs
- XamlSerializer.cs
- HTTP_SERVICE_CONFIG_URLACL_PARAM.cs
- SoapIgnoreAttribute.cs
- HostingEnvironmentSection.cs
- ComboBox.cs
- SmiContext.cs
- UnaryNode.cs
- ReversePositionQuery.cs
- DefaultCommandExtensionCallback.cs
- X509InitiatorCertificateClientElement.cs
- ApplicationBuildProvider.cs
- HttpWebRequest.cs
- unsafenativemethodsother.cs
- AtomServiceDocumentSerializer.cs
- SiteMapPath.cs
- ListViewHitTestInfo.cs
- ExpressionPrefixAttribute.cs
- BrowserTree.cs
- HeaderCollection.cs
- StringDictionary.cs
- TextTreeNode.cs
- documentation.cs
- CfgSemanticTag.cs
- DataControlFieldCollection.cs
- LayoutUtils.cs
- IsolatedStorageException.cs
- RepeatInfo.cs
- Transform3DCollection.cs
- CroppedBitmap.cs
- GradientBrush.cs
- QilCloneVisitor.cs
- DependencySource.cs
- MediaElementAutomationPeer.cs
- Misc.cs
- DBSqlParserColumn.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- HMAC.cs
- TransformProviderWrapper.cs
- EarlyBoundInfo.cs
- InvalidPrinterException.cs
- Lease.cs
- BitmapEncoder.cs
- IndicCharClassifier.cs