40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using System;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Adaptation.FileHandlers.json.WIQL;
|
|
|
|
internal class Root
|
|
{
|
|
|
|
[JsonConstructor]
|
|
public Root(
|
|
string queryType,
|
|
string queryResultType,
|
|
DateTime asOf,
|
|
Column[] columns,
|
|
SortColumn[] sortColumns,
|
|
WorkItem[] workItems
|
|
)
|
|
{
|
|
QueryType = queryType;
|
|
QueryResultType = queryResultType;
|
|
AsOf = asOf;
|
|
Columns = columns;
|
|
SortColumns = sortColumns;
|
|
WorkItems = workItems;
|
|
}
|
|
|
|
[JsonPropertyName("queryType")] public string QueryType { get; }
|
|
[JsonPropertyName("queryResultType")] public string QueryResultType { get; }
|
|
[JsonPropertyName("asOf")] public DateTime AsOf { get; }
|
|
[JsonPropertyName("columns")] public Column[] Columns { get; }
|
|
[JsonPropertyName("sortColumns")] public SortColumn[] SortColumns { get; }
|
|
[JsonPropertyName("workItems")] public WorkItem[] WorkItems { get; }
|
|
|
|
}
|
|
|
|
[JsonSourceGenerationOptions(WriteIndented = true)] // PropertyNameCaseInsensitive = true
|
|
[JsonSerializable(typeof(Root))]
|
|
internal partial class RootSourceGenerationContext : JsonSerializerContext
|
|
{
|
|
} |