BEncodeLib.TorrentBDecoder.DecodeDictionary C# (CSharp) Метод

DecodeDictionary() приватный Метод

private DecodeDictionary ( ) : object>.IDictionary
Результат object>.IDictionary
        private IDictionary<object, object> DecodeDictionary()
        {
            int c = GetNextIndicator();
            if (c != 'd')
                throw new FormatException("Expected 'd', not '" + (char) c + "'");
            _indicator = 0;

            var result = new Dictionary<object, object>();
            c = GetNextIndicator();

            while (c != 'e')
            {
                // Dictionary keys are always strings.
                var key = _streamEncoding.GetString((byte[]) Decode());

                bool isInfoMap = InfoMapKey == key;

                if (isInfoMap)
                    _inInfoMap = true;

                object value = Decode();
                result.Add(key, value);

                if (isInfoMap)
                    _inInfoMap = false;

                c = GetNextIndicator();
            }

            _indicator = 0;

            return result;
        }