Esempio n. 1
0
 /// <summary>
 /// Adds instances of type handlers to the internal cache.
 /// </summary>
 static TypeHandlerFactory()
 {
     CACHE[typeof(Boolean)]  = new BooleanTypeHandler();
     CACHE[typeof(Char)]     = new CharTypeHandler();
     CACHE[typeof(DateTime)] = new DateTimeTypeHandler();
     CACHE[typeof(Decimal)]  = new DecimalTypeHandler();
     CACHE[typeof(Double)]   = new DoubleTypeHandler();
     CACHE[typeof(float)]    = new FloatTypeHandler();
     CACHE[typeof(int)]      = new IntegerTypeHandler();
     CACHE[typeof(long)]     = new LongTypeHandler();
     CACHE[typeof(short)]    = new ShortTypeHandler();
 }
Esempio n. 2
0
        public void DoubleConverterTest01()
        {
            const string val = "foo123.123";

            Assert.IsNull(DoubleTypeHandler.Convert(val));
        }
Esempio n. 3
0
 void ITabularTextInitalizableDataItem.Initialize(string[] values)
 {
     _v1 = StringTypeHandler.Convert(DataItemUtilities.ProcessPattern(values[0], __patterns__[0]));
     _v2 = DoubleTypeHandler.Convert(values[1]);
     _v3 = StringTypeHandler.Convert(DataItemUtilities.ProcessPattern(values[2], __patterns__[1]));
 }
Esempio n. 4
0
        public void DoubleConverterTest00()
        {
            const string val = "123.123";

            Assert.AreEqual(123.123, DoubleTypeHandler.Convert(val));
        }