internal static IAmfValue Parse(IBuffer buffer)
        {
            var parser = new Amf3Parser(buffer);

            return parser.readAmfValue();
        }
        private IAmfValue getArray()
        {
            return getObjectReferenceOrValue(() =>
            {
                var array = new AmfArray();

                Amf3Parser parser = null;
                foreach (var readItem in this.reader_.GetArray())
                {
                    parser  = new Amf3Parser(readItem.Reader);
                    if (readItem.IsDenseArrayItem)
                    {

                        array.Add(readItem.DenseArrayIndex, parser.readAmfValue());
                    }
                    else
                    {
                        array.Add(getRemainedString(readItem.PropertyName), parser.readAmfValue());
                    }
                }

                

                return array;
            });

            
        }