コード例 #1
0
        public static string Serialize(InfluxPoint point)
        {
            var tags   = point.Tags;
            var fields = point.Fields;

            var allTags   = string.Join(",", TagsFormatter.Format(tags));
            var allFields = string.Join(",", FieldFormatter.Format(fields));

            var tagsPart = allTags.Length > 0 ? $",{allTags}" : allTags;

            var measurement = KeyFormatter.Format(point.Measurement);

            return($"{measurement}{tagsPart} {allFields} {FieldValueFormatter.FormatTimestamp(point.UtcTimestamp)}".Trim());
        }
コード例 #2
0
        public string Format(object value)
        {
            var result = FieldValueFormatter.Format(value);

            return(result);
        }