コード例 #1
0
        internal XmlDictionaryReader GetReader(int index, bool requiresEncryptedFormReader)
        {
            Fx.Assert(0 <= index && index < Count, "index out of range");
            if (!requiresEncryptedFormReader)
            {
                throw ExceptionHelper.PlatformNotSupported();
                //byte[] decryptedBuffer = elements[index].decryptedBuffer;
                //if (decryptedBuffer != null)
                //{
                //    return securityHeader.CreateDecryptedReader(decryptedBuffer);
                //}
            }
            XmlDictionaryReader securityHeaderReader = _securityHeader.CreateSecurityHeaderReader();

            securityHeaderReader.ReadStartElement();
            for (int i = 0; securityHeaderReader.IsStartElement() && i < index; i++)
            {
                securityHeaderReader.Skip();
            }
            return(securityHeaderReader);
        }