Esempio n. 1
0
        public MarkdownTableColumn AddColumn(string name, string title = "")
        {
            if (_columnsDictionary.TryGetValue(name, out var column))
            {
                var order = column.ColumnIndex;
                column = new MarkdownTableColumn(order, name, title);
                _columnsDictionary[name] = column;
            }
            else
            {
                var order = _columnsDictionary.Count;
                column = new MarkdownTableColumn(order, name, title);
                _columnsDictionary.Add(name, column);
            }

            return(column);
        }
Esempio n. 2
0
        public bool TryGetColumn(int index, out MarkdownTableColumn column)
        {
            column = _columnsDictionary.FirstOrDefault(p => p.Value.ColumnIndex == index).Value;

            return(column != null);
        }
Esempio n. 3
0
 public bool TryGetColumn(string name, out MarkdownTableColumn column)
 {
     return(_columnsDictionary.TryGetValue(name, out column));
 }