public to_info_type ( string column_name ) : info_type | ||
column_name | string | |
Résultat | info_type |
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); }
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; }
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; }
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); }