Exemplo n.º 1
0
        public static bool TryParseISODate(string dateString, out DateTimeIndex dateTimeIndex)
        {
            if (DateTime.TryParseExact(dateString, DateTimeIndex.IsoPattern, null, DateTimeStyles.None, out var tmpDateTime))
            {
                dateTimeIndex = new DateTimeIndex(tmpDateTime);
                return(true);
            }

            dateTimeIndex = null;
            return(false);
        }
Exemplo n.º 2
0
        public Row(string commaSeparated)
        {
            var row = commaSeparated.Split(",");

            if (DateTimeIndex.TryParseISODate(row.First(), out var witsmlDateTime))
            {
                Index = witsmlDateTime;
            }
            else
            {
                Index = new DepthIndex(double.Parse(row.First(), CultureInfo.InvariantCulture));
            }

            Values = row[1..].Select(CurveValue.From);
Exemplo n.º 3
0
        public Point(string commaSeparated)
        {
            var values = commaSeparated.Split(",");

            if (DateTimeIndex.TryParseISODate(values.First(), out var witsmlDateTime))
            {
                Index = witsmlDateTime;
            }
            else
            {
                Index = new DepthIndex(double.Parse(values.First(), CultureInfo.InvariantCulture));
            }

            Value = CurveValue.From(values[1]);
        }