示例#1
0
        internal LogsTableColumn(string name, LogsColumnType type)
        {
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }

            Name = name;
            Type = type;
        }
示例#2
0
        internal static LogsQueryResultColumn DeserializeLogsQueryResultColumn(JsonElement element)
        {
            string         name = default;
            LogsColumnType type = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("type"))
                {
                    type = new LogsColumnType(property.Value.GetString());
                    continue;
                }
            }
            return(new LogsQueryResultColumn(name, type));
        }
 public static LogsTableColumn LogsTableColumn(string name = null, LogsColumnType type = default)
 {
     return(new LogsTableColumn(name, type));
 }