public static void ComplexMarkDownOutputFilteringForDictionary() { TableDic <string, TestClass> .Add(GetSimpleDictionary()) .ColumnContentTextJustification(new Dictionary <string, TextJustification> { { "Field3", TextJustification.Right } }).ToMarkDown(@"C:\temp\testDic.md", true); }
public static void SimpleConsoleForDictionary() { TableDic <string, TestClass> .Add(GetSimpleDictionary()) .ToConsole(); TableDic <string, TestClass> .Add(GetSimpleDictionary(), new Options { DynamicName = "D", KeyName = "Id" }) .ToConsole(); TableDic <string, TestClass> .Add(GetSimpleDictionary()) .FilterColumns(new[] { "Key_Id" }) .ToConsole(); TableDic <decimal, TestClass> .Add(GetSimpleDictionaryDecimal()) .ToConsole(); }
public void LoadCfg() { XmlDocument xmlCfg = new XmlDocument(); xmlCfg.Load(Directory.GetCurrentDirectory() + "/proxy.xml"); var serverList = xmlCfg.SelectSingleNode("Proxy/ServerSet").ChildNodes; foreach (XmlNode node in serverList) { string serverName = node.Attributes["name"].Value.ToLower(); string ip = node.Attributes["ip"].Value; int port = Convert.ToInt32(node.Attributes["port"].Value); string user = node.Attributes["username"].Value; string pwd = node.Attributes["password"].Value; int maxConn = Convert.ToInt32(node.Attributes["maxconn"].Value); if (!ServerDic.ContainsKey(serverName)) { ServerDic.Add(serverName, new ServerItem(serverName, ip, port, user, pwd, maxConn)); } } var tableList = xmlCfg.SelectSingleNode("Proxy/TableSet").ChildNodes; foreach (XmlNode node in tableList) { string aliasName = node.Attributes["aliasName"].Value.ToLower(); string tableName = node.Attributes["tableName"].Value; string server = node.Attributes["server"].Value.ToLower(); if (ServerDic.ContainsKey(server) && !TableDic.ContainsKey(aliasName)) { TableDic.Add(aliasName, new TableItem(aliasName, tableName, server)); } } }
public static void SimpleConsoleOutputWithHighlighterForDictionary() { TableDic <string, TestClass> .Add(GetSimpleDictionary(), new Options { NumberDecimals = 0 }) .HighlightValue(new HighlightOperator { Field = "Field3", Type = HighlightType.Decimal, DecimalValue = new List <decimal> { 2121.32m }, Operation = HighlightOperation.Equality }) .HighlightValue(new HighlightOperator { Field = "Field6", Type = HighlightType.Decimal, DecimalValue = new List <decimal>() { 34.43m, 134.43m }, Operation = HighlightOperation.Equality }) .ToConsole(); }
public static void SimpleHtmlOutputForDictionary() { TableDic <string, TestClass> .Add(GetSimpleDictionary()).ToHtml(@"C:\temp\test-list-dic.html"); }
public static void SimpleCsvOutputForDictionary() { TableDic <string, TestClass> .Add(GetSimpleDictionary()) .ToCsv(@"C:\temp\testDic.csv"); }