Init
This commit is contained in:
32
Shared/Models/MetadataFile.cs
Normal file
32
Shared/Models/MetadataFile.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace View_by_Distance.Shared.Models;
|
||||
|
||||
public class MetadataFile : Properties.IMetadataFile
|
||||
{
|
||||
|
||||
protected readonly MetadataFileId _Id; // {-_-}SingletonClass
|
||||
protected readonly MetadataFileCollection _Collection; // {-_-}SingletonClass
|
||||
|
||||
public MetadataFileId Id => _Id; // {-_-}SingletonClass
|
||||
public MetadataFileCollection Collection => _Collection; // {-_-}SingletonClass
|
||||
|
||||
[JsonConstructor]
|
||||
public MetadataFile
|
||||
(
|
||||
MetadataFileId id,
|
||||
MetadataFileCollection collection
|
||||
)
|
||||
{
|
||||
_Id = id; // {-_-}SingletonClass
|
||||
_Collection = collection; // {-_-}SingletonClass
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
||||
return result;
|
||||
} // ...
|
||||
|
||||
}
|
Reference in New Issue
Block a user