/// <summary> /// Prepare plugin search model /// </summary> /// <param name="searchModel">Plugin search model</param> /// <returns> /// A task that represents the asynchronous operation /// The task result contains the plugin search model /// </returns> public virtual async Task <PluginSearchModel> PreparePluginSearchModelAsync(PluginSearchModel searchModel) { if (searchModel == null) { throw new ArgumentNullException(nameof(searchModel)); } //prepare available load plugin modes await _baseAdminModelFactory.PrepareLoadPluginModesAsync(searchModel.AvailableLoadModes, false); //prepare available groups await _baseAdminModelFactory.PreparePluginGroupsAsync(searchModel.AvailableGroups); //prepare page parameters searchModel.SetGridPageSize(); searchModel.NeedToRestart = _pluginService.IsRestartRequired(); return(searchModel); }