/// <summary> /// Initializes a new instance of the <see cref="ReportingEndpointCleanup"/> class. /// </summary> /// <param name="context"> /// The context. /// </param> /// <param name="options"> /// The options. /// </param> /// <param name="logging"> /// The logging. /// </param> public ReportingEndpointCleanup( ReportingEndpointContext context, IReportingEndpointOptions options, IReportingEndpointLogging logging) { this.Context = context; this.ConfigurationReportRepository = context.Set <ConfigurationReport>(); this.Options = options; this.Logging = logging; }
/// <summary> /// The register types. /// </summary> /// <param name="options"> /// The options. /// </param> /// <param name="containerBuilder"> /// The container builder. /// </param> public static void RegisterTypes(IReportingEndpointOptions options, ContainerBuilder containerBuilder) { // Infrastructure containerBuilder.Register(c => new ReportingEndpointContext(options.NameOrConnectionString)) .As <ReportingEndpointContext>(); containerBuilder.RegisterType <ReportingEndpointContextInitializer>().AsSelf().AsImplementedInterfaces(); // containerBuilder.RegisterInstance(options.Logging).AsImplementedInterfaces(); containerBuilder.RegisterInstance(options).AsImplementedInterfaces(); // Services containerBuilder.RegisterType <NodeStatusService>().AsImplementedInterfaces(); containerBuilder.RegisterType <ReportingEndpointCleanup>().AsImplementedInterfaces(); containerBuilder.RegisterType <ConfigurationReportService>().AsImplementedInterfaces(); }
/// <summary> /// The register reporting endpoint types. /// </summary> /// <param name="containerBuilder"> /// The container builder. /// </param> /// <param name="options"> /// The options. /// </param> public static void RegisterReportingEndpointTypes( this ContainerBuilder containerBuilder, IReportingEndpointOptions options) { RegisterTypes(options, containerBuilder); }