System.Xml.XPath.XPathNavigatorReader.ReadElementContentAsBinHex C# (CSharp) Méthode

ReadElementContentAsBinHex() public méthode

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

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

            // turn off InReadBinary state in order to have a normal Read() behavior when called from readBinaryHelper
            state = savedState;

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

            // turn on InReadBinary state again and return
            savedState = state;
            state = State.InReadBinary;
            return readCount;
        }