Lawo.EmberPlusSharp.Ember.EmberReader.AssertCanReadContents C# (CSharp) Méthode

AssertCanReadContents() private méthode

private AssertCanReadContents ( int expectedInnerNumber ) : void
expectedInnerNumber int
Résultat void
        private void AssertCanReadContents(int expectedInnerNumber)
        {
            this.AssertNotDisposed();

            if (!this.innerNumber.HasValue || (this.innerNumber.Value != expectedInnerNumber))
            {
                throw new InvalidOperationException("The current data value does not have contents of the requested type.");
            }

            expectedInnerNumber.Ignore();

            if (!this.CanReadContents)
            {
                throw new InvalidOperationException("The contents of the current data value has already been read.");
            }

            this.CanReadContents = false;
        }