to_info_type() 공개 메소드

public to_info_type ( string column_name ) : info_type
column_name string
리턴 info_type
예제 #1
0
        public static aliases from_enter_separated_string(string s)
        {
            var result = new aliases()
            {
                sett_ = new settings_as_string(s)
            };

            result.init();
            // this will force matching all log columns to our Logwizard columns
            var names = result.sett_.names().ToList();

            foreach (var name in names)
            {
                result.to_info_type(name, names);
            }
            return(result);
        }
예제 #2
0
        public Tuple<int, int>[] idx_in_line(aliases aliases) {
            var idx = new Tuple<int, int>[(int) info_type.max];
            for (int i = 0; i < idx.Length; ++i)
                idx[i] = new Tuple<int, int>(-1, -1);

            var sorted = infos_.OrderBy(x => x.Value).Select(x => new Tuple<int, int>((int) aliases.to_info_type(x.Key) , x.Value)).ToList();

            for (int i = 0; i < sorted.Count; ++i) {
                int len = i < sorted.Count - 1 ? sorted[i + 1].Item2 - sorted[i].Item2 : -1;
                int cur_idx = sorted[i].Item1;
                // we can have too many columns - we will ignore the last ones
                if ( cur_idx < idx.Length)
                    idx[sorted[i].Item1] = new Tuple<int, int>(sorted[i].Item2, len);
            }

            return idx;
        }
예제 #3
0
 public static aliases from_enter_separated_string(string s) {
     var result = new aliases() { sett_ = new settings_as_string(s) };
     result.init();
     // this will force matching all log columns to our Logwizard columns
     var names = result.sett_.names().ToList();
     foreach (var name in names)
         result.to_info_type(name, names);
     return result;
 }
예제 #4
0
        public Tuple <int, int>[] idx_in_line(aliases aliases)
        {
            var idx = new Tuple <int, int> [(int)info_type.max];

            for (int i = 0; i < idx.Length; ++i)
            {
                idx[i] = new Tuple <int, int>(-1, -1);
            }

            var sorted = infos_.OrderBy(x => x.Value).Select(x => new Tuple <int, int>((int)aliases.to_info_type(x.Key), x.Value)).ToList();

            for (int i = 0; i < sorted.Count; ++i)
            {
                int len     = i < sorted.Count - 1 ? sorted[i + 1].Item2 - sorted[i].Item2 : -1;
                int cur_idx = sorted[i].Item1;
                // we can have too many columns - we will ignore the last ones
                if (cur_idx < idx.Length)
                {
                    idx[sorted[i].Item1] = new Tuple <int, int>(sorted[i].Item2, len);
                }
            }

            return(idx);
        }