System.Xml.XmlNodeReader.ReadContentAsBase64 C# (CSharp) Méthode

ReadContentAsBase64() public méthode

public ReadContentAsBase64 ( byte buffer, int index, int count ) : int
buffer byte
index int
count int
Résultat int
        public override int ReadContentAsBase64( byte[] buffer, int index, int count ) {
            if ( readState != ReadState.Interactive ) {
                return 0;
            }

            // init ReadContentAsBinaryHelper when called first time
            if ( !bInReadBinary ) {
                readBinaryHelper = ReadContentAsBinaryHelper.CreateOrReset( readBinaryHelper, this );
            }

            // turn off bInReadBinary in order to have a normal Read() behavior when called from readBinaryHelper
            bInReadBinary = false;

            // call to the helper
            int readCount = readBinaryHelper.ReadContentAsBase64( buffer, index, count );

            // turn on bInReadBinary in again and return
            bInReadBinary = true;
            return readCount;
        }