示例#1
0
 private static void WriteLine(string text)
 {
     CurrentWriter.WriteLine(text);
     CurrentWriter.Flush();
     if (Options.OutputMode == OutputMode.MixBoth)
     {
         CurrentWriter = CurrentWriter == Console.Out ? Console.Error : Console.Out;
     }
 }
示例#2
0
        public void writeData(SortedList <int, double> ResultData)
        {
            getWriter(DateTime.Now);

            List <double> values = new List <double>();

            foreach (KeyValuePair <int, double> de in ResultData)
            {
                if (Headers.Contains(de.Key))
                {
                    values.Add(de.Value);
                }
            }
            string valueStr = String.Format("{0};{1}", DateTime.Now.AddHours(-2).ToString("dd.MM.yyyy HH:mm:ss"), String.Join(";", values)).Replace(',', '.');

            CurrentWriter.WriteLine(valueStr);
            CurrentWriter.Flush();
        }