1 override of Elements
System.IdentityModel (1)
System\IdentityModel\Protocols\WSTrust\WSTrust13ConstantsAdapter.cs (1)
63internal override WSTrustElementNames Elements
267 references to Elements
System.IdentityModel (267)
System\IdentityModel\Protocols\WSTrust\WSTrustSerializationHelper.cs (267)
43if (!reader.IsStartElement(trustConstants.Elements.RequestSecurityToken, trustConstants.NamespaceURI)) 45throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3032, reader.LocalName, reader.NamespaceURI, trustConstants.Elements.RequestSecurityToken, trustConstants.NamespaceURI))); 91if (reader.IsStartElement(trustConstants.Elements.TokenType, trustConstants.NamespaceURI)) 96throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.TokenType, trustConstants.NamespaceURI, rst.TokenType))); 102if (reader.IsStartElement(trustConstants.Elements.RequestType, trustConstants.NamespaceURI)) 114if (reader.IsStartElement(trustConstants.Elements.Issuer, trustConstants.NamespaceURI)) 120if (reader.IsStartElement(trustConstants.Elements.ProofEncryption, trustConstants.NamespaceURI)) 135if (reader.IsStartElement(trustConstants.Elements.Encryption, trustConstants.NamespaceURI)) 150if (reader.IsStartElement(trustConstants.Elements.DelegateTo, trustConstants.NamespaceURI)) 165if (reader.IsStartElement(trustConstants.Elements.Claims, trustConstants.NamespaceURI)) 184reader.ReadStartElement(trustConstants.Elements.Claims, trustConstants.NamespaceURI); 235if (reader.IsStartElement(trustConstants.Elements.Entropy, trustConstants.NamespaceURI)) 239reader.ReadStartElement(trustConstants.Elements.Entropy, trustConstants.NamespaceURI); 262if (reader.IsStartElement(trustConstants.Elements.BinaryExchange, trustConstants.NamespaceURI)) 268if (reader.IsStartElement(trustConstants.Elements.Lifetime, trustConstants.NamespaceURI)) 274if (reader.IsStartElement(trustConstants.Elements.RenewTarget, trustConstants.NamespaceURI)) 291if (reader.IsStartElement(trustConstants.Elements.OnBehalfOf, trustConstants.NamespaceURI)) 337if (reader.IsStartElement(trustConstants.Elements.KeyType, trustConstants.NamespaceURI)) 343if (reader.IsStartElement(trustConstants.Elements.KeySize, trustConstants.NamespaceURI)) 358if (reader.IsStartElement(trustConstants.Elements.UseKey, trustConstants.NamespaceURI)) 408if (reader.IsStartElement(trustConstants.Elements.SignWith, trustConstants.NamespaceURI)) 413throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.SignWith, trustConstants.NamespaceURI, rst.SignWith))); 419if (reader.IsStartElement(trustConstants.Elements.EncryptWith, trustConstants.NamespaceURI)) 424throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.EncryptWith, trustConstants.NamespaceURI, rst.EncryptWith))); 430if (reader.IsStartElement(trustConstants.Elements.ComputedKeyAlgorithm, trustConstants.NamespaceURI)) 436if (reader.IsStartElement(trustConstants.Elements.AuthenticationType, trustConstants.NamespaceURI)) 438rst.AuthenticationType = reader.ReadElementContentAsString(trustConstants.Elements.AuthenticationType, trustConstants.NamespaceURI); 441throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.AuthenticationType, trustConstants.NamespaceURI, rst.AuthenticationType))); 447if (reader.IsStartElement(trustConstants.Elements.EncryptionAlgorithm, trustConstants.NamespaceURI)) 449rst.EncryptionAlgorithm = reader.ReadElementContentAsString(trustConstants.Elements.EncryptionAlgorithm, trustConstants.NamespaceURI); 452throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.EncryptionAlgorithm, trustConstants.NamespaceURI, rst.EncryptionAlgorithm))); 458if (reader.IsStartElement(trustConstants.Elements.CanonicalizationAlgorithm, trustConstants.NamespaceURI)) 460rst.CanonicalizationAlgorithm = reader.ReadElementContentAsString(trustConstants.Elements.CanonicalizationAlgorithm, trustConstants.NamespaceURI); 463throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.CanonicalizationAlgorithm, trustConstants.NamespaceURI, rst.CanonicalizationAlgorithm))); 469if (reader.IsStartElement(trustConstants.Elements.SignatureAlgorithm, trustConstants.NamespaceURI)) 471rst.SignatureAlgorithm = reader.ReadElementContentAsString(trustConstants.Elements.SignatureAlgorithm, trustConstants.NamespaceURI); 474throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.SignatureAlgorithm, trustConstants.NamespaceURI, rst.SignatureAlgorithm))); 480if (reader.IsStartElement(trustConstants.Elements.Forwardable, trustConstants.NamespaceURI)) 486if (reader.IsStartElement(trustConstants.Elements.Delegatable, trustConstants.NamespaceURI)) 492if (reader.IsStartElement(trustConstants.Elements.AllowPostdating, trustConstants.NamespaceURI)) 506if (reader.IsStartElement(trustConstants.Elements.Renewing, trustConstants.NamespaceURI)) 535if (reader.IsStartElement(trustConstants.Elements.CancelTarget, trustConstants.NamespaceURI)) 550if (reader.IsStartElement(trustConstants.Elements.Participants, trustConstants.NamespaceURI)) 562if (reader.IsStartElement(trustConstants.Elements.Primary, trustConstants.NamespaceURI)) 564reader.ReadStartElement(trustConstants.Elements.Primary, trustConstants.NamespaceURI); 569while (reader.IsStartElement(trustConstants.Elements.Participant, trustConstants.NamespaceURI)) 571reader.ReadStartElement(trustConstants.Elements.Participant, trustConstants.NamespaceURI); 578throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3223, trustConstants.Elements.Participants, trustConstants.NamespaceURI, reader.LocalName, reader.NamespaceURI))); 681writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.RequestSecurityToken, trustConstants.NamespaceURI); 740requestSerializer.WriteXmlElement(writer, trustConstants.Elements.Claims, rst.Claims, rst, context); 745requestSerializer.WriteXmlElement(writer, trustConstants.Elements.ComputedKeyAlgorithm, rst.ComputedKeyAlgorithm, rst, context); 750requestSerializer.WriteXmlElement(writer, trustConstants.Elements.SignWith, rst.SignWith, rst, context); 755requestSerializer.WriteXmlElement(writer, trustConstants.Elements.EncryptWith, rst.EncryptWith, rst, context); 760requestSerializer.WriteXmlElement(writer, trustConstants.Elements.Entropy, rst.Entropy, rst, context); 765requestSerializer.WriteXmlElement(writer, trustConstants.Elements.KeySize, rst.KeySizeInBits, rst, context); 770requestSerializer.WriteXmlElement(writer, trustConstants.Elements.KeyType, rst.KeyType, rst, context); 775requestSerializer.WriteXmlElement(writer, trustConstants.Elements.Lifetime, rst.Lifetime, rst, context); 780requestSerializer.WriteXmlElement(writer, trustConstants.Elements.RenewTarget, rst.RenewTarget, rst, context); 785requestSerializer.WriteXmlElement(writer, trustConstants.Elements.OnBehalfOf, rst.OnBehalfOf, rst, context); 795requestSerializer.WriteXmlElement(writer, trustConstants.Elements.RequestType, rst.RequestType, rst, context); 800requestSerializer.WriteXmlElement(writer, trustConstants.Elements.TokenType, rst.TokenType, rst, context); 805requestSerializer.WriteXmlElement(writer, trustConstants.Elements.UseKey, rst.UseKey, rst, context); 810requestSerializer.WriteXmlElement(writer, trustConstants.Elements.AuthenticationType, rst.AuthenticationType, rst, context); 815requestSerializer.WriteXmlElement(writer, trustConstants.Elements.EncryptionAlgorithm, rst.EncryptionAlgorithm, rst, context); 820requestSerializer.WriteXmlElement(writer, trustConstants.Elements.CanonicalizationAlgorithm, rst.CanonicalizationAlgorithm, rst, context); 825requestSerializer.WriteXmlElement(writer, trustConstants.Elements.SignatureAlgorithm, rst.SignatureAlgorithm, rst, context); 830requestSerializer.WriteXmlElement(writer, trustConstants.Elements.BinaryExchange, rst.BinaryExchange, rst, context); 835requestSerializer.WriteXmlElement(writer, trustConstants.Elements.Issuer, rst.Issuer, rst, context); 840requestSerializer.WriteXmlElement(writer, trustConstants.Elements.ProofEncryption, rst.ProofEncryption, rst, context); 845requestSerializer.WriteXmlElement(writer, trustConstants.Elements.Encryption, rst.Encryption, rst, context); 850requestSerializer.WriteXmlElement(writer, trustConstants.Elements.DelegateTo, rst.DelegateTo, rst, context); 855requestSerializer.WriteXmlElement(writer, trustConstants.Elements.Forwardable, rst.Forwardable.Value, rst, context); 860requestSerializer.WriteXmlElement(writer, trustConstants.Elements.Delegatable, rst.Delegatable.Value, rst, context); 865requestSerializer.WriteXmlElement(writer, trustConstants.Elements.AllowPostdating, rst.AllowPostdating, rst, context); 870requestSerializer.WriteXmlElement(writer, trustConstants.Elements.Renewing, rst.Renewing, rst, context); 875requestSerializer.WriteXmlElement(writer, trustConstants.Elements.CancelTarget, rst.CancelTarget, rst, context); 880requestSerializer.WriteXmlElement(writer, trustConstants.Elements.Participants, rst.Participants, rst, context); 918if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.Claims)) 920writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.Claims, trustConstants.NamespaceURI); 924throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3136, trustConstants.Attributes.Dialect, trustConstants.Elements.Claims, trustConstants.NamespaceURI, claims.Dialect))); 960if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.ComputedKeyAlgorithm)) 962WriteComputedKeyAlgorithm(writer, trustConstants.Elements.ComputedKeyAlgorithm, (string)elementValue, trustConstants); 966if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.BinaryExchange)) 972if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.Issuer)) 978if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.SignWith)) 982throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.SignWith, trustConstants.NamespaceURI, (string)elementValue))); 985writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.SignWith, trustConstants.NamespaceURI, (string)elementValue); 989if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.EncryptWith)) 993throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.EncryptWith, trustConstants.NamespaceURI, (string)elementValue))); 996writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.EncryptWith, trustConstants.NamespaceURI, (string)elementValue); 1000if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.Entropy)) 1005writer.WriteStartElement(trustConstants.Elements.Entropy, trustConstants.NamespaceURI); 1013if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.KeySize)) 1015writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.KeySize, trustConstants.NamespaceURI, Convert.ToString(((int)elementValue), CultureInfo.InvariantCulture)); 1019if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.KeyType)) 1025if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.Lifetime)) 1032if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.RenewTarget)) 1037throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("elementValue", SR.GetString(SR.ID3222, trustConstants.Elements.RenewTarget, trustConstants.NamespaceURI, typeof(SecurityTokenElement), elementValue)); 1040writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.RenewTarget, trustConstants.NamespaceURI); 1055if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.OnBehalfOf)) 1057writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.OnBehalfOf, trustConstants.NamespaceURI); 1073if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.RequestType)) 1077throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.RequestType, trustConstants.NamespaceURI, (string)elementValue))); 1084if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.TokenType)) 1088throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.TokenType, trustConstants.NamespaceURI, ((string)elementValue)))); 1091writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.TokenType, trustConstants.NamespaceURI, ((string)elementValue)); 1095if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.UseKey)) 1109writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.UseKey, trustConstants.NamespaceURI); 1117if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.AuthenticationType)) 1121throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.AuthenticationType, trustConstants.NamespaceURI, ((string)elementValue)))); 1124writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.AuthenticationType, trustConstants.NamespaceURI, (string)elementValue); 1128if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.EncryptionAlgorithm)) 1132throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.EncryptionAlgorithm, trustConstants.NamespaceURI, ((string)elementValue)))); 1135writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.EncryptionAlgorithm, trustConstants.NamespaceURI, (string)elementValue); 1139if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.CanonicalizationAlgorithm)) 1143throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.CanonicalizationAlgorithm, trustConstants.NamespaceURI, ((string)elementValue)))); 1146writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.CanonicalizationAlgorithm, trustConstants.NamespaceURI, (string)elementValue); 1150if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.SignatureAlgorithm)) 1154throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.SignatureAlgorithm, trustConstants.NamespaceURI, ((string)elementValue)))); 1157writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.SignatureAlgorithm, trustConstants.NamespaceURI, (string)elementValue); 1161if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.Encryption)) 1165writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.Encryption, trustConstants.NamespaceURI); 1180if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.ProofEncryption)) 1184writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.ProofEncryption, trustConstants.NamespaceURI); 1199if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.DelegateTo)) 1203writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.DelegateTo, trustConstants.NamespaceURI); 1218if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.Forwardable)) 1222throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("elementValue", SR.GetString(SR.ID3222, trustConstants.Elements.Forwardable, trustConstants.NamespaceURI, typeof(bool), elementValue)); 1225writer.WriteStartElement(trustConstants.Elements.Forwardable, trustConstants.NamespaceURI); 1231if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.Delegatable)) 1235throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("elementValue", SR.GetString(SR.ID3222, trustConstants.Elements.Delegatable, trustConstants.NamespaceURI, typeof(bool), elementValue)); 1238writer.WriteStartElement(trustConstants.Elements.Delegatable, trustConstants.NamespaceURI); 1244if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.AllowPostdating)) 1246writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.AllowPostdating, trustConstants.NamespaceURI); 1251if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.Renewing)) 1256throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("elementValue", SR.GetString(SR.ID3222, trustConstants.Elements.Renewing, trustConstants.NamespaceURI, typeof(Renewing), elementValue)); 1259writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.Renewing, trustConstants.NamespaceURI); 1266if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.CancelTarget)) 1272throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("elementValue", SR.GetString(SR.ID3222, trustConstants.Elements.CancelTarget, trustConstants.NamespaceURI, typeof(SecurityTokenElement), elementValue)); 1275writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.CancelTarget, trustConstants.NamespaceURI); 1290if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.Participants)) 1296throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("elementValue", SR.GetString(SR.ID3222, trustConstants.Elements.Participant, trustConstants.NamespaceURI, typeof(Participants), elementValue)); 1299writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.Participants, trustConstants.NamespaceURI); 1303writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.Primary, trustConstants.NamespaceURI); 1310writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.Participant, trustConstants.NamespaceURI); 1375if (!reader.IsStartElement(trustConstants.Elements.RequestSecurityTokenResponse, trustConstants.NamespaceURI)) 1377throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3032, reader.LocalName, reader.NamespaceURI, trustConstants.Elements.RequestSecurityTokenResponse, trustConstants.NamespaceURI))); 1422if (reader.IsStartElement(trustConstants.Elements.Entropy, trustConstants.NamespaceURI)) 1426reader.ReadStartElement(trustConstants.Elements.Entropy, trustConstants.NamespaceURI); 1447if (reader.IsStartElement(trustConstants.Elements.KeySize, trustConstants.NamespaceURI)) 1462if (reader.IsStartElement(trustConstants.Elements.RequestType, trustConstants.NamespaceURI)) 1468if (reader.IsStartElement(trustConstants.Elements.Lifetime, trustConstants.NamespaceURI)) 1474if (reader.IsStartElement(trustConstants.Elements.RequestedSecurityToken, trustConstants.NamespaceURI)) 1495if (reader.IsStartElement(trustConstants.Elements.RequestedProofToken, trustConstants.NamespaceURI)) 1501if ((reader.LocalName == trustConstants.Elements.ComputedKey) && (reader.NamespaceURI == trustConstants.NamespaceURI)) 1528if (reader.IsStartElement(trustConstants.Elements.RequestedAttachedReference, trustConstants.NamespaceURI)) 1545if (reader.IsStartElement(trustConstants.Elements.RequestedUnattachedReference, trustConstants.NamespaceURI)) 1562if (reader.IsStartElement(trustConstants.Elements.TokenType, trustConstants.NamespaceURI)) 1567throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.TokenType, trustConstants.NamespaceURI, rstr.TokenType))); 1573if (reader.IsStartElement(trustConstants.Elements.KeyType, trustConstants.NamespaceURI)) 1579if (reader.IsStartElement(trustConstants.Elements.AuthenticationType, trustConstants.NamespaceURI)) 1581rstr.AuthenticationType = reader.ReadElementContentAsString(trustConstants.Elements.AuthenticationType, trustConstants.NamespaceURI); 1584throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.AuthenticationType, trustConstants.NamespaceURI, rstr.AuthenticationType))); 1590if (reader.IsStartElement(trustConstants.Elements.EncryptionAlgorithm, trustConstants.NamespaceURI)) 1592rstr.EncryptionAlgorithm = reader.ReadElementContentAsString(trustConstants.Elements.EncryptionAlgorithm, trustConstants.NamespaceURI); 1595throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.EncryptionAlgorithm, trustConstants.NamespaceURI, rstr.EncryptionAlgorithm))); 1601if (reader.IsStartElement(trustConstants.Elements.CanonicalizationAlgorithm, trustConstants.NamespaceURI)) 1603rstr.CanonicalizationAlgorithm = reader.ReadElementContentAsString(trustConstants.Elements.CanonicalizationAlgorithm, trustConstants.NamespaceURI); 1606throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.CanonicalizationAlgorithm, trustConstants.NamespaceURI, rstr.CanonicalizationAlgorithm))); 1612if (reader.IsStartElement(trustConstants.Elements.SignatureAlgorithm, trustConstants.NamespaceURI)) 1614rstr.SignatureAlgorithm = reader.ReadElementContentAsString(trustConstants.Elements.SignatureAlgorithm, trustConstants.NamespaceURI); 1617throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.SignatureAlgorithm, trustConstants.NamespaceURI, rstr.SignatureAlgorithm))); 1623if (reader.IsStartElement(trustConstants.Elements.SignWith, trustConstants.NamespaceURI)) 1628throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.SignWith, trustConstants.NamespaceURI, rstr.SignWith))); 1634if (reader.IsStartElement(trustConstants.Elements.EncryptWith, trustConstants.NamespaceURI)) 1639throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.EncryptWith, trustConstants.NamespaceURI, rstr.EncryptWith))); 1645if (reader.IsStartElement(trustConstants.Elements.BinaryExchange, trustConstants.NamespaceURI)) 1651if (reader.IsStartElement(trustConstants.Elements.Status, trustConstants.NamespaceURI)) 1657if (reader.IsStartElement(trustConstants.Elements.RequestedTokenCancelled, trustConstants.NamespaceURI)) 1697writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.RequestSecurityTokenResponse, trustConstants.NamespaceURI); 1747responseSerializer.WriteXmlElement(writer, trustConstants.Elements.Entropy, rstr.Entropy, rstr, context); 1752responseSerializer.WriteXmlElement(writer, trustConstants.Elements.KeySize, rstr.KeySizeInBits, rstr, context); 1757responseSerializer.WriteXmlElement(writer, trustConstants.Elements.Lifetime, rstr.Lifetime, rstr, context); 1767responseSerializer.WriteXmlElement(writer, trustConstants.Elements.RequestedSecurityToken, rstr.RequestedSecurityToken, rstr, context); 1772responseSerializer.WriteXmlElement(writer, trustConstants.Elements.RequestedProofToken, rstr.RequestedProofToken, rstr, context); 1777responseSerializer.WriteXmlElement(writer, trustConstants.Elements.RequestedAttachedReference, rstr.RequestedAttachedReference, rstr, context); 1782responseSerializer.WriteXmlElement(writer, trustConstants.Elements.RequestedUnattachedReference, rstr.RequestedUnattachedReference, rstr, context); 1787responseSerializer.WriteXmlElement(writer, trustConstants.Elements.SignWith, rstr.SignWith, rstr, context); 1792responseSerializer.WriteXmlElement(writer, trustConstants.Elements.EncryptWith, rstr.EncryptWith, rstr, context); 1797responseSerializer.WriteXmlElement(writer, trustConstants.Elements.TokenType, rstr.TokenType, rstr, context); 1802responseSerializer.WriteXmlElement(writer, trustConstants.Elements.RequestType, rstr.RequestType, rstr, context); 1807responseSerializer.WriteXmlElement(writer, trustConstants.Elements.KeyType, rstr.KeyType, rstr, context); 1812responseSerializer.WriteXmlElement(writer, trustConstants.Elements.AuthenticationType, rstr.AuthenticationType, rstr, context); 1817responseSerializer.WriteXmlElement(writer, trustConstants.Elements.EncryptionAlgorithm, rstr.EncryptionAlgorithm, rstr, context); 1822responseSerializer.WriteXmlElement(writer, trustConstants.Elements.CanonicalizationAlgorithm, rstr.CanonicalizationAlgorithm, rstr, context); 1827responseSerializer.WriteXmlElement(writer, trustConstants.Elements.SignatureAlgorithm, rstr.SignatureAlgorithm, rstr, context); 1832responseSerializer.WriteXmlElement(writer, trustConstants.Elements.BinaryExchange, rstr.BinaryExchange, rstr, context); 1837responseSerializer.WriteXmlElement(writer, trustConstants.Elements.Status, rstr.Status, rstr, context); 1842responseSerializer.WriteXmlElement(writer, trustConstants.Elements.RequestedTokenCancelled, rstr.RequestedTokenCancelled, rstr, context); 1868if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.Entropy)) 1873writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.Entropy, trustConstants.NamespaceURI); 1881if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.KeySize)) 1883writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.KeySize, trustConstants.NamespaceURI, Convert.ToString((int)elementValue, CultureInfo.InvariantCulture)); 1887if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.Lifetime)) 1901if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.RequestedSecurityToken)) 1905writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.RequestedSecurityToken, trustConstants.NamespaceURI); 1920if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.RequestedProofToken)) 1928writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.RequestedProofToken, trustConstants.NamespaceURI); 1932WriteComputedKeyAlgorithm(writer, trustConstants.Elements.ComputedKey, proofToken.ComputedKeyAlgorithm, trustConstants); 1944if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.RequestedAttachedReference)) 1946writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.RequestedAttachedReference, trustConstants.NamespaceURI); 1952if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.RequestedUnattachedReference)) 1954writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.RequestedUnattachedReference, trustConstants.NamespaceURI); 1960if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.TokenType)) 1964throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.TokenType, trustConstants.NamespaceURI, (string)elementValue))); 1967writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.TokenType, trustConstants.NamespaceURI, (string)elementValue); 1971if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.RequestType)) 1975throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.RequestType, trustConstants.NamespaceURI, (string)elementValue))); 1982if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.KeyType)) 1988if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.AuthenticationType)) 1992throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.AuthenticationType, trustConstants.NamespaceURI, (string)elementValue))); 1995writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.AuthenticationType, trustConstants.NamespaceURI, (string)elementValue); 1999if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.EncryptionAlgorithm)) 2003throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.EncryptionAlgorithm, trustConstants.NamespaceURI, (string)elementValue))); 2006writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.EncryptionAlgorithm, trustConstants.NamespaceURI, (string)elementValue); 2010if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.CanonicalizationAlgorithm)) 2014throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.CanonicalizationAlgorithm, trustConstants.NamespaceURI, (string)elementValue))); 2017writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.CanonicalizationAlgorithm, trustConstants.NamespaceURI, (string)elementValue); 2021if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.SignatureAlgorithm)) 2025throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.SignatureAlgorithm, trustConstants.NamespaceURI, (string)elementValue))); 2028writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.SignatureAlgorithm, trustConstants.NamespaceURI, (string)elementValue); 2032if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.SignWith)) 2036throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.SignWith, trustConstants.NamespaceURI, (string)elementValue))); 2039writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.SignWith, trustConstants.NamespaceURI, (string)elementValue); 2043if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.EncryptWith)) 2047throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.EncryptWith, trustConstants.NamespaceURI, (string)elementValue))); 2050writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.EncryptWith, trustConstants.NamespaceURI, (string)elementValue); 2054if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.BinaryExchange)) 2060if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.Status)) 2066if (StringComparer.Ordinal.Equals(elementName, trustConstants.Elements.RequestedTokenCancelled)) 2068writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.RequestedTokenCancelled, trustConstants.NamespaceURI); 2097throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.ComputedKeyAlgorithm, trustConstants.NamespaceURI, computedKeyAlgorithm))); 2160if (!reader.IsStartElement(trustConstants.Elements.Status, trustConstants.NamespaceURI)) 2163SR.GetString(SR.ID3032, reader.LocalName, reader.NamespaceURI, trustConstants.Elements.Status, trustConstants.NamespaceURI))); 2170if (!reader.IsStartElement(trustConstants.Elements.Code, trustConstants.NamespaceURI)) 2173SR.GetString(SR.ID3032, reader.LocalName, reader.NamespaceURI, trustConstants.Elements.Code, trustConstants.NamespaceURI))); 2176code = reader.ReadElementContentAsString(trustConstants.Elements.Code, trustConstants.NamespaceURI); 2177if (reader.IsStartElement(trustConstants.Elements.Reason, trustConstants.NamespaceURI)) 2179reason = reader.ReadElementContentAsString(trustConstants.Elements.Reason, trustConstants.NamespaceURI); 2198if (!reader.IsStartElement(trustConstants.Elements.BinaryExchange, trustConstants.NamespaceURI)) 2201SR.GetString(SR.ID3032, reader.LocalName, reader.NamespaceURI, trustConstants.Elements.BinaryExchange, trustConstants.NamespaceURI))); 2298writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.BinaryExchange, trustConstants.NamespaceURI); 2327writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.Status, trustConstants.NamespaceURI); 2328writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.Code, trustConstants.NamespaceURI); 2333writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.Reason, trustConstants.NamespaceURI); 2358if (reader.IsStartElement(trustConstants.Elements.BinarySecret, trustConstants.NamespaceURI)) 2446throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.RequestType, trustConstants.NamespaceURI, requestType))); 2510writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.RequestType, trustConstants.NamespaceURI, requestTypeAsStr); 2577writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.Lifetime, trustConstants.NamespaceURI); 2604if (!reader.IsStartElement(trustConstants.Elements.Issuer, trustConstants.NamespaceURI)) 2607SR.GetString(SR.ID3032, reader.LocalName, reader.NamespaceURI, trustConstants.Elements.Issuer, trustConstants.NamespaceURI))); 2643writer.WriteStartElement(trustConstants.Prefix, trustConstants.Elements.Issuer, trustConstants.NamespaceURI); 2713throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.KeyType, trustConstants.NamespaceURI, incomingKeyType))); 2753throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WSTrustSerializationException(SR.GetString(SR.ID3135, trustConstants.Elements.KeyType, trustConstants.NamespaceURI, keyType))); 2775writer.WriteElementString(trustConstants.Prefix, trustConstants.Elements.KeyType, trustConstants.NamespaceURI, keyTypeAsStr); 2849string base64KeyBytes = reader.ReadElementContentAsString(trustConstants.Elements.BinarySecret, trustConstants.NamespaceURI); 2877writer.WriteStartElement(trustConstants.Elements.BinarySecret, trustConstants.NamespaceURI);