File tree 1 file changed +8
-1
lines changed
Arctic.Puzzlers.Stores/Filestore
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,14 @@ public void Init()
51
51
}
52
52
53
53
public void Dispose ( )
54
+ {
55
+ StoreData ( ) ;
56
+ }
57
+
58
+ private void StoreData ( )
54
59
{
55
60
var folder = m_configuration . GetFileOutputFolder ( ) ;
56
- var fileName = Path . Combine ( folder , JsonFileName ) ;
61
+ var fileName = Path . Combine ( folder , JsonFileName ) ;
57
62
58
63
using ( FileStream createStream = File . Create ( fileName ) )
59
64
{
@@ -68,11 +73,13 @@ public Task<bool> Store(Competition competition)
68
73
{
69
74
m_competitionList . RemoveAll ( t => t . Url == competition . Url ) ;
70
75
m_competitionList . Add ( competition ) ;
76
+ StoreData ( ) ;
71
77
return Task . FromResult ( true ) ;
72
78
}
73
79
else if ( ! m_competitionList . Any ( t => t . Url == competition . Url ) )
74
80
{
75
81
m_competitionList . Add ( competition ) ;
82
+ StoreData ( ) ;
76
83
Task . FromResult ( true ) ;
77
84
}
78
85
return Task . FromResult ( false ) ;
You can’t perform that action at this time.
0 commit comments