1
1
using System . ComponentModel ;
2
- using Upsilon . Apps . PassKey . Core . Enums ;
3
- using Upsilon . Apps . PassKey . Core . Interfaces ;
4
- using Upsilon . Apps . PassKey . Core . Utils ;
2
+ using Upsilon . Apps . PassKey . Core . Internal . Utils ;
3
+ using Upsilon . Apps . PassKey . Core . Public . Enums ;
4
+ using Upsilon . Apps . PassKey . Core . Public . Interfaces ;
5
5
6
- namespace Upsilon . Apps . PassKey . Core . Models
6
+ namespace Upsilon . Apps . PassKey . Core . Internal . Models
7
7
{
8
- internal sealed class Account : IAccount , IChangable
8
+ internal sealed class Account : IAccount
9
9
{
10
- #region IAccount interface explicit implementation
10
+ #region IAccount interface explicit Internal
11
11
12
12
string IItem . ItemId => ItemId ;
13
13
IService IAccount . Service => Service ;
@@ -16,7 +16,7 @@ string IAccount.Label
16
16
{
17
17
get => Label ;
18
18
set => Label = Database . AutoSave . UpdateValue ( ItemId ,
19
- itemName : this . ToString ( ) ,
19
+ itemName : ToString ( ) ,
20
20
fieldName : nameof ( Label ) ,
21
21
needsReview : false ,
22
22
value : value ,
@@ -27,7 +27,7 @@ string[] IAccount.Identifiants
27
27
{
28
28
get => Identifiants ;
29
29
set => Identifiants = Database . AutoSave . UpdateValue ( ItemId ,
30
- itemName : this . ToString ( ) ,
30
+ itemName : ToString ( ) ,
31
31
fieldName : nameof ( Identifiants ) ,
32
32
needsReview : true ,
33
33
value : value ,
@@ -46,7 +46,7 @@ string IAccount.Password
46
46
if ( _service != null )
47
47
{
48
48
_ = Database . AutoSave . UpdateValue ( ItemId ,
49
- itemName : this . ToString ( ) ,
49
+ itemName : ToString ( ) ,
50
50
fieldName : nameof ( Password ) ,
51
51
needsReview : true ,
52
52
value : Passwords ,
@@ -62,7 +62,7 @@ string IAccount.Notes
62
62
{
63
63
get => Notes ;
64
64
set => Notes = Database . AutoSave . UpdateValue ( ItemId ,
65
- itemName : this . ToString ( ) ,
65
+ itemName : ToString ( ) ,
66
66
fieldName : nameof ( Notes ) ,
67
67
needsReview : false ,
68
68
value : value ,
@@ -73,7 +73,7 @@ int IAccount.PasswordUpdateReminderDelay
73
73
{
74
74
get => PasswordUpdateReminderDelay ;
75
75
set => PasswordUpdateReminderDelay = Database . AutoSave . UpdateValue ( ItemId ,
76
- itemName : this . ToString ( ) ,
76
+ itemName : ToString ( ) ,
77
77
fieldName : nameof ( PasswordUpdateReminderDelay ) ,
78
78
needsReview : false ,
79
79
value : value ,
@@ -84,7 +84,7 @@ AccountOption IAccount.Options
84
84
{
85
85
get => Options ;
86
86
set => Options = Database . AutoSave . UpdateValue ( ItemId ,
87
- itemName : this . ToString ( ) ,
87
+ itemName : ToString ( ) ,
88
88
fieldName : nameof ( Options ) ,
89
89
needsReview : false ,
90
90
value : value ,
@@ -126,13 +126,13 @@ internal bool PasswordExpired
126
126
}
127
127
}
128
128
129
- internal bool PasswordLeaked => Options . ContainsFlag ( AccountOption . WarnIfPasswordLeaked ) && PasswordGenerator . PasswordLeaked ( Password ) ;
129
+ internal bool PasswordLeaked => Options . ContainsFlag ( AccountOption . WarnIfPasswordLeaked ) && Database . PasswordGenerator . PasswordLeaked ( Password ) ;
130
130
131
131
public void Apply ( Change change )
132
132
{
133
133
switch ( change . ActionType )
134
134
{
135
- case ChangeType . Update :
135
+ case Change . Type . Update :
136
136
switch ( change . FieldName )
137
137
{
138
138
case nameof ( Label ) :
@@ -159,7 +159,7 @@ public void Apply(Change change)
159
159
}
160
160
break ;
161
161
default :
162
- throw new InvalidEnumArgumentException ( nameof ( change . ActionType ) , ( int ) change . ActionType , typeof ( ChangeType ) ) ;
162
+ throw new InvalidEnumArgumentException ( nameof ( change . ActionType ) , ( int ) change . ActionType , typeof ( Change . Type ) ) ;
163
163
}
164
164
}
165
165
0 commit comments