Beispiel #1
0
        /// <summary>
        /// Gets the resulting expression value with a column type.
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public object GetValue(ColumnType type)
        {
            object o = GetValue();

            if (o == null || _columnType == type)
            {
                return(o);
            }

            string s = Column.ConvertToString(o, type);

            return(Column.ConvertString(s, type));
        }
Beispiel #2
0
        public object GetValue(ColumnType type)
        {
            Resolve();

            Result r    = GetResult(2, null);             // 2 records are (already) too much
            int    size = r.Size;
            int    len  = r.ColumnCount;

            Trace.Check(size == 1 && len == 1, Trace.SINGLE_VALUE_EXPECTED);

            object o = r.Root.Data[0];

            if (r.Type[0] == type)
            {
                return(o);
            }

            string s = Column.ConvertToString(o, type);

            return(Column.ConvertString(s, type));
        }