BEncodeLib.TorrentBDecoder.DecodeList C# (CSharp) Method

DecodeList() private method

private DecodeList ( ) : IList
return IList
        private IList<object> DecodeList()
        {
            int c = GetNextIndicator();

            if (c != 'l')
                throw new FormatException("Expected 'l', not '"
                                          + (char) c + "'");
            _indicator = 0;

            var result = new List<object>();

            c = GetNextIndicator();

            while (c != 'e')
            {
                result.Add(Decode());
                c = GetNextIndicator();
            }

            _indicator = 0;

            return result;
        }