public UserDataStore( ILogger <UserDataStore> logger, IOpenModDataStoreAccessor dataStoreAccessor, IRuntime runtime) { m_Logger = logger; m_Runtime = runtime; m_DataStore = dataStoreAccessor.DataStore; AsyncHelper.RunSync(async() => { m_CachedUsersData = await LoadUsersDataFromDiskAsync(); }); }
public UserDataStore( IOpenModDataStoreAccessor dataStoreAccessor, IRuntime runtime) { m_Runtime = runtime; m_DataStore = dataStoreAccessor.DataStore; // suppress errors because the compiler can't analyze that the values are set from the statements below m_CachedUsersData = null !; m_FileChangeWatcher = null !; AsyncHelper.RunSync(async() => { m_CachedUsersData = await EnsureUserDataCreatedAsync(); }); }