public CoordinationContext(Microsoft.Transactions.Wsat.Protocol.ProtocolVersion protocolVersion)
 {
     this.coordinationStrings = CoordinationStrings.Version(protocolVersion);
     this.coordinationXmlDictionaryStrings = CoordinationXmlDictionaryStrings.Version(protocolVersion);
     this.atomicTransactionXmlDictionaryStrings = AtomicTransactionXmlDictionaryStrings.Version(protocolVersion);
     this.protocolVersion = protocolVersion;
 }
 public CoordinationContext(Microsoft.Transactions.Wsat.Protocol.ProtocolVersion protocolVersion)
 {
     this.coordinationStrings = CoordinationStrings.Version(protocolVersion);
     this.coordinationXmlDictionaryStrings      = CoordinationXmlDictionaryStrings.Version(protocolVersion);
     this.atomicTransactionXmlDictionaryStrings = AtomicTransactionXmlDictionaryStrings.Version(protocolVersion);
     this.protocolVersion = protocolVersion;
 }
 public RegisterResponse(Microsoft.Transactions.Wsat.Protocol.ProtocolVersion protocolVersion)
 {
     this.CoordinatorProtocolService       = null;
     this.protocolVersion                  = protocolVersion;
     this.coordinationStrings              = CoordinationStrings.Version(protocolVersion);
     this.coordinationXmlDictionaryStrings = CoordinationXmlDictionaryStrings.Version(protocolVersion);
 }
 public RegisterResponse(Microsoft.Transactions.Wsat.Protocol.ProtocolVersion protocolVersion)
 {
     this.CoordinatorProtocolService = null;
     this.protocolVersion = protocolVersion;
     this.coordinationStrings = CoordinationStrings.Version(protocolVersion);
     this.coordinationXmlDictionaryStrings = CoordinationXmlDictionaryStrings.Version(protocolVersion);
 }
 public CreateCoordinationContextResponse(Microsoft.Transactions.Wsat.Protocol.ProtocolVersion protocolVersion)
 {
     this.CoordinationContext = null;
     this.IssuedToken = null;
     this.protocolVersion = protocolVersion;
     this.coordinationStrings = CoordinationStrings.Version(protocolVersion);
     this.coordinationXmlDictionaryStrings = CoordinationXmlDictionaryStrings.Version(protocolVersion);
 }
 public CreateCoordinationContextResponse(Microsoft.Transactions.Wsat.Protocol.ProtocolVersion protocolVersion)
 {
     this.CoordinationContext = null;
     this.IssuedToken         = null;
     this.protocolVersion     = protocolVersion;
     this.coordinationStrings = CoordinationStrings.Version(protocolVersion);
     this.coordinationXmlDictionaryStrings = CoordinationXmlDictionaryStrings.Version(protocolVersion);
 }
Пример #7
0
 public Register(Microsoft.Transactions.Wsat.Protocol.ProtocolVersion protocolVersion)
 {
     this.Protocol = ControlProtocol.None;
     this.ParticipantProtocolService = null;
     this.Loopback            = Guid.Empty;
     this.SupportingToken     = null;
     this.protocolVersion     = protocolVersion;
     this.coordinationStrings = CoordinationStrings.Version(protocolVersion);
     this.coordinationXmlDictionaryStrings = CoordinationXmlDictionaryStrings.Version(protocolVersion);
 }
 public Register(Microsoft.Transactions.Wsat.Protocol.ProtocolVersion protocolVersion)
 {
     this.Protocol = ControlProtocol.None;
     this.ParticipantProtocolService = null;
     this.Loopback = Guid.Empty;
     this.SupportingToken = null;
     this.protocolVersion = protocolVersion;
     this.coordinationStrings = CoordinationStrings.Version(protocolVersion);
     this.coordinationXmlDictionaryStrings = CoordinationXmlDictionaryStrings.Version(protocolVersion);
 }
 public CreateCoordinationContext(Microsoft.Transactions.Wsat.Protocol.ProtocolVersion protocolVersion)
 {
     this.expiration      = 0;
     this.expiresPresent  = false;
     this.CurrentContext  = null;
     this.IssuedToken     = null;
     this.IsolationLevel  = System.Transactions.IsolationLevel.Serializable;
     this.protocolVersion = protocolVersion;
     this.coordinationXmlDictionaryStrings      = CoordinationXmlDictionaryStrings.Version(protocolVersion);
     this.atomicTransactionXmlDictionaryStrings = AtomicTransactionXmlDictionaryStrings.Version(protocolVersion);
     this.atomicTransactionStrings = AtomicTransactionStrings.Version(protocolVersion);
     this.coordinationStrings      = CoordinationStrings.Version(protocolVersion);
 }
 public CreateCoordinationContext(Microsoft.Transactions.Wsat.Protocol.ProtocolVersion protocolVersion)
 {
     this.expiration = 0;
     this.expiresPresent = false;
     this.CurrentContext = null;
     this.IssuedToken = null;
     this.IsolationLevel = System.Transactions.IsolationLevel.Serializable;
     this.protocolVersion = protocolVersion;
     this.coordinationXmlDictionaryStrings = CoordinationXmlDictionaryStrings.Version(protocolVersion);
     this.atomicTransactionXmlDictionaryStrings = AtomicTransactionXmlDictionaryStrings.Version(protocolVersion);
     this.atomicTransactionStrings = AtomicTransactionStrings.Version(protocolVersion);
     this.coordinationStrings = CoordinationStrings.Version(protocolVersion);
 }
 private static void ReadFrom(CoordinationContext that, XmlDictionaryReader reader, XmlDictionaryString localName, XmlDictionaryString ns, Microsoft.Transactions.Wsat.Protocol.ProtocolVersion protocolVersion)
 {
     try
     {
         Uri uri;
         CoordinationXmlDictionaryStrings strings  = CoordinationXmlDictionaryStrings.Version(protocolVersion);
         AtomicTransactionStrings         strings2 = AtomicTransactionStrings.Version(protocolVersion);
         reader.ReadFullStartElement(localName, strings.Namespace);
         reader.MoveToStartElement(strings.Identifier, strings.Namespace);
         that.unknownIdentifierAttributes = ReadOtherAttributes(reader, strings.Namespace);
         that.contextId = reader.ReadElementContentAsString().Trim();
         if ((that.contextId.Length == 0) || (that.contextId.Length > 0x100))
         {
             throw Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidCoordinationContextException(Microsoft.Transactions.SR.GetString("InvalidCoordinationContext")));
         }
         if (!Uri.TryCreate(that.contextId, UriKind.Absolute, out uri))
         {
             throw Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidCoordinationContextException(Microsoft.Transactions.SR.GetString("InvalidCoordinationContext")));
         }
         if (reader.IsStartElement(strings.Expires, strings.Namespace))
         {
             that.unknownExpiresAttributes = ReadOtherAttributes(reader, strings.Namespace);
             int num = reader.ReadElementContentAsInt();
             if (num < 0)
             {
                 throw Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidCoordinationContextException(Microsoft.Transactions.SR.GetString("InvalidCoordinationContext")));
             }
             that.expiration     = (uint)num;
             that.expiresPresent = true;
         }
         reader.MoveToStartElement(strings.CoordinationType, strings.Namespace);
         if (reader.ReadElementContentAsString().Trim() != strings2.Namespace)
         {
             throw Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidCoordinationContextException(Microsoft.Transactions.SR.GetString("InvalidCoordinationContext")));
         }
         that.registrationRef = EndpointAddress.ReadFrom(MessagingVersionHelper.AddressingVersion(protocolVersion), reader, strings.RegistrationService, strings.Namespace);
         if (reader.IsStartElement(XD.DotNetAtomicTransactionExternalDictionary.IsolationLevel, XD.DotNetAtomicTransactionExternalDictionary.Namespace))
         {
             that.isoLevel = (System.Transactions.IsolationLevel)reader.ReadElementContentAsInt();
             if (((that.IsolationLevel < System.Transactions.IsolationLevel.Serializable) || (that.IsolationLevel > System.Transactions.IsolationLevel.Unspecified)) || (that.IsolationLevel == System.Transactions.IsolationLevel.Snapshot))
             {
                 throw Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidCoordinationContextException(Microsoft.Transactions.SR.GetString("InvalidCoordinationContext")));
             }
         }
         if (reader.IsStartElement(XD.DotNetAtomicTransactionExternalDictionary.IsolationFlags, XD.DotNetAtomicTransactionExternalDictionary.Namespace))
         {
             that.isoFlags = (System.ServiceModel.Transactions.IsolationFlags)reader.ReadElementContentAsInt();
         }
         if (reader.IsStartElement(XD.DotNetAtomicTransactionExternalDictionary.Description, XD.DotNetAtomicTransactionExternalDictionary.Namespace))
         {
             that.description = reader.ReadElementContentAsString().Trim();
         }
         if (reader.IsStartElement(XD.DotNetAtomicTransactionExternalDictionary.LocalTransactionId, XD.DotNetAtomicTransactionExternalDictionary.Namespace))
         {
             that.localTxId = reader.ReadElementContentAsGuid();
         }
         if (OleTxTransactionHeader.IsStartPropagationTokenElement(reader))
         {
             that.propToken = OleTxTransactionHeader.ReadPropagationTokenElement(reader);
         }
         if (reader.IsStartElement())
         {
             XmlDocument document = new XmlDocument();
             that.unknownData = new List <System.Xml.XmlNode>(5);
             while (reader.IsStartElement())
             {
                 System.Xml.XmlNode item = document.ReadNode(reader);
                 that.unknownData.Add(item);
             }
         }
         reader.ReadEndElement();
     }
     catch (XmlException exception)
     {
         throw Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidCoordinationContextException(Microsoft.Transactions.SR.GetString("InvalidCoordinationContext"), exception));
     }
 }