using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using MarketData.Utils; // namespace MarketData { public class CommandArgs : Dictionary { // While the commands are converted to uppercase care must be taken to preserve the case of the arguments. public CommandArgs(String[] 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; } } }