using System.Text; using MarketData.Utils; namespace IPMonitor { public class CommandArgs : Dictionary { private String[] arguments = default; public String[] GetArguments() { return arguments; } // While the commands are converted to uppercase care must be taken to preserve the case of the arguments. public CommandArgs(String[] args) { arguments = args; for(int index=1;index2) { StringBuilder sb=new StringBuilder(); for(int subIndex=1;subIndex(String name) { T result=default(T); try {result = (T)Convert.ChangeType(this[name].Value, typeof(T));} catch {result = default(T);} return result; } public T Coalesce(String name,T coalesce) { T result=default(T); try { if(!Contains(name))result=coalesce; else result = (T)Convert.ChangeType(this[name].Value, typeof(T)); } catch {result = default(T);} return result; } public T Coalesce(String name) { T result=default(T); try {result = (T)Convert.ChangeType(this[name].Value, typeof(T));} catch {result = default(T);} return result; } } }