Children
This commit is contained in:
21
Adaptation/FileHandlers/json/WorkItems/Attribute.cs
Normal file
21
Adaptation/FileHandlers/json/WorkItems/Attribute.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WorkItems;
|
||||
|
||||
public class Attribute
|
||||
{
|
||||
|
||||
#nullable enable
|
||||
|
||||
[JsonConstructor]
|
||||
public Attribute(bool isLocked,
|
||||
string name)
|
||||
{
|
||||
IsLocked = isLocked;
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public bool IsLocked { get; set; } // { init; get; }
|
||||
public string Name { get; set; } // { init; get; }
|
||||
|
||||
}
|
19
Adaptation/FileHandlers/json/WorkItems/Record.cs
Normal file
19
Adaptation/FileHandlers/json/WorkItems/Record.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WorkItems;
|
||||
|
||||
public class Record
|
||||
{
|
||||
|
||||
#nullable enable
|
||||
|
||||
public Record(WorkItem workItem, ReadOnlyDictionary<int, Record> children)
|
||||
{
|
||||
WorkItem = workItem;
|
||||
Children = children;
|
||||
}
|
||||
|
||||
public WorkItem WorkItem { get; set; }
|
||||
public ReadOnlyDictionary<int, Record> Children { get; set; }
|
||||
|
||||
}
|
24
Adaptation/FileHandlers/json/WorkItems/Relation.cs
Normal file
24
Adaptation/FileHandlers/json/WorkItems/Relation.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WorkItems;
|
||||
|
||||
public class Relation
|
||||
{
|
||||
|
||||
#nullable enable
|
||||
|
||||
[JsonConstructor]
|
||||
public Relation(string rel,
|
||||
string url,
|
||||
Attribute attributes)
|
||||
{
|
||||
Rel = rel;
|
||||
URL = url;
|
||||
Attributes = attributes;
|
||||
}
|
||||
|
||||
public string Rel { get; set; } // { init; get; }
|
||||
public string URL { get; set; } // { init; get; }
|
||||
public Attribute Attributes { get; set; } // { init; get; }
|
||||
|
||||
}
|
@ -9,7 +9,7 @@ public class Value
|
||||
int id,
|
||||
int rev,
|
||||
Fields fields,
|
||||
object[] relations,
|
||||
Relation[] relations,
|
||||
CommentVersionRef commentVersionRef,
|
||||
string url
|
||||
)
|
||||
@ -32,7 +32,7 @@ public class Value
|
||||
public Fields Fields { get; }
|
||||
|
||||
[JsonPropertyName("relations")]
|
||||
public object[] Relations { get; }
|
||||
public Relation[] Relations { get; }
|
||||
|
||||
[JsonPropertyName("commentVersionRef")]
|
||||
public CommentVersionRef CommentVersionRef { get; }
|
||||
|
@ -22,7 +22,7 @@ public class WorkItem
|
||||
string iterationPath,
|
||||
int? parent,
|
||||
int? priority,
|
||||
object[]? relations,
|
||||
Relation[]? relations,
|
||||
string? requester,
|
||||
DateTime? resolvedDate,
|
||||
int revision,
|
||||
@ -77,7 +77,7 @@ public class WorkItem
|
||||
public string IterationPath { get; set; } // { init; get; }
|
||||
public int? Parent { get; set; } // { init; get; }
|
||||
public int? Priority { get; set; } // { init; get; }
|
||||
public object[]? Relations { get; set; } // { init; get; }
|
||||
public Relation[]? Relations { get; set; } // { init; get; }
|
||||
public string? Requester { get; set; } // { init; get; }
|
||||
public DateTime? ResolvedDate { get; set; } // { init; get; }
|
||||
public int Revision { get; set; } // { init; get; }
|
||||
|
Reference in New Issue
Block a user