Exemplo n.º 1
0
        private async Task HistoryTicks(string cmd)
        {
            var parts = cmd.Split(',');
            await history.WriteLine(cmd);

            await history.GetData(cmd, line => {
                if (line != null)
                {
                    Responses.OnNext(line);
                    TickResponses.OnNext(new TicksResponse(parts[1], line));
                }
                else
                {
                    csvwriter.Dispose();
                    Responses.OnCompleted();
                }
            });
        }
Exemplo n.º 2
0
        private async Task HistoryTicks(string cmd)
        {
            string[] parts = cmd.Split(',');
            //         parts[2] = ConvertToEst(parts[2]);
            //         parts[3] = ConvertToEst(parts[3]);

            //         Console.WriteLine("old: {0}", cmd);
            //         cmd = String.Join(",",parts);
            //Console.WriteLine("new: {0}", cmd);
            await history.WriteLine(cmd);

            await history.GetData(cmd, line => {
                if (line != null)
                {
                    Responses.OnNext(line);
                    TickResponses.OnNext(new TicksResponse(parts[1], line));
                }
                else
                {
                    csvwriter.Dispose();
                    Responses.OnCompleted();
                }
            });
        }