protected override SecurityKeyIdentifier ReadKeyIdentifierCore(XmlReader reader) { XmlDictionaryReader localReader = XmlDictionaryReader.CreateDictionaryReader(reader); localReader.ReadStartElement(XD.XmlSignatureDictionary.KeyInfo, XD.XmlSignatureDictionary.Namespace); SecurityKeyIdentifier keyIdentifier = new SecurityKeyIdentifier(); while (localReader.IsStartElement()) { SecurityKeyIdentifierClause clause = this.InnerSecurityTokenSerializer.ReadKeyIdentifierClause(localReader); if (clause == null) { localReader.Skip(); } else { keyIdentifier.Add(clause); } } if (keyIdentifier.Count == 0) { throw /*System.ServiceModel.*/ DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(string.Format(SR_IdentityModel.ErrorDeserializingKeyIdentifierClause))); } localReader.ReadEndElement(); return(keyIdentifier); }
public override SecurityKeyIdentifier ReadKeyIdentifierCore(XmlDictionaryReader reader) { reader.ReadStartElement(LocalName, NamespaceUri); SecurityKeyIdentifier keyIdentifier = new SecurityKeyIdentifier(); while (reader.IsStartElement()) { SecurityKeyIdentifierClause clause = this.securityTokenSerializer.ReadKeyIdentifierClause(reader); if (clause == null) { reader.Skip(); } else { keyIdentifier.Add(clause); } } if (keyIdentifier.Count == 0) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(SR.GetString(SR.ErrorDeserializingKeyIdentifierClause))); } reader.ReadEndElement(); return(keyIdentifier); }