コード例 #1
0
ファイル: ModuleService.cs プロジェクト: qwertyquerty/Artemis
        private async Task ActivateModule(Module module)
        {
            try
            {
                module.Activate(false);

                // If this is a profile module, activate the last active profile after module activation
                if (module is ProfileModule profileModule)
                {
                    await _profileService.ActivateLastProfileAnimated(profileModule);
                }
            }
            catch (Exception e)
            {
                _logger.Error(new ArtemisPluginException(module.PluginInfo, "Failed to activate module and last profile.", e), "Failed to activate module and last profile");
                throw;
            }
        }