commit and up
This commit is contained in:
		| @@ -0,0 +1,23 @@ | ||||
| using System; | ||||
| using Microsoft.Extensions.DependencyInjection; | ||||
| using StellaOps.Feedser.Storage.Mongo.Advisories; | ||||
| using StellaOps.Plugin; | ||||
|  | ||||
| namespace StellaOps.Feedser.Exporter.TrivyDb; | ||||
|  | ||||
| public sealed class TrivyDbExporterPlugin : IExporterPlugin | ||||
| { | ||||
|     public string Name => TrivyDbFeedExporter.ExporterName; | ||||
|  | ||||
|     public bool IsAvailable(IServiceProvider services) | ||||
|     { | ||||
|         ArgumentNullException.ThrowIfNull(services); | ||||
|         return services.GetService<IAdvisoryStore>() is not null; | ||||
|     } | ||||
|  | ||||
|     public IFeedExporter Create(IServiceProvider services) | ||||
|     { | ||||
|         ArgumentNullException.ThrowIfNull(services); | ||||
|         return ActivatorUtilities.CreateInstance<TrivyDbFeedExporter>(services); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user