Ejemplo n.º 1
0
 public BeatPulseService(BeatPulseContext context, IHostingEnvironment environment, ILogger <BeatPulseService> logger, IServiceProvider serviceProvider)
 {
     _beatPulseContext = context ?? throw new ArgumentNullException(nameof(context));
     _environment      = environment ?? throw new ArgumentNullException(nameof(environment));
     _logger           = logger ?? throw new ArgumentNullException(nameof(logger));
     _beatPulseContext.UseServiceProvider(serviceProvider);
 }
Ejemplo n.º 2
0
        public BeatPulseService(BeatPulseContext beatPulseContext, IServiceProvider serviceProvider, ILogger <BeatPulseService> logger)
        {
            _beatPulseContext = beatPulseContext ?? throw new ArgumentNullException(nameof(beatPulseContext));
            _logger           = logger ?? throw new ArgumentNullException(nameof(logger));

            _beatPulseContext.UseServiceProvider(serviceProvider);
        }
Ejemplo n.º 3
0
 public static BeatPulseContextAssertions Should(this BeatPulseContext context)
 {
     return(new BeatPulseContextAssertions(context));
 }
Ejemplo n.º 4
0
 public static BeatPulseContext AddLiveness(this BeatPulseContext ctx, string path, Func <IServiceProvider, IBeatPulseLiveness> creator)
 => ctx.AddLiveness(new BeatPulseLivenessFactoryRegistration(path, creator));
Ejemplo n.º 5
0
 public static BeatPulseContext AddLiveness(this BeatPulseContext ctx, IBeatPulseLiveness liveness)
 => ctx.AddLiveness(new BeatPulseLivenessInstanceRegistration(liveness));
Ejemplo n.º 6
0
 public static BeatPulseContext AddTracker(this BeatPulseContext ctx, string name, Func <IServiceProvider, IBeatPulseTracker> creator)
 => ctx.AddTracker(new BeatPulseTrackerFactoryRegistration(name, creator));
Ejemplo n.º 7
0
 public static BeatPulseContext AddTracker(this BeatPulseContext ctx, IBeatPulseTracker tracker)
 => ctx.AddTracker(new BeatPulseTrackerInstanceRegistration(tracker));