Beispiel #1
0
        protected override T ReadPropertyInternal <T>(PlyProperty expected)
        {
            var token       = _textReader.ReadToken();
            var parsedValue = PlyTypeConverter.ParseStringToNativeType <T>(token, expected.ValueType);

            return(parsedValue);
        }
Beispiel #2
0
        protected override IEnumerable <T> ReadArrayInternal <T>(PlyArrayProperty expected)
        {
            var countToken = _textReader.ReadToken();
            int count      = ParseInt(countToken);

            for (int i = 0; i < count; ++i)
            {
                var valueToken  = _textReader.ReadToken();
                var parsedValue = PlyTypeConverter.ParseStringToNativeType <T>(valueToken, expected.ValueType);
                yield return(parsedValue);
            }
        }