34 lines
790 B
C#
34 lines
790 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace View_by_Distance.Property.Models;
|
|
|
|
public class Container
|
|
{
|
|
|
|
protected readonly int _G;
|
|
protected readonly int _R;
|
|
protected readonly List<Item> _Items;
|
|
protected readonly string _SourceDirectory;
|
|
public int G => _G;
|
|
public List<Item> Items => _Items;
|
|
public int R => _R;
|
|
public string SourceDirectory => _SourceDirectory;
|
|
|
|
[JsonConstructor]
|
|
public Container(int g, int r, List<Item> items, string sourceDirectory)
|
|
{
|
|
_G = g;
|
|
_R = r;
|
|
_Items = items;
|
|
_SourceDirectory = sourceDirectory;
|
|
}
|
|
|
|
public Container(int g, int r, string sourceDirectory)
|
|
{
|
|
_G = g;
|
|
_R = r;
|
|
_Items = new();
|
|
_SourceDirectory = sourceDirectory;
|
|
}
|
|
|
|
} |