2023-01-24
This commit is contained in:
22
Adaptation/FileHandlers/json/WIQL/Column.cs
Normal file
22
Adaptation/FileHandlers/json/WIQL/Column.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WIQL;
|
||||
|
||||
public class Column
|
||||
{
|
||||
[JsonConstructor]
|
||||
public Column(
|
||||
string referenceName,
|
||||
string name,
|
||||
string url
|
||||
)
|
||||
{
|
||||
ReferenceName = referenceName;
|
||||
Name = name;
|
||||
Url = url;
|
||||
}
|
||||
|
||||
public string ReferenceName { get; set; } // { init; get; }
|
||||
public string Name { get; set; } // { init; get; }
|
||||
public string Url { get; set; } // { init; get; }
|
||||
}
|
22
Adaptation/FileHandlers/json/WIQL/Field.cs
Normal file
22
Adaptation/FileHandlers/json/WIQL/Field.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WIQL;
|
||||
|
||||
public class Field
|
||||
{
|
||||
[JsonConstructor]
|
||||
public Field(
|
||||
string referenceName,
|
||||
string name,
|
||||
string url
|
||||
)
|
||||
{
|
||||
ReferenceName = referenceName;
|
||||
Name = name;
|
||||
Url = url;
|
||||
}
|
||||
|
||||
public string ReferenceName { get; set; } // { init; get; }
|
||||
public string Name { get; set; } // { init; get; }
|
||||
public string Url { get; set; } // { init; get; }
|
||||
}
|
32
Adaptation/FileHandlers/json/WIQL/Root.cs
Normal file
32
Adaptation/FileHandlers/json/WIQL/Root.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WIQL;
|
||||
|
||||
public 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;
|
||||
}
|
||||
|
||||
public string QueryType { get; set; } // { init; get; }
|
||||
public string QueryResultType { get; set; } // { init; get; }
|
||||
public DateTime AsOf { get; set; } // { init; get; }
|
||||
public Column[] Columns { get; set; } // { init; get; }
|
||||
public SortColumn[] SortColumns { get; set; } // { init; get; }
|
||||
public WorkItem[] WorkItems { get; set; } // { init; get; }
|
||||
}
|
19
Adaptation/FileHandlers/json/WIQL/SortColumn.cs
Normal file
19
Adaptation/FileHandlers/json/WIQL/SortColumn.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WIQL;
|
||||
|
||||
public class SortColumn
|
||||
{
|
||||
[JsonConstructor]
|
||||
public SortColumn(
|
||||
Field field,
|
||||
bool descending
|
||||
)
|
||||
{
|
||||
Field = field;
|
||||
Descending = descending;
|
||||
}
|
||||
|
||||
public Field Field { get; set; } // { init; get; }
|
||||
public bool Descending { get; set; } // { init; get; }
|
||||
}
|
19
Adaptation/FileHandlers/json/WIQL/WorkItem.cs
Normal file
19
Adaptation/FileHandlers/json/WIQL/WorkItem.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WIQL;
|
||||
|
||||
public class WorkItem
|
||||
{
|
||||
[JsonConstructor]
|
||||
public WorkItem(
|
||||
int id,
|
||||
string url
|
||||
)
|
||||
{
|
||||
Id = id;
|
||||
Url = url;
|
||||
}
|
||||
|
||||
public int Id { get; set; } // { init; get; }
|
||||
public string Url { get; set; } // { init; get; }
|
||||
}
|
Reference in New Issue
Block a user