Exemplo n.º 1
0
        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();
            });
        }
Exemplo n.º 2
0
        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();
            });
        }