Ejemplo n.º 1
0
        public override ScalarValue Decode(Stream inStream)
        {
            ScalarValue subtractionLength = Integer.Decode(inStream);
            ScalarValue difference        = Ascii.Decode(inStream);

            return(new TwinValue(subtractionLength, difference));
        }
Ejemplo n.º 2
0
        public override ScalarValue Decode(Stream inStream)
        {
            ScalarValue subtractionLength = NullableInteger.Decode(inStream);

            if (subtractionLength == null)
            {
                return(null);
            }

            ScalarValue difference = Ascii.Decode(inStream);

            return(new TwinValue(subtractionLength, difference));
        }
Ejemplo n.º 3
0
        public override ScalarValue Decode(Stream inStream)
        {
            string str = Ascii.Decode(inStream).ToString();

            DateTime result;

            if (DateTime.TryParseExact(str, _format, _formatter, DateTimeStyles.None, out result))
            {
                return(new DateValue(result));
            }

            Global.ErrorHandler.OnError(null, DynError.ParseError,
                                        "'{0}' could not be parsed as DateTime with '{1}' format", str, _format);
            return(null);
        }