src/common/config/RegistryConfig.js
/**
   * Triggers loading data from Windows registry, supports async/await
   *
   * @emits {update} emitted once all data has been loaded from the registry
   */
Triggers loading data from Windows registry, supports async/await
@emits {update} emitted once all data has been loaded from the registry
Triggers loading data from Windows registry supports async / await @emits { update } emitted once all data has been loaded from the registry
async init() {
    if (process.platform === 'win32') {
      try {
        const servers = await this.getServersListFromRegistry();
        if (servers.length) {
          this.data.teams.push(...servers);
        }
      } catch (error) {
        console.log('[RegistryConfig] Nothing retrieved for \'DefaultServerList\'', error);
      }
      try {
        const enableServerManagement = await this.getEnableServerManagementFromRegistry();
        if (enableServerManagement !== null) {
          this.data.enableServerManagement = enableServerManagement;
        }
      } catch (error) {
        console.log('[RegistryConfig] Nothing retrieved for \'EnableServerManagement\'', error);
      }
      try {
        const enableAutoUpdater = await this.getEnableAutoUpdatorFromRegistry();
        if (enableAutoUpdater !== null) {
          this.data.enableAutoUpdater = enableAutoUpdater;
        }
      } catch (error) {
        console.log('[RegistryConfig] Nothing retrieved for \'EnableAutoUpdater\'', error);
      }
    }
    this.initialized = true;
    this.emit('update', this.data);
  }
async init ( ) { if ( process . platform === 'win32' ) { try { const servers = await this . getServersListFromRegistry ( ) ; if ( servers . length ) { this . data . teams . push ( ... servers ) ; } } catch ( error ) { console . log ( '[RegistryConfig] Nothing retrieved for \'DefaultServerList\'' , error ) ; } try { const enableServerManagement = await this . getEnableServerManagementFromRegistry ( ) ; if ( enableServerManagement !== null ) { this . data . enableServerManagement = enableServerManagement ; } } catch ( error ) { console . log ( '[RegistryConfig] Nothing retrieved for \'EnableServerManagement\'' , error ) ; } try { const enableAutoUpdater = await this . getEnableAutoUpdatorFromRegistry ( ) ; if ( enableAutoUpdater !== null ) { this . data . enableAutoUpdater = enableAutoUpdater ; } } catch ( error ) { console . log ( '[RegistryConfig] Nothing retrieved for \'EnableAutoUpdater\'' , error ) ; } } this . initialized = true ; this . emit ( 'update' , this . data ) ; }
Triggers loading data from Windows registry, supports async/await
 @emits {update} emitted once all data has been loaded from the registry
Triggers loading data from Windows registry supports async / await @emits { update } emitted once all data has been loaded from the registry
// extract DefaultServerList from the registry // extract EnableServerManagement from the registry // extract EnableAutoUpdater from the registry