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
- LinkedList.cs
- BehaviorEditorPart.cs
- PasswordBoxAutomationPeer.cs
- SvcFileManager.cs
- SelectorItemAutomationPeer.cs
- CodeSnippetTypeMember.cs
- IndependentAnimationStorage.cs
- TaskExtensions.cs
- RSACryptoServiceProvider.cs
- StoreItemCollection.cs
- ISFTagAndGuidCache.cs
- AddInEnvironment.cs
- IntSecurity.cs
- HttpFileCollection.cs
- AspCompat.cs
- ListViewUpdatedEventArgs.cs
- WebBrowserPermission.cs
- DataErrorValidationRule.cs
- X509CertificateCollection.cs
- ToolStripInSituService.cs
- ScriptingSectionGroup.cs
- ViewBox.cs
- SystemEvents.cs
- Transform3DCollection.cs
- IncrementalCompileAnalyzer.cs
- WmlTextBoxAdapter.cs
- altserialization.cs
- WindowsListViewItem.cs
- HashCodeCombiner.cs
- XmlSerializerOperationBehavior.cs
- PathSegment.cs
- PrePrepareMethodAttribute.cs
- DbTransaction.cs
- TextSelectionHighlightLayer.cs
- Executor.cs
- DropShadowBitmapEffect.cs
- ReflectionHelper.cs
- MouseActionValueSerializer.cs
- GridToolTip.cs
- EmptyEnumerator.cs
- WebPartEditorCancelVerb.cs
- JsonWriter.cs
- DoubleAnimationUsingPath.cs
- RequestBringIntoViewEventArgs.cs
- RepeaterItemEventArgs.cs
- TokenBasedSet.cs
- ResourceDescriptionAttribute.cs
- UTF8Encoding.cs
- CachedPathData.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- NameSpaceEvent.cs
- IntPtr.cs
- DataGridDesigner.cs
- HttpHandlerActionCollection.cs
- InputProcessorProfilesLoader.cs
- InvalidProgramException.cs
- TextEditorDragDrop.cs
- basenumberconverter.cs
- Rules.cs
- EntityKey.cs
- XmlParserContext.cs
- TypeDefinition.cs
- Throw.cs
- ColorConvertedBitmapExtension.cs
- OSFeature.cs
- SchemaType.cs
- DownloadProgressEventArgs.cs
- TypeConverter.cs
- MailAddress.cs
- XPathScanner.cs
- ComboBox.cs
- _ListenerAsyncResult.cs
- CalculatedColumn.cs
- EmptyElement.cs
- Html32TextWriter.cs
- SamlAction.cs
- Transform.cs
- CapabilitiesSection.cs
- EmbeddedObject.cs
- CompilerErrorCollection.cs
- SmiEventSink_DeferedProcessing.cs
- XmlValueConverter.cs
- ConsoleTraceListener.cs
- Point3DAnimationBase.cs
- LocalizationCodeDomSerializer.cs
- ControlBindingsConverter.cs
- MultiSelectRootGridEntry.cs
- ParameterExpression.cs
- MimePart.cs
- XmlSchemaNotation.cs
- TableCell.cs
- SQLMoney.cs
- TextServicesManager.cs
- ToolStripDropDownButton.cs
- WorkflowMarkupSerializer.cs
- ImageConverter.cs
- DataGridViewHeaderCell.cs
- PageThemeBuildProvider.cs
- WebSysDescriptionAttribute.cs
- RC2CryptoServiceProvider.cs