Lawo.EmberPlusSharp.Ember.EmberReader.ReadAndProcessInner C# (CSharp) Method

ReadAndProcessInner() private method

private ReadAndProcessInner ( ) : void
return void
        private void ReadAndProcessInner()
        {
            var innerIdentifierPosition = this.readBuffer.Position;
            var innerIdentifier = ReadIdentifier(this.readBuffer);

            if (innerIdentifier == EndContainer)
            {
                throw CreateEmberException(
                    "Unexpected End-of-contents identifier at position {0}.", innerIdentifierPosition);
            }

            this.ReadAndProcessLength(innerIdentifier, true);
            this.innerNumber = innerIdentifier.ToInnerNumber();

            if (!this.innerNumber.HasValue)
            {
                throw CreateEmberException(
                    "Unexpected context-specific or private identifier at position {0}.", innerIdentifierPosition);
            }

            if (this.innerNumber.Value < Ember.InnerNumber.FirstApplication)
            {
                switch (this.innerNumber.Value)
                {
                    case Ember.InnerNumber.Boolean:
                    case Ember.InnerNumber.Integer:
                    case Ember.InnerNumber.Real:
                    case Ember.InnerNumber.Utf8String:
                    case Ember.InnerNumber.RelativeObjectIdentifier:
                        this.readBuffer.Fill(
                            this.ValidateIdentifierAndLength(innerIdentifier, innerIdentifierPosition));
                        break;
                    case Ember.InnerNumber.Octetstring:
                        this.ValidateIdentifierAndLength(innerIdentifier, innerIdentifierPosition);
                        break;
                    case Ember.InnerNumber.Sequence:
                    case Ember.InnerNumber.Set:
                        break;
                    default:
                        throw CreateEmberException(
                            "Unexpected number in universal identifier at position {0}.", innerIdentifierPosition);
                }
            }
        }