32 lines
		
	
	
		
			966 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			966 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System.Text.Json;
 | |
| using System.Text.Json.Serialization;
 | |
| 
 | |
| namespace View_by_Distance.Rename.Models;
 | |
| 
 | |
| internal sealed record Identifier(string[] DirectoryNames,
 | |
|                                   bool? HasDateTimeOriginal,
 | |
|                                   int Id,
 | |
|                                   long Length,
 | |
|                                   string PaddedId,
 | |
|                                   long Ticks)
 | |
| {
 | |
| 
 | |
|     public override string ToString()
 | |
|     {
 | |
|         string result = JsonSerializer.Serialize(this, IdentifierSourceGenerationContext.Default.Identifier);
 | |
|         return result;
 | |
|     }
 | |
| 
 | |
| }
 | |
| 
 | |
| [JsonSourceGenerationOptions(WriteIndented = true)]
 | |
| [JsonSerializable(typeof(Identifier))]
 | |
| internal partial class IdentifierSourceGenerationContext : JsonSerializerContext
 | |
| {
 | |
| }
 | |
| 
 | |
| [JsonSourceGenerationOptions(WriteIndented = true)]
 | |
| [JsonSerializable(typeof(Identifier[]))]
 | |
| internal partial class IdentifierCollectionSourceGenerationContext : JsonSerializerContext
 | |
| {
 | |
| } |