コード例 #1
0
        public static MetricInfo CreateFromString(string[] values)
        {
            MetricInfo mi = new MetricInfo();

            mi.MetricTime  = DateTime.Parse(values[0]);
            mi.MetricType  = values[1];
            mi.MetricName  = values[2];
            mi.MetricValue = Double.Parse(values[3]);
            return(mi);
        }
コード例 #2
0
        public static MetricInfo CreateFromString(string value)
        {
            string[]   vls = value.Split(new string[] { "\t" }, StringSplitOptions.RemoveEmptyEntries);
            MetricInfo mi  = new MetricInfo();

            //mi.MetricTime = DateTime.Parse(vls[0]);
            mi.MetricTime  = DateTime.Parse(vls[0], new System.Globalization.CultureInfo("en-GB").DateTimeFormat);
            mi.MetricType  = vls[1];
            mi.MetricName  = vls[2];
            mi.MetricValue = Double.Parse(vls[3]);
            return(mi);
        }