public bool TryGetPerformanceInformation(out Dictionary <string, string> values) { var command = new GetPerformanceCommand(); var result = SyncExecuteCommand(command) as DictionaryResult; // Is this the right thing? Or should it be an empty dictionary values = null; if (result != null) { values = result.Results; Console.WriteLine("Retrieved app performance information:"); foreach (var pair in result.Results) { long v; var islong = long.TryParse(pair.Value, out v); if (islong) { Console.WriteLine("{0} : {1}", pair.Key, string.Format("{0}MB", v / 1000000)); } else { Console.WriteLine("{0} : {1}", pair.Key, pair.Value); } } } return(result != null); }
public bool TryGetPerformanceInformation(out Dictionary<string, string> values) { var command = new GetPerformanceCommand(); var result = SyncExecuteCommand(command) as DictionaryResult; // Is this the right thing? Or should it be an empty dictionary values = null; if (result != null) { values = result.Results; Console.WriteLine("Retrieved app performance information:"); foreach (var pair in result.Results) { long v; var islong = long.TryParse(pair.Value, out v); if (islong) { Console.WriteLine("{0} : {1}", pair.Key, string.Format("{0}MB", v / 1000000)); } else { Console.WriteLine("{0} : {1}", pair.Key, pair.Value); } } } return result != null; }