27 lines
877 B
C#
27 lines
877 B
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace File_Watcher.Models;
|
|
|
|
public record CompassConfiguration(string Destination,
|
|
int HoursBack,
|
|
string MonthPattern,
|
|
string Pattern,
|
|
string Source,
|
|
string TriggerAppendage,
|
|
string YearPattern)
|
|
{
|
|
|
|
public override string ToString()
|
|
{
|
|
string result = JsonSerializer.Serialize(this, CompassConfigurationSourceGenerationContext.Default.CompassConfiguration);
|
|
return result;
|
|
}
|
|
|
|
}
|
|
|
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
|
[JsonSerializable(typeof(CompassConfiguration))]
|
|
internal partial class CompassConfigurationSourceGenerationContext : JsonSerializerContext
|
|
{
|
|
} |