-
Notifications
You must be signed in to change notification settings - Fork 16
/
BankDataRepository.cs
45 lines (34 loc) · 979 Bytes
/
BankDataRepository.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using AutomaticTypeMapper;
using Optional;
namespace EOLib.Domain.Interact.Bank
{
public interface IBankDataRepository : IResettable
{
int AccountValue { get; set; }
int SessionID { get; set; }
Option<int> LockerUpgrades { get; set; }
}
public interface IBankDataProvider : IResettable
{
int AccountValue { get; }
int SessionID { get; }
Option<int> LockerUpgrades { get; }
}
[AutoMappedType(IsSingleton = true)]
public class BankDataRepository : IBankDataRepository, IBankDataProvider
{
public int AccountValue { get; set; }
public int SessionID { get; set; }
public Option<int> LockerUpgrades { get; set; }
public BankDataRepository()
{
ResetState();
}
public void ResetState()
{
AccountValue = 0;
SessionID = 0;
LockerUpgrades = Option.None<int>();
}
}
}