Ejemplo n.º 1
0
        public string Render()
        {
            var output = "";

            output += string.Format("\tUpdated at: {0}\r\n\r\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            output += string.Format("\tTime Frame: {0}\r\n\r\n", timeFrame.AsString());
            output += string.Format("\t{0,-10}\t{1,-8}\t{2,-8}\t{3,-8}\t{4,-20}\r\n", "Symbol", "TM", "ST", "PT", "Created At");
            output += "\t----------------------------------------------------------------------------------------------------------\r\n";

            foreach (var item in local.ToList().OrderBy(o => o.Value.CreatedAt).Reverse())
            {
                var key    = item.Key;
                var value  = item.Value;
                var timing = value.Timing;

                var timingStr = string.Format("{0,2},{1,2}", timing.Reference, timing.Local);
                var stStr     = string.Format("{0,4}", value.Name);
                var ptstr     = string.Format("{0,2}", value.Val);
                output += string.Format("\t{0,-10}\t{1,-8}\t{2,-8}\t{3,-8}\t{4,-20}\r\n", value.Symbol, timingStr, stStr, ptstr, value.CreatedAt.TimeAgo());
            }

            return(output);
        }