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