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