private record
This commit is contained in:
parent
0ee1846c72
commit
19326df4c6
5
.vscode/tasks.json
vendored
5
.vscode/tasks.json
vendored
@ -132,6 +132,11 @@
|
|||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe",
|
"command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe",
|
||||||
"args": [
|
"args": [
|
||||||
|
"s",
|
||||||
|
"X",
|
||||||
|
"T:/MESAFIBACKLOG/06_SourceCode/MESAFIBACKLOG",
|
||||||
|
"Day-Helper-2024-01-08",
|
||||||
|
"T:/MESAFIBACKLOG/06_SourceCode/MESAFIBACKLOG/Adaptation/FileHandlers/Kanban",
|
||||||
"s",
|
"s",
|
||||||
"X",
|
"X",
|
||||||
"T:/MESAFIBACKLOG/06_SourceCode/MESAFIBACKLOG",
|
"T:/MESAFIBACKLOG/06_SourceCode/MESAFIBACKLOG",
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
using File_Folder_Helper.Models;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -10,6 +9,29 @@ namespace File_Folder_Helper.ADO2024.PI1;
|
|||||||
internal static partial class Helper20240106
|
internal static partial class Helper20240106
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private record Host([property: JsonPropertyName("a")] string? Id,
|
||||||
|
[property: JsonPropertyName("b")] string? Colon,
|
||||||
|
[property: JsonPropertyName("c")] string? Hyphen,
|
||||||
|
[property: JsonPropertyName("d")] string? Line,
|
||||||
|
[property: JsonPropertyName("e")] string? Count,
|
||||||
|
[property: JsonPropertyName("f")] string? Segments,
|
||||||
|
[property: JsonPropertyName("g")] string? Type,
|
||||||
|
[property: JsonPropertyName("h")] string? Device,
|
||||||
|
[property: JsonPropertyName("i")] string? Name,
|
||||||
|
[property: JsonPropertyName("j")] string? Location);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, AllowTrailingCommas = true)]
|
||||||
|
[JsonSerializable(typeof(Host[]))]
|
||||||
|
private partial class HostCollectionSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
|
[JsonSerializable(typeof(Dictionary<string, Dictionary<string, string>>))]
|
||||||
|
private partial class DictionaryDictionarySourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
private record Record(string Key, Dictionary<string, string> KeyValuePairs);
|
private record Record(string Key, Dictionary<string, string> KeyValuePairs);
|
||||||
|
|
||||||
private static Dictionary<string, Dictionary<string, string>> GetKeyValuePairs(List<Record> collection, bool replaceFound)
|
private static Dictionary<string, Dictionary<string, string>> GetKeyValuePairs(List<Record> collection, bool replaceFound)
|
||||||
@ -33,7 +55,7 @@ internal static partial class Helper20240106
|
|||||||
Dictionary<int, Host> results = [];
|
Dictionary<int, Host> results = [];
|
||||||
int id;
|
int id;
|
||||||
string json = $"[{File.ReadAllText(jsonl).Replace("\r\n", ",")}]";
|
string json = $"[{File.ReadAllText(jsonl).Replace("\r\n", ",")}]";
|
||||||
Host[] hosts = JsonSerializer.Deserialize(json, HostSourceGenerationContext.Default.HostArray) ?? throw new NullReferenceException(nameof(json));
|
Host[] hosts = JsonSerializer.Deserialize(json, HostCollectionSourceGenerationContext.Default.HostArray) ?? throw new NullReferenceException(nameof(json));
|
||||||
foreach (Host host in hosts)
|
foreach (Host host in hosts)
|
||||||
{
|
{
|
||||||
if (host.Id is null)
|
if (host.Id is null)
|
||||||
@ -182,12 +204,6 @@ internal static partial class Helper20240106
|
|||||||
File.AppendAllLines(hostConfFile, lines);
|
File.AppendAllLines(hostConfFile, lines);
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
|
||||||
[JsonSerializable(typeof(Dictionary<string, Dictionary<string, string>>))]
|
|
||||||
private partial class DictionaryDictionarySourceGenerationContext : JsonSerializerContext
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static void TextToJson(ILogger<Worker> logger, List<string> args)
|
internal static void TextToJson(ILogger<Worker> logger, List<string> args)
|
||||||
{
|
{
|
||||||
string json;
|
string json;
|
||||||
|
@ -7,7 +7,7 @@ namespace File_Folder_Helper.ADO2024.PI1;
|
|||||||
internal static partial class Helper20240409
|
internal static partial class Helper20240409
|
||||||
{
|
{
|
||||||
|
|
||||||
internal record FsSize( // cSpell:disable
|
private record FsSize( // cSpell:disable
|
||||||
[property: JsonPropertyName("name")] string Name,
|
[property: JsonPropertyName("name")] string Name,
|
||||||
[property: JsonPropertyName("object")] string Object,
|
[property: JsonPropertyName("object")] string Object,
|
||||||
[property: JsonPropertyName("pmon")] string PMon,
|
[property: JsonPropertyName("pmon")] string PMon,
|
||||||
@ -19,7 +19,7 @@ internal static partial class Helper20240409
|
|||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true, AllowTrailingCommas = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true, AllowTrailingCommas = true)]
|
||||||
[JsonSerializable(typeof(FsSize))]
|
[JsonSerializable(typeof(FsSize))]
|
||||||
internal partial class FsSizeSourceGenerationContext : JsonSerializerContext
|
private partial class FsSizeSourceGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ namespace File_Folder_Helper.ADO2024.PI1;
|
|||||||
internal static partial class Helper20240427
|
internal static partial class Helper20240427
|
||||||
{
|
{
|
||||||
|
|
||||||
internal record Asset( // cSpell:disable
|
private record Asset( // cSpell:disable
|
||||||
[property: JsonPropertyName("id")] string? Id,
|
[property: JsonPropertyName("id")] string? Id,
|
||||||
[property: JsonPropertyName("deviceAssetId")] string? DeviceAssetId,
|
[property: JsonPropertyName("deviceAssetId")] string? DeviceAssetId,
|
||||||
[property: JsonPropertyName("ownerId")] string? OwnerId,
|
[property: JsonPropertyName("ownerId")] string? OwnerId,
|
||||||
@ -42,7 +42,7 @@ internal static partial class Helper20240427
|
|||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true, AllowTrailingCommas = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true, AllowTrailingCommas = true)]
|
||||||
[JsonSerializable(typeof(List<Asset>))]
|
[JsonSerializable(typeof(List<Asset>))]
|
||||||
internal partial class AssetCollectionSourceGenerationContext : JsonSerializerContext
|
private partial class AssetCollectionSourceGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,26 +8,26 @@ namespace File_Folder_Helper.ADO2024.PI2;
|
|||||||
internal static partial class Helper20240517
|
internal static partial class Helper20240517
|
||||||
{
|
{
|
||||||
|
|
||||||
public record ContentSignature([property: JsonPropertyName("contentSignature")] string Value,
|
private record ContentSignature([property: JsonPropertyName("contentSignature")] string Value,
|
||||||
[property: JsonPropertyName("contentSignatureType")] string ContentSignatureType);
|
[property: JsonPropertyName("contentSignatureType")] string ContentSignatureType);
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(ContentSignature))]
|
[JsonSerializable(typeof(ContentSignature))]
|
||||||
public partial class ContentSignatureGenerationContext : JsonSerializerContext
|
private partial class ContentSignatureGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record Type([property: JsonPropertyName("count")] int Count,
|
private record Type([property: JsonPropertyName("count")] int Count,
|
||||||
[property: JsonPropertyName("match")] string Match,
|
[property: JsonPropertyName("match")] string Match,
|
||||||
[property: JsonPropertyName("searchData")] SearchData SearchData);
|
[property: JsonPropertyName("searchData")] SearchData SearchData);
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(Type))]
|
[JsonSerializable(typeof(Type))]
|
||||||
public partial class TypeGenerationContext : JsonSerializerContext
|
private partial class TypeGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record ImageAmazon([property: JsonPropertyName("colorSpace")] string ColorSpace,
|
private record ImageAmazon([property: JsonPropertyName("colorSpace")] string ColorSpace,
|
||||||
[property: JsonPropertyName("dateTime")] DateTime DateTime,
|
[property: JsonPropertyName("dateTime")] DateTime DateTime,
|
||||||
[property: JsonPropertyName("dateTimeDigitized")] DateTime DateTimeDigitized,
|
[property: JsonPropertyName("dateTimeDigitized")] DateTime DateTimeDigitized,
|
||||||
[property: JsonPropertyName("dateTimeOriginal")] DateTime DateTimeOriginal,
|
[property: JsonPropertyName("dateTimeOriginal")] DateTime DateTimeOriginal,
|
||||||
@ -54,11 +54,11 @@ internal static partial class Helper20240517
|
|||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(ImageAmazon))]
|
[JsonSerializable(typeof(ImageAmazon))]
|
||||||
public partial class ImageAmazonGenerationContext : JsonSerializerContext
|
private partial class ImageAmazonGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record ContentProperties([property: JsonPropertyName("contentDate")] DateTime ContentDate,
|
private record ContentProperties([property: JsonPropertyName("contentDate")] DateTime ContentDate,
|
||||||
[property: JsonPropertyName("contentSignatures")] IReadOnlyList<ContentSignature> ContentSignatures,
|
[property: JsonPropertyName("contentSignatures")] IReadOnlyList<ContentSignature> ContentSignatures,
|
||||||
[property: JsonPropertyName("contentType")] string ContentType,
|
[property: JsonPropertyName("contentType")] string ContentType,
|
||||||
[property: JsonPropertyName("extension")] string Extension,
|
[property: JsonPropertyName("extension")] string Extension,
|
||||||
@ -69,19 +69,19 @@ internal static partial class Helper20240517
|
|||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(ContentProperties))]
|
[JsonSerializable(typeof(ContentProperties))]
|
||||||
public partial class ContentPropertiesGenerationContext : JsonSerializerContext
|
private partial class ContentPropertiesGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record XAccntParentMap();
|
private record XAccntParentMap();
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(XAccntParentMap))]
|
[JsonSerializable(typeof(XAccntParentMap))]
|
||||||
public partial class XAccntParentMapGenerationContext : JsonSerializerContext
|
private partial class XAccntParentMapGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record Datum([property: JsonPropertyName("accessRuleIds")] IReadOnlyList<object> AccessRuleIds,
|
private record Datum([property: JsonPropertyName("accessRuleIds")] IReadOnlyList<object> AccessRuleIds,
|
||||||
[property: JsonPropertyName("childAssetTypeInfo")] IReadOnlyList<object> ChildAssetTypeInfo,
|
[property: JsonPropertyName("childAssetTypeInfo")] IReadOnlyList<object> ChildAssetTypeInfo,
|
||||||
[property: JsonPropertyName("contentProperties")] ContentProperties ContentProperties,
|
[property: JsonPropertyName("contentProperties")] ContentProperties ContentProperties,
|
||||||
[property: JsonPropertyName("createdBy")] string CreatedBy,
|
[property: JsonPropertyName("createdBy")] string CreatedBy,
|
||||||
@ -111,27 +111,27 @@ internal static partial class Helper20240517
|
|||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(Datum))]
|
[JsonSerializable(typeof(Datum))]
|
||||||
public partial class DatumGenerationContext : JsonSerializerContext
|
private partial class DatumGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(Dictionary<string, Datum>))]
|
[JsonSerializable(typeof(Dictionary<string, Datum>))]
|
||||||
public partial class DictionaryDatumGenerationContext : JsonSerializerContext
|
private partial class DictionaryDatumGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record LocationAmazon([property: JsonPropertyName("count")] int Count,
|
private record LocationAmazon([property: JsonPropertyName("count")] int Count,
|
||||||
[property: JsonPropertyName("match")] string Match,
|
[property: JsonPropertyName("match")] string Match,
|
||||||
[property: JsonPropertyName("searchData")] SearchData SearchData);
|
[property: JsonPropertyName("searchData")] SearchData SearchData);
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(LocationAmazon))]
|
[JsonSerializable(typeof(LocationAmazon))]
|
||||||
public partial class LocationAmazonGenerationContext : JsonSerializerContext
|
private partial class LocationAmazonGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record LocationInfo([property: JsonPropertyName("city")] string City,
|
private record LocationInfo([property: JsonPropertyName("city")] string City,
|
||||||
[property: JsonPropertyName("country")] string Country,
|
[property: JsonPropertyName("country")] string Country,
|
||||||
[property: JsonPropertyName("countryIso3Code")] string CountryIso3Code,
|
[property: JsonPropertyName("countryIso3Code")] string CountryIso3Code,
|
||||||
[property: JsonPropertyName("state")] string State,
|
[property: JsonPropertyName("state")] string State,
|
||||||
@ -139,74 +139,74 @@ internal static partial class Helper20240517
|
|||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(LocationInfo))]
|
[JsonSerializable(typeof(LocationInfo))]
|
||||||
public partial class LocationInfoGenerationContext : JsonSerializerContext
|
private partial class LocationInfoGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record SearchData([property: JsonPropertyName("clusterName")] string ClusterName,
|
private record SearchData([property: JsonPropertyName("clusterName")] string ClusterName,
|
||||||
[property: JsonPropertyName("locationId")] string LocationId,
|
[property: JsonPropertyName("locationId")] string LocationId,
|
||||||
[property: JsonPropertyName("locationInfo")] LocationInfo LocationInfo,
|
[property: JsonPropertyName("locationInfo")] LocationInfo LocationInfo,
|
||||||
[property: JsonPropertyName("thingId")] string ThingId);
|
[property: JsonPropertyName("thingId")] string ThingId);
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(SearchData))]
|
[JsonSerializable(typeof(SearchData))]
|
||||||
public partial class SearchDataGenerationContext : JsonSerializerContext
|
private partial class SearchDataGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record AllPerson([property: JsonPropertyName("count")] int Count,
|
private record AllPerson([property: JsonPropertyName("count")] int Count,
|
||||||
[property: JsonPropertyName("match")] string Match,
|
[property: JsonPropertyName("match")] string Match,
|
||||||
[property: JsonPropertyName("searchData")] SearchData SearchData);
|
[property: JsonPropertyName("searchData")] SearchData SearchData);
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(AllPerson))]
|
[JsonSerializable(typeof(AllPerson))]
|
||||||
public partial class AllPersonGenerationContext : JsonSerializerContext
|
private partial class AllPersonGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record PersonAmazon([property: JsonPropertyName("count")] int Count,
|
private record PersonAmazon([property: JsonPropertyName("count")] int Count,
|
||||||
[property: JsonPropertyName("match")] string Match,
|
[property: JsonPropertyName("match")] string Match,
|
||||||
[property: JsonPropertyName("searchData")] SearchData SearchData);
|
[property: JsonPropertyName("searchData")] SearchData SearchData);
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(PersonAmazon))]
|
[JsonSerializable(typeof(PersonAmazon))]
|
||||||
public partial class PersonAmazonGenerationContext : JsonSerializerContext
|
private partial class PersonAmazonGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record ClusterId([property: JsonPropertyName("count")] int Count,
|
private record ClusterId([property: JsonPropertyName("count")] int Count,
|
||||||
[property: JsonPropertyName("match")] string Match,
|
[property: JsonPropertyName("match")] string Match,
|
||||||
[property: JsonPropertyName("searchData")] SearchData SearchData);
|
[property: JsonPropertyName("searchData")] SearchData SearchData);
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(ClusterId))]
|
[JsonSerializable(typeof(ClusterId))]
|
||||||
public partial class ClusterIdGenerationContext : JsonSerializerContext
|
private partial class ClusterIdGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record Thing([property: JsonPropertyName("count")] int Count,
|
private record Thing([property: JsonPropertyName("count")] int Count,
|
||||||
[property: JsonPropertyName("match")] string Match,
|
[property: JsonPropertyName("match")] string Match,
|
||||||
[property: JsonPropertyName("searchData")] SearchData SearchData);
|
[property: JsonPropertyName("searchData")] SearchData SearchData);
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(Thing))]
|
[JsonSerializable(typeof(Thing))]
|
||||||
public partial class ThingGenerationContext : JsonSerializerContext
|
private partial class ThingGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record Time([property: JsonPropertyName("count")] int Count,
|
private record Time([property: JsonPropertyName("count")] int Count,
|
||||||
[property: JsonPropertyName("match")] string Match,
|
[property: JsonPropertyName("match")] string Match,
|
||||||
[property: JsonPropertyName("searchData")] SearchData SearchData);
|
[property: JsonPropertyName("searchData")] SearchData SearchData);
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(Time))]
|
[JsonSerializable(typeof(Time))]
|
||||||
public partial class TimeGenerationContext : JsonSerializerContext
|
private partial class TimeGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record ParentMap([property: JsonPropertyName("FOLDER")] IReadOnlyList<string> FOLDER);
|
private record ParentMap([property: JsonPropertyName("FOLDER")] IReadOnlyList<string> FOLDER);
|
||||||
|
|
||||||
public record Aggregations([property: JsonPropertyName("allPeople")] IReadOnlyList<AllPerson> AllPeople,
|
private record Aggregations([property: JsonPropertyName("allPeople")] IReadOnlyList<AllPerson> AllPeople,
|
||||||
[property: JsonPropertyName("clusterId")] IReadOnlyList<ClusterId> ClusterId,
|
[property: JsonPropertyName("clusterId")] IReadOnlyList<ClusterId> ClusterId,
|
||||||
[property: JsonPropertyName("location")] IReadOnlyList<LocationAmazon> Location,
|
[property: JsonPropertyName("location")] IReadOnlyList<LocationAmazon> Location,
|
||||||
[property: JsonPropertyName("people")] IReadOnlyList<PersonAmazon> People,
|
[property: JsonPropertyName("people")] IReadOnlyList<PersonAmazon> People,
|
||||||
@ -216,23 +216,23 @@ internal static partial class Helper20240517
|
|||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(Aggregations))]
|
[JsonSerializable(typeof(Aggregations))]
|
||||||
public partial class AggregationsGenerationContext : JsonSerializerContext
|
private partial class AggregationsGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(ParentMap))]
|
[JsonSerializable(typeof(ParentMap))]
|
||||||
public partial class ParentMapGenerationContext : JsonSerializerContext
|
private partial class ParentMapGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record RootAmazon([property: JsonPropertyName("aggregations")] Aggregations Aggregations,
|
private record RootAmazon([property: JsonPropertyName("aggregations")] Aggregations Aggregations,
|
||||||
[property: JsonPropertyName("count")] int Count,
|
[property: JsonPropertyName("count")] int Count,
|
||||||
[property: JsonPropertyName("data")] IReadOnlyList<Datum> Data);
|
[property: JsonPropertyName("data")] IReadOnlyList<Datum> Data);
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(RootAmazon))]
|
[JsonSerializable(typeof(RootAmazon))]
|
||||||
public partial class RootAmazonGenerationContext : JsonSerializerContext
|
private partial class RootAmazonGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,20 +1,37 @@
|
|||||||
using File_Folder_Helper.Models;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace File_Folder_Helper.ADO2024.PI2;
|
namespace File_Folder_Helper.ADO2024.PI2;
|
||||||
|
|
||||||
internal static partial class Helper20240718
|
internal static partial class Helper20240718
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private record Host([property: JsonPropertyName("a")] string? Id,
|
||||||
|
[property: JsonPropertyName("b")] string? Colon,
|
||||||
|
[property: JsonPropertyName("c")] string? Hyphen,
|
||||||
|
[property: JsonPropertyName("d")] string? Line,
|
||||||
|
[property: JsonPropertyName("e")] string? Count,
|
||||||
|
[property: JsonPropertyName("f")] string? Segments,
|
||||||
|
[property: JsonPropertyName("g")] string? Type,
|
||||||
|
[property: JsonPropertyName("h")] string? Device,
|
||||||
|
[property: JsonPropertyName("i")] string? Name,
|
||||||
|
[property: JsonPropertyName("j")] string? Location);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, AllowTrailingCommas = true)]
|
||||||
|
[JsonSerializable(typeof(Host[]))]
|
||||||
|
private partial class HostsSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
private static Host[] GetHosts(ILogger<Worker> logger, string file)
|
private static Host[] GetHosts(ILogger<Worker> logger, string file)
|
||||||
{
|
{
|
||||||
Host[] results;
|
Host[] results;
|
||||||
string lines = File.ReadAllText(file);
|
string lines = File.ReadAllText(file);
|
||||||
string json = $"[{lines.Replace("\r\n", ",")}]";
|
string json = $"[{lines.Replace("\r\n", ",")}]";
|
||||||
logger.LogDebug(lines);
|
logger.LogDebug(lines);
|
||||||
results = JsonSerializer.Deserialize(json, HostSourceGenerationContext.Default.HostArray) ?? throw new NullReferenceException();
|
results = JsonSerializer.Deserialize(json, HostsSourceGenerationContext.Default.HostArray) ?? throw new NullReferenceException();
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,27 +8,27 @@ namespace File_Folder_Helper.ADO2024.PI3;
|
|||||||
internal static partial class Helper20240822
|
internal static partial class Helper20240822
|
||||||
{
|
{
|
||||||
|
|
||||||
public record Record(string? Title, ReadOnlyCollection<string> Tags, string? Completed);
|
private record Record(string? Title, ReadOnlyCollection<string> Tags, string? Completed);
|
||||||
|
|
||||||
public record Root([property: JsonPropertyName("headings")] Heading[] Headings,
|
private record Root([property: JsonPropertyName("headings")] Heading[] Headings,
|
||||||
[property: JsonPropertyName("lanes")] Lane[] Lanes);
|
[property: JsonPropertyName("lanes")] Lane[] Lanes);
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(Root))]
|
[JsonSerializable(typeof(Root))]
|
||||||
internal partial class Helper20240822RootSourceGenerationContext : JsonSerializerContext
|
private partial class Helper20240822RootSourceGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record Welcome2([property: JsonPropertyName("headings")] Heading[] Headings,
|
private record Welcome2([property: JsonPropertyName("headings")] Heading[] Headings,
|
||||||
[property: JsonPropertyName("lanes")] Lane[] Lanes);
|
[property: JsonPropertyName("lanes")] Lane[] Lanes);
|
||||||
|
|
||||||
public record Heading([property: JsonPropertyName("name")] string Name,
|
private record Heading([property: JsonPropertyName("name")] string Name,
|
||||||
[property: JsonPropertyName("heading")] string HeadingHeading);
|
[property: JsonPropertyName("heading")] string HeadingHeading);
|
||||||
|
|
||||||
public record Lane([property: JsonPropertyName("name")] string Name,
|
private record Lane([property: JsonPropertyName("name")] string Name,
|
||||||
[property: JsonPropertyName("columns")] Column[][] Columns);
|
[property: JsonPropertyName("columns")] Column[][] Columns);
|
||||||
|
|
||||||
public record Column([property: JsonPropertyName("id")] string Id,
|
private record Column([property: JsonPropertyName("id")] string Id,
|
||||||
[property: JsonPropertyName("name")] string Name,
|
[property: JsonPropertyName("name")] string Name,
|
||||||
[property: JsonPropertyName("description")] string Description,
|
[property: JsonPropertyName("description")] string Description,
|
||||||
[property: JsonPropertyName("metadata")] Metadata? Metadata,
|
[property: JsonPropertyName("metadata")] Metadata? Metadata,
|
||||||
@ -41,17 +41,17 @@ internal static partial class Helper20240822
|
|||||||
[property: JsonPropertyName("remainingWorkload")] long RemainingWorkload,
|
[property: JsonPropertyName("remainingWorkload")] long RemainingWorkload,
|
||||||
[property: JsonPropertyName("dueData")] DueData DueData);
|
[property: JsonPropertyName("dueData")] DueData DueData);
|
||||||
|
|
||||||
public record Comment([property: JsonPropertyName("text")] string Text,
|
private record Comment([property: JsonPropertyName("text")] string Text,
|
||||||
[property: JsonPropertyName("date")] DateTimeOffset Date);
|
[property: JsonPropertyName("date")] DateTimeOffset Date);
|
||||||
|
|
||||||
public record DueData([property: JsonPropertyName("completed")] bool Completed,
|
private record DueData([property: JsonPropertyName("completed")] bool Completed,
|
||||||
[property: JsonPropertyName("completedDate")] object CompletedDate,
|
[property: JsonPropertyName("completedDate")] object CompletedDate,
|
||||||
[property: JsonPropertyName("dueDate")] DateTimeOffset DueDate,
|
[property: JsonPropertyName("dueDate")] DateTimeOffset DueDate,
|
||||||
[property: JsonPropertyName("overdue")] bool Overdue,
|
[property: JsonPropertyName("overdue")] bool Overdue,
|
||||||
[property: JsonPropertyName("dueDelta")] long DueDelta,
|
[property: JsonPropertyName("dueDelta")] long DueDelta,
|
||||||
[property: JsonPropertyName("dueMessage")] string DueMessage);
|
[property: JsonPropertyName("dueMessage")] string DueMessage);
|
||||||
|
|
||||||
public record Metadata([property: JsonPropertyName("assigned")] string Assigned,
|
private record Metadata([property: JsonPropertyName("assigned")] string Assigned,
|
||||||
[property: JsonPropertyName("created")] DateTimeOffset Created,
|
[property: JsonPropertyName("created")] DateTimeOffset Created,
|
||||||
[property: JsonPropertyName("progress")] long? Progress,
|
[property: JsonPropertyName("progress")] long? Progress,
|
||||||
[property: JsonPropertyName("started")] DateTimeOffset? Started,
|
[property: JsonPropertyName("started")] DateTimeOffset? Started,
|
||||||
@ -62,7 +62,7 @@ internal static partial class Helper20240822
|
|||||||
[property: JsonPropertyName("due")] DateTimeOffset? Due,
|
[property: JsonPropertyName("due")] DateTimeOffset? Due,
|
||||||
[property: JsonPropertyName("completed")] DateTimeOffset? Completed);
|
[property: JsonPropertyName("completed")] DateTimeOffset? Completed);
|
||||||
|
|
||||||
public record SubTask([property: JsonPropertyName("text")] string Text,
|
private record SubTask([property: JsonPropertyName("text")] string Text,
|
||||||
[property: JsonPropertyName("completed")] bool Completed);
|
[property: JsonPropertyName("completed")] bool Completed);
|
||||||
|
|
||||||
private static ReadOnlyCollection<ReadOnlyCollection<Record>> GetRecords(Column[][] columnCollection)
|
private static ReadOnlyCollection<ReadOnlyCollection<Record>> GetRecords(Column[][] columnCollection)
|
||||||
|
@ -10,7 +10,7 @@ namespace File_Folder_Helper.ADO2024.PI3;
|
|||||||
internal static partial class Helper20240828
|
internal static partial class Helper20240828
|
||||||
{
|
{
|
||||||
|
|
||||||
public record HeaderCommon(DateTime Date,
|
private record HeaderCommon(DateTime Date,
|
||||||
string? Employee,
|
string? Employee,
|
||||||
string? Layer,
|
string? Layer,
|
||||||
string? MesEntity,
|
string? MesEntity,
|
||||||
@ -23,11 +23,11 @@ internal static partial class Helper20240828
|
|||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(HeaderCommon))]
|
[JsonSerializable(typeof(HeaderCommon))]
|
||||||
internal partial class HeaderCommonSourceGenerationContext : JsonSerializerContext
|
private partial class HeaderCommonSourceGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record Record(string? CassetteId,
|
private record Record(string? CassetteId,
|
||||||
ReadOnlyCollection<string>? CassetteSegments,
|
ReadOnlyCollection<string>? CassetteSegments,
|
||||||
DateTime? Date,
|
DateTime? Date,
|
||||||
string? Employee,
|
string? Employee,
|
||||||
|
@ -15,7 +15,7 @@ namespace File_Folder_Helper.ADO2024.PI3;
|
|||||||
internal static partial class Helper20240830
|
internal static partial class Helper20240830
|
||||||
{
|
{
|
||||||
|
|
||||||
public record WorkItem(string AreaPath,
|
private record WorkItem(string AreaPath,
|
||||||
string? AssignedTo,
|
string? AssignedTo,
|
||||||
int? BusinessValue,
|
int? BusinessValue,
|
||||||
DateTime ChangedDate,
|
DateTime ChangedDate,
|
||||||
|
@ -7,12 +7,12 @@ namespace File_Folder_Helper.ADO2024.PI3;
|
|||||||
internal static partial class Helper20240925
|
internal static partial class Helper20240925
|
||||||
{
|
{
|
||||||
|
|
||||||
public record Test(string Name,
|
private record Test(string Name,
|
||||||
long Value);
|
long Value);
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(ReadOnlyCollection<Test>))]
|
[JsonSerializable(typeof(ReadOnlyCollection<Test>))]
|
||||||
internal partial class TestCollectionSourceGenerationContext : JsonSerializerContext
|
private partial class TestCollectionSourceGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ namespace File_Folder_Helper.ADO2024.PI3;
|
|||||||
internal static partial class Helper20241002
|
internal static partial class Helper20241002
|
||||||
{
|
{
|
||||||
|
|
||||||
public record Record(string? Calculation,
|
private record Record(string? Calculation,
|
||||||
string Chart,
|
string Chart,
|
||||||
string Group,
|
string Group,
|
||||||
string GroupId,
|
string GroupId,
|
||||||
@ -17,7 +17,7 @@ internal static partial class Helper20241002
|
|||||||
string TestId)
|
string TestId)
|
||||||
{
|
{
|
||||||
|
|
||||||
public static Record Get(Record record, string? calculation) =>
|
internal static Record Get(Record record, string? calculation) =>
|
||||||
new(calculation,
|
new(calculation,
|
||||||
record.Chart,
|
record.Chart,
|
||||||
record.Group,
|
record.Group,
|
||||||
@ -31,13 +31,13 @@ internal static partial class Helper20241002
|
|||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(ReadOnlyCollection<Record>))]
|
[JsonSerializable(typeof(ReadOnlyCollection<Record>))]
|
||||||
internal partial class RecordCollectionSourceGenerationContext : JsonSerializerContext
|
private partial class RecordCollectionSourceGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(ReadOnlyDictionary<string, Record>))]
|
[JsonSerializable(typeof(ReadOnlyDictionary<string, Record>))]
|
||||||
internal partial class RecordDictionarySourceGenerationContext : JsonSerializerContext
|
private partial class RecordDictionarySourceGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,8 +79,8 @@ internal static class HelperDay
|
|||||||
ADO2024.PI2.Helper20240624.MoveUpOneDirectory(logger, args);
|
ADO2024.PI2.Helper20240624.MoveUpOneDirectory(logger, args);
|
||||||
else if (args[1] == "Day-Helper-2024-07-11")
|
else if (args[1] == "Day-Helper-2024-07-11")
|
||||||
ADO2024.PI2.Helper20240711.GitRemoteRemove(logger, args);
|
ADO2024.PI2.Helper20240711.GitRemoteRemove(logger, args);
|
||||||
else if (args[1] == "Day-Helper-2024-07-18")
|
// else if (args[1] == "Day-Helper-2024-07-18")
|
||||||
ADO2024.PI2.Helper20240718.JsonToMarkdown(logger, args);
|
// ADO2024.PI2.Helper20240718.JsonToMarkdown(logger, args);
|
||||||
else if (args[1] == "Day-Helper-2024-07-24")
|
else if (args[1] == "Day-Helper-2024-07-24")
|
||||||
ADO2024.PI2.Helper20240724.CopyDirectories(logger, args);
|
ADO2024.PI2.Helper20240724.CopyDirectories(logger, args);
|
||||||
else if (args[1] == "Day-Helper-2024-07-28")
|
else if (args[1] == "Day-Helper-2024-07-28")
|
||||||
|
@ -6,12 +6,24 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace File_Folder_Helper.Day.Q42023;
|
namespace File_Folder_Helper.Day.Q42023;
|
||||||
|
|
||||||
internal record Drive(string Share,
|
internal static partial class Helper20231024
|
||||||
|
{
|
||||||
|
|
||||||
|
private record Drive(string Share,
|
||||||
bool Use,
|
bool Use,
|
||||||
string User);
|
string User);
|
||||||
|
|
||||||
internal static class Helper20231024
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
|
[JsonSerializable(typeof(Drive))]
|
||||||
|
private partial class DriveSourceGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
|
[JsonSerializable(typeof(List<Drive>))]
|
||||||
|
private partial class DrivesSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
internal static void NetUse(ILogger<Worker> logger, string argsZero)
|
internal static void NetUse(ILogger<Worker> logger, string argsZero)
|
||||||
{
|
{
|
||||||
@ -111,15 +123,3 @@ internal static class Helper20231024
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
|
||||||
[JsonSerializable(typeof(Drive))]
|
|
||||||
internal partial class DriveSourceGenerationContext : JsonSerializerContext
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
|
||||||
[JsonSerializable(typeof(List<Drive>))]
|
|
||||||
internal partial class DrivesSourceGenerationContext : JsonSerializerContext
|
|
||||||
{
|
|
||||||
}
|
|
@ -28,7 +28,7 @@ internal static partial class Helper20231222
|
|||||||
string NameWithoutExtension,
|
string NameWithoutExtension,
|
||||||
int? SortOrder);
|
int? SortOrder);
|
||||||
|
|
||||||
public record MetadataConfiguration(int ResultAllInOneSubdirectoryLength, int Offset, int IntMinValueLength);
|
private record MetadataConfiguration(int ResultAllInOneSubdirectoryLength, int Offset, int IntMinValueLength);
|
||||||
|
|
||||||
private static short GetSortOrderOnlyLengthIndex(MetadataConfiguration metadataConfiguration) =>
|
private static short GetSortOrderOnlyLengthIndex(MetadataConfiguration metadataConfiguration) =>
|
||||||
(short)metadataConfiguration.Offset.ToString().Length;
|
(short)metadataConfiguration.Offset.ToString().Length;
|
||||||
|
@ -60,7 +60,7 @@ public class AppSettings
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Models.AppSettings Get(IConfigurationRoot configurationRoot)
|
internal static Models.AppSettings Get(IConfigurationRoot configurationRoot)
|
||||||
{
|
{
|
||||||
Models.AppSettings result;
|
Models.AppSettings result;
|
||||||
#pragma warning disable IL3050, IL2026
|
#pragma warning disable IL3050, IL2026
|
||||||
|
@ -3,7 +3,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace File_Folder_Helper.Models;
|
namespace File_Folder_Helper.Models;
|
||||||
|
|
||||||
public record Birth(DateOnly? Date,
|
internal record Birth(DateOnly? Date,
|
||||||
string? Note,
|
string? Note,
|
||||||
List<string> Continue)
|
List<string> Continue)
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace File_Folder_Helper.Models;
|
namespace File_Folder_Helper.Models;
|
||||||
|
|
||||||
public record Change(DateOnly? Date,
|
internal record Change(DateOnly? Date,
|
||||||
string? Note,
|
string? Note,
|
||||||
List<string> Continue)
|
List<string> Continue)
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace File_Folder_Helper.Models;
|
namespace File_Folder_Helper.Models;
|
||||||
|
|
||||||
public record Comment([property: JsonPropertyName("workItemId")] int? WorkItemId,
|
internal record Comment([property: JsonPropertyName("workItemId")] int? WorkItemId,
|
||||||
[property: JsonPropertyName("id")] int? Id,
|
[property: JsonPropertyName("id")] int? Id,
|
||||||
[property: JsonPropertyName("version")] int? Version,
|
[property: JsonPropertyName("version")] int? Version,
|
||||||
[property: JsonPropertyName("text")] string? Text,
|
[property: JsonPropertyName("text")] string? Text,
|
||||||
|
@ -4,7 +4,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace File_Folder_Helper.Models;
|
namespace File_Folder_Helper.Models;
|
||||||
|
|
||||||
public record CreatedBy([property: JsonPropertyName("displayName")] string? DisplayName,
|
internal record CreatedBy([property: JsonPropertyName("displayName")] string? DisplayName,
|
||||||
[property: JsonPropertyName("url")] string? Url,
|
[property: JsonPropertyName("url")] string? Url,
|
||||||
[property: JsonPropertyName("_links")] Links Links,
|
[property: JsonPropertyName("_links")] Links Links,
|
||||||
[property: JsonPropertyName("id")] string? Id,
|
[property: JsonPropertyName("id")] string? Id,
|
||||||
|
@ -3,7 +3,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace File_Folder_Helper.Models;
|
namespace File_Folder_Helper.Models;
|
||||||
|
|
||||||
public record Death(bool? Is,
|
internal record Death(bool? Is,
|
||||||
DateOnly? Date,
|
DateOnly? Date,
|
||||||
string? Note,
|
string? Note,
|
||||||
List<string> Continue)
|
List<string> Continue)
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
using System.Text.Json.Serialization;
|
// using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace File_Folder_Helper.Models;
|
// namespace File_Folder_Helper.Models;
|
||||||
|
|
||||||
public record Host([property: JsonPropertyName("a")] string? Id,
|
// internal record Host([property: JsonPropertyName("a")] string? Id,
|
||||||
[property: JsonPropertyName("b")] string? Colon,
|
// [property: JsonPropertyName("b")] string? Colon,
|
||||||
[property: JsonPropertyName("c")] string? Hyphen,
|
// [property: JsonPropertyName("c")] string? Hyphen,
|
||||||
[property: JsonPropertyName("d")] string? Line,
|
// [property: JsonPropertyName("d")] string? Line,
|
||||||
[property: JsonPropertyName("e")] string? Count,
|
// [property: JsonPropertyName("e")] string? Count,
|
||||||
[property: JsonPropertyName("f")] string? Segments,
|
// [property: JsonPropertyName("f")] string? Segments,
|
||||||
[property: JsonPropertyName("g")] string? Type,
|
// [property: JsonPropertyName("g")] string? Type,
|
||||||
[property: JsonPropertyName("h")] string? Device,
|
// [property: JsonPropertyName("h")] string? Device,
|
||||||
[property: JsonPropertyName("i")] string? Name,
|
// [property: JsonPropertyName("i")] string? Name,
|
||||||
[property: JsonPropertyName("j")] string? Location);
|
// [property: JsonPropertyName("j")] string? Location);
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true, AllowTrailingCommas = true)]
|
// [JsonSourceGenerationOptions(WriteIndented = true, AllowTrailingCommas = true)]
|
||||||
[JsonSerializable(typeof(Host[]))]
|
// [JsonSerializable(typeof(Host[]))]
|
||||||
public partial class HostSourceGenerationContext : JsonSerializerContext
|
// internal partial class HostsSourceGenerationContext : JsonSerializerContext
|
||||||
{
|
// {
|
||||||
}
|
// }
|
@ -4,7 +4,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace File_Folder_Helper.Models;
|
namespace File_Folder_Helper.Models;
|
||||||
|
|
||||||
public record ModifiedBy([property: JsonPropertyName("displayName")] string? DisplayName,
|
internal record ModifiedBy([property: JsonPropertyName("displayName")] string? DisplayName,
|
||||||
[property: JsonPropertyName("url")] string? Url,
|
[property: JsonPropertyName("url")] string? Url,
|
||||||
[property: JsonPropertyName("_links")] Links Links,
|
[property: JsonPropertyName("_links")] Links Links,
|
||||||
[property: JsonPropertyName("id")] string? Id,
|
[property: JsonPropertyName("id")] string? Id,
|
||||||
|
@ -3,7 +3,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace File_Folder_Helper.Models;
|
namespace File_Folder_Helper.Models;
|
||||||
|
|
||||||
public record Name(string? ForwardSlashFull,
|
internal record Name(string? ForwardSlashFull,
|
||||||
string? Given,
|
string? Given,
|
||||||
string? Sur,
|
string? Sur,
|
||||||
string? Nick,
|
string? Nick,
|
||||||
|
@ -3,7 +3,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace File_Folder_Helper.Models;
|
namespace File_Folder_Helper.Models;
|
||||||
|
|
||||||
public record NginxFileSystem(string Name,
|
internal record NginxFileSystem(string Name,
|
||||||
string Type,
|
string Type,
|
||||||
string MTime,
|
string MTime,
|
||||||
float Size)
|
float Size)
|
||||||
|
@ -2,7 +2,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace File_Folder_Helper.Models;
|
namespace File_Folder_Helper.Models;
|
||||||
|
|
||||||
public record PackageJson([property: JsonPropertyName("name")] string Name,
|
internal record PackageJson([property: JsonPropertyName("name")] string Name,
|
||||||
[property: JsonPropertyName("time")] Dictionary<string, DateTime> Times,
|
[property: JsonPropertyName("time")] Dictionary<string, DateTime> Times,
|
||||||
[property: JsonPropertyName("_rev")] string Rev,
|
[property: JsonPropertyName("_rev")] string Rev,
|
||||||
[property: JsonPropertyName("_id")] string Id);
|
[property: JsonPropertyName("_id")] string Id);
|
||||||
|
@ -3,7 +3,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace File_Folder_Helper.Models;
|
namespace File_Folder_Helper.Models;
|
||||||
|
|
||||||
public record Person(long Id,
|
internal record Person(long Id,
|
||||||
Name? Name,
|
Name? Name,
|
||||||
char? Sex,
|
char? Sex,
|
||||||
string? UId,
|
string? UId,
|
||||||
|
@ -3,7 +3,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace File_Folder_Helper.Models;
|
namespace File_Folder_Helper.Models;
|
||||||
|
|
||||||
public record VSCodeTask([property: JsonPropertyName("label")] string? Label,
|
internal record VSCodeTask([property: JsonPropertyName("label")] string? Label,
|
||||||
[property: JsonPropertyName("command")] string? Command,
|
[property: JsonPropertyName("command")] string? Command,
|
||||||
[property: JsonPropertyName("type")] string? Type,
|
[property: JsonPropertyName("type")] string? Type,
|
||||||
[property: JsonPropertyName("args")] IReadOnlyList<string>? Arguments,
|
[property: JsonPropertyName("args")] IReadOnlyList<string>? Arguments,
|
||||||
@ -24,7 +24,7 @@ internal partial class VSCodeTaskSourceGenerationContext : JsonSerializerContext
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public record VSCodeTasks([property: JsonPropertyName("version")] string? Version,
|
internal record VSCodeTasks([property: JsonPropertyName("version")] string? Version,
|
||||||
[property: JsonPropertyName("tasks")] VSCodeTask[]? TaskCollection)
|
[property: JsonPropertyName("tasks")] VSCodeTask[]? TaskCollection)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user