protected override SecurityKeyIdentifier ReadKeyIdentifierCore(XmlReader reader)
        {
            XmlDictionaryReader reader2 = XmlDictionaryReader.CreateDictionaryReader(reader);

            for (int i = 0; i < this.keyIdentifierEntries.Count; i++)
            {
                KeyIdentifierEntry entry = this.keyIdentifierEntries[i];
                if (entry.CanReadKeyIdentifierCore(reader2))
                {
                    try
                    {
                        return(entry.ReadKeyIdentifierCore(reader2));
                    }
                    catch (Exception exception)
                    {
                        if (!this.ShouldWrapException(exception))
                        {
                            throw;
                        }
                        throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.ServiceModel.SR.GetString("ErrorDeserializingKeyIdentifier"), exception));
                    }
                }
            }
            throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.ServiceModel.SR.GetString("CannotReadKeyIdentifier", new object[] { reader.LocalName, reader.NamespaceURI })));
        }
Пример #2
0
        protected override bool CanReadKeyIdentifierCore(XmlReader reader)
        {
            XmlDictionaryReader localReader = XmlDictionaryReader.CreateDictionaryReader(reader);

            for (int i = 0; i < _keyIdentifierEntries.Count; i++)
            {
                KeyIdentifierEntry keyIdentifierEntry = _keyIdentifierEntries[i];
                if (keyIdentifierEntry.CanReadKeyIdentifierCore(localReader))
                {
                    return(true);
                }
            }
            return(false);
        }
        protected override bool CanReadKeyIdentifierCore(XmlReader reader)
        {
            XmlDictionaryReader reader2 = XmlDictionaryReader.CreateDictionaryReader(reader);

            for (int i = 0; i < this.keyIdentifierEntries.Count; i++)
            {
                KeyIdentifierEntry entry = this.keyIdentifierEntries[i];
                if (entry.CanReadKeyIdentifierCore(reader2))
                {
                    return(true);
                }
            }
            return(false);
        }