34 lines
		
	
	
		
			881 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			881 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System.Text.Json.Serialization;
 | |
| 
 | |
| namespace Adaptation.FileHandlers.json.WorkItems;
 | |
| 
 | |
| internal class Relation
 | |
| {
 | |
| 
 | |
|     [JsonConstructor]
 | |
|     public Relation(Attribute attributes,
 | |
|                     int id,
 | |
|                     string rel)
 | |
|     {
 | |
|         Attributes = attributes;
 | |
|         Id = id;
 | |
|         Rel = rel;
 | |
|     }
 | |
| 
 | |
|     [JsonPropertyName("attributes")] public Attribute Attributes { get; set; }
 | |
|     [JsonPropertyName("id")] public int Id { get; set; }
 | |
|     [JsonPropertyName("rel")] public string Rel { get; set; }
 | |
| 
 | |
| }
 | |
| 
 | |
| [JsonSourceGenerationOptions(WriteIndented = true)]
 | |
| [JsonSerializable(typeof(Relation))]
 | |
| internal partial class RelationSourceGenerationContext : JsonSerializerContext
 | |
| {
 | |
| }
 | |
| 
 | |
| [JsonSourceGenerationOptions(WriteIndented = true)]
 | |
| [JsonSerializable(typeof(Relation[]))]
 | |
| internal partial class RelationCollectionSourceGenerationContext : JsonSerializerContext
 | |
| {
 | |
| } |