Moved to models
This commit is contained in:
16
Models/LineNumber.cs
Normal file
16
Models/LineNumber.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace File_Folder_Helper.Models;
|
||||
|
||||
public record LineNumber(int? Created,
|
||||
int? H1,
|
||||
int? FrontMatterYamlEnd,
|
||||
int? Status,
|
||||
int? Type,
|
||||
int? Updated);
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(LineNumber))]
|
||||
internal partial class LineNumberSourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
26
Models/MarkdownFile.cs
Normal file
26
Models/MarkdownFile.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace File_Folder_Helper.Models;
|
||||
|
||||
public record MarkdownFile(string File,
|
||||
string Directory,
|
||||
string FileName,
|
||||
string FileNameWithoutExtension,
|
||||
string Extension,
|
||||
DateTime CreationDateTime,
|
||||
DateTime LastWriteDateTime,
|
||||
LineNumber LineNumber,
|
||||
string Type,
|
||||
string H1);
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(MarkdownFile))]
|
||||
internal partial class MarkdownFileSourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(MarkdownFile[]))]
|
||||
internal partial class MarkdownFileCollectionSourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
20
Models/PackageJson.cs
Normal file
20
Models/PackageJson.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace File_Folder_Helper.Models;
|
||||
|
||||
public record PackageJson([property: JsonPropertyName("name")] string Name,
|
||||
[property: JsonPropertyName("time")] Dictionary<string, DateTime> Times,
|
||||
[property: JsonPropertyName("_rev")] string Rev,
|
||||
[property: JsonPropertyName("_id")] string Id);
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(PackageJson))]
|
||||
internal partial class PackageJsonSourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(PackageJson[]))]
|
||||
internal partial class PackageJsonCollectionSourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
Reference in New Issue
Block a user