public async Task <Plugin> GetPluginByName(string name, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); var spec = new PluginFilterSpecification(name, null); return(await _pluginRepository.GetSingleBySpec(spec, cancellationToken)); }
public async Task <List <Plugin> > GetPlugins(string type = "all", CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); var spec = new PluginFilterSpecification(null, type != "all" ? type : null); var plugins = await _pluginRepository.GetBySpec(spec, cancellationToken); return(plugins.ToList()); }