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
- WithParamAction.cs
- HebrewNumber.cs
- InvalidPropValue.cs
- CollectionViewProxy.cs
- CompositeActivityTypeDescriptor.cs
- SspiNegotiationTokenProvider.cs
- KeyConverter.cs
- OrderedDictionary.cs
- LogReservationCollection.cs
- UniqueIdentifierService.cs
- KeyConverter.cs
- KeyboardDevice.cs
- MappingModelBuildProvider.cs
- HostingEnvironmentSection.cs
- ValidationHelper.cs
- IPGlobalProperties.cs
- ApplicationContext.cs
- DataGridViewRowPrePaintEventArgs.cs
- WebControlParameterProxy.cs
- HostingEnvironmentException.cs
- GetWinFXPath.cs
- OdbcError.cs
- DataGridBoolColumn.cs
- WindowsStatusBar.cs
- SchemaImporterExtensionsSection.cs
- ManagementExtension.cs
- MatchingStyle.cs
- EncoderReplacementFallback.cs
- SHA512.cs
- dataSvcMapFileLoader.cs
- AvtEvent.cs
- SplayTreeNode.cs
- MetadataSource.cs
- OneWayChannelFactory.cs
- HostProtectionException.cs
- ResourceAssociationType.cs
- CrossContextChannel.cs
- BezierSegment.cs
- DetailsViewPagerRow.cs
- WriteFileContext.cs
- DesignTimeParseData.cs
- LineGeometry.cs
- RtfFormatStack.cs
- SudsCommon.cs
- X509Certificate2Collection.cs
- HtmlControl.cs
- ProfileSettingsCollection.cs
- GridViewCellAutomationPeer.cs
- SizeValueSerializer.cs
- LogWriteRestartAreaAsyncResult.cs
- AuthorizationRuleCollection.cs
- WindowsComboBox.cs
- DrawListViewItemEventArgs.cs
- OSFeature.cs
- SchemaConstraints.cs
- SafePEFileHandle.cs
- SqlReferenceCollection.cs
- DecoderBestFitFallback.cs
- ReaderWriterLockWrapper.cs
- SecurityTokenSerializer.cs
- XamlFigureLengthSerializer.cs
- RecipientInfo.cs
- LogExtentCollection.cs
- SmiRecordBuffer.cs
- DiscoveryClientReferences.cs
- CompositionDesigner.cs
- ShapeTypeface.cs
- FormViewUpdatedEventArgs.cs
- WindowAutomationPeer.cs
- Attributes.cs
- SqlDataSourceSelectingEventArgs.cs
- ProgressBar.cs
- XPathNode.cs
- KoreanCalendar.cs
- XmlHierarchicalEnumerable.cs
- MimeMapping.cs
- BitmapCodecInfoInternal.cs
- XappLauncher.cs
- CommandEventArgs.cs
- DiscreteKeyFrames.cs
- ConnectionPointCookie.cs
- AutomationPatternInfo.cs
- Interop.cs
- WebPageTraceListener.cs
- XmlProcessingInstruction.cs
- ToolStripDropDownClosedEventArgs.cs
- EntityException.cs
- ChangePassword.cs
- MachineKeySection.cs
- ObjectToIdCache.cs
- HttpRequestWrapper.cs
- ObjectDataSourceEventArgs.cs
- XmlAtomicValue.cs
- DBConnectionString.cs
- AddingNewEventArgs.cs
- TextTreeTextBlock.cs
- ChtmlTextWriter.cs
- FormattedTextSymbols.cs
- DataObjectFieldAttribute.cs
- XPathDocumentIterator.cs