Init
This commit is contained in:
25
Shared/Models/MetadataFileCollection.cs
Normal file
25
Shared/Models/MetadataFileCollection.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace View_by_Distance.Shared.Models;
|
||||
|
||||
public class MetadataFileCollection : Properties.IMetadataFileCollection
|
||||
{
|
||||
|
||||
protected readonly Dictionary<string, List<KeyValuePair<string, string>>> _Values; // {{1}}SingletonValue
|
||||
|
||||
public Dictionary<string, List<KeyValuePair<string, string>>> Values => _Values; // {{1}}SingletonValue
|
||||
|
||||
[JsonConstructor]
|
||||
public MetadataFileCollection
|
||||
(
|
||||
Dictionary<string, List<KeyValuePair<string, string>>> values
|
||||
) => _Values = values; // {{1}}SingletonValue
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
||||
return result;
|
||||
} // ...
|
||||
|
||||
}
|
Reference in New Issue
Block a user