File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ namespace CSync.Lib;
2121public class ConfigManager {
2222 internal static readonly Dictionary < string , ConfigFile > FileCache = [ ] ;
2323 internal static readonly Dictionary < InstanceKey , ISyncedConfig > Instances = [ ] ;
24+ internal static readonly Dictionary < InstanceKey , EventHandler > InitialSyncHandlers = [ ] ;
2425
2526 private static event Action ? OnPopulateEntriesRequested ;
2627 internal static void PopulateEntries ( ) => OnPopulateEntriesRequested ? . Invoke ( ) ;
@@ -80,6 +81,7 @@ public static void Register<T>(T config) where T : SyncedConfig<T> {
8081
8182 try {
8283 Instances . Add ( key , config ) ;
84+ InitialSyncHandlers . Add ( key , config . OnInitialSyncCompleted ) ;
8385 }
8486 catch ( ArgumentException exc ) {
8587 throw new InvalidOperationException ( $ "Attempted to register config instance of type `{ typeof ( T ) } `, but an instance has already been registered.", exc ) ;
You can’t perform that action at this time.
0 commit comments