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