Beispiel #1
0
 public GoogleSheetsController(ILogger logger, ISheetsService sheetsService, IHealthService healthService)
 {
     _logger        = logger;
     _sheetsService = sheetsService;
     _healthService = healthService;
 }
Beispiel #2
0
 public Beacon(ILogger logger, IMiddleware middleware, IConfiguration settings, IHealthService health)
     : base(logger, settings, middleware)
 {
     Health = health ?? throw new ArgumentNullException(nameof(health));
 }
Beispiel #3
0
 public Pulse(ILogger logger, IMiddleware middleware, IConfiguration settings, IHealthService health)
     : base(logger, middleware, settings, health)
 {
 }
 public HealthController(ILogger <HealthController> logger, IHealthService healthService)
 {
     _healthService = healthService;
     _logger        = logger;
 }
Beispiel #5
0
 public PlayerControlController(IUserService userService, IHeroService heroService, ILevelService levelService, IHealthService healthService, IResourcePouchService resourcePouchService, ICharacteristicsService characteristicsService, IChronometerService chronometerService)
 {
     this.userService            = userService;
     this.heroService            = heroService;
     this.levelService           = levelService;
     this.healthService          = healthService;
     this.resourcePouchService   = resourcePouchService;
     this.characteristicsService = characteristicsService;
     this.chronometerService     = chronometerService;
 }
 public HeroHealthViewComponent(IHealthService healthService)
 {
     this.healthService = healthService;
 }
Beispiel #7
0
 public DamageAction(IHealthService healthService, List <IRaisableBehaviour> sources) : base(sources)
 {
     this.healthService = healthService;
     action             = () => { healthService.DealDamage(); };
     SetAction(action);
 }
Beispiel #8
0
 public HealthController(IHealthService dummyService, ILogger <HealthController> logger)
 {
     _dummyService = dummyService;
     _logger       = logger;
 }
Beispiel #9
0
 public HealthController(IHealthService healthService, IHealthSettings healthSettings)
 {
     _healthService  = healthService;
     _healthSettings = healthSettings;
 }
Beispiel #10
0
 public static ServerServiceDefinition BindService(IHealthService health) =>
 Grpc.Health.V1.Health.BindService((Grpc.Health.V1.Health.HealthBase)health);
Beispiel #11
0
 public HealthLogger(IHealthService healthService, ILog log) :
     base((int)TimeSpan.FromMinutes(10).TotalMilliseconds, log)
 {
     _healthService = healthService;
     _log           = log;
 }
Beispiel #12
0
 public void Init(IScoreService scoreService, IHealthService healthService)
 {
     this.scoreService  = scoreService;
     this.healthService = healthService;
     HandleSubscriptions();
 }
Beispiel #13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ImageController" /> class.
 /// </summary>
 /// <param name="healthservice"></param>
 public ImageController(IHealthService healthservice)
 {
     _healthservice = healthservice;
 }
Beispiel #14
0
 public StatusController(IApplicationSettings applicationSettings, IHealthService healthService)
 {
     this._applicationSettings = applicationSettings;
     this._healthService = healthService;
 }
Beispiel #15
0
 public DamageAction(IHealthService healthService, IRaisableBehaviour source, int damageDealt = 1) : base(source)
 {
     this.healthService = healthService;
     action             = () => { healthService.DealDamage(damageDealt); };
     SetAction(action);
 }
 public HomeController(IHttpContextAccessor contextAccessor, IHealthService healthService)
 {
     _contextAccessor = contextAccessor;
     HealthService = healthService;
 }
Beispiel #17
0
 public HealthController(IHealthService service)
 {
     _service = service;
 }
Beispiel #18
0
 protected virtual void ResolveServices(IHealthService healthService, IScoreService scoreService)
 {
     this.scoreService  = scoreService;
     this.healthService = healthService;
 }
Beispiel #19
0
 public StatusController(IHealthService healthService)
 {
     _healthService = healthService;
 }
Beispiel #20
0
 public HealthController(IResponseFactory factory, IHealthService server)
     : base(factory)
 {
     Server = server ?? throw new ArgumentNullException(nameof(server));
 }
 public RedisCandlesCacheService(IHealthService healthService, IDatabase database, MarketType market)
 {
     _healthService = healthService;
     _database      = database;
     _market        = market;
 }
        public ConditionViewModel(AppViewModel screen, string conditionId, string conditionName, IHealthService service)
        {
            this.HostScreen    = screen;
            this.ConditionName = conditionName;

            var loadConditionFromApi = ReactiveCommand.CreateFromTask(async() =>
            {
                var details = await service.GetConditionDetailsAsync(conditionId);
                return(details);
            });

            loadConditionFromApi.ThrownExceptions.Subscribe(e =>
            {
                Debug.WriteLine(e.Message);
            });

            var conditionDetails = loadConditionFromApi.Publish().RefCount();

            this.isLoadingProperty = loadConditionFromApi.IsExecuting.ToProperty(this, vm => vm.IsLoading);

            this.complicationsProperty = conditionDetails.Select(c => c.Complications).ToProperty(this, vm => vm.Complications);
            this.symptomsProperty      = conditionDetails.Select(c => c.Symptoms.Select(s => new ConditionViewModel(screen, s.Id, s.Name, service))).ToProperty(this, vm => vm.Symptoms);
            this.suggestionsProperty   = conditionDetails.Select(c => c.Suggestions).ToProperty(this, vm => vm.Suggestions);

            if (screen != null)
            {
                this.WhenNavigatedTo(() => Task.Run(async() => await loadConditionFromApi.Execute()));
            }

            this.ViewCommand = ReactiveCommand.Create(() => screen.Router.Navigate.Execute(this).Subscribe());
        }
Beispiel #23
0
 public WithingsController(ILogger logger, IWithingsService withingsService, IHealthService healthService)
 {
     _logger          = logger;
     _withingsService = withingsService;
     _healthService   = healthService;
 }
Beispiel #24
0
 public HealthController(IHealthService healthService)
 {
     _healthService = healthService;
 }
Beispiel #25
0
 public HealthController(ILogger <UserController> logger, IHealthService healthService)
 {
     _logger        = logger;
     _healthService = healthService;
 }
 public CharacteristicsService(FarmHeroesDbContext context, IMapper mapper, IHeroService heroService, IResourcePouchService resourcePouchService, IHealthService healthService)
 {
     this.context          = context;
     this.mapper           = mapper;
     this.heroService      = heroService;
     this.resourcesService = resourcePouchService;
     this.healthService    = healthService;
 }
        public WeatherStationViewModel(AppViewModel screen, Core.Locations.Location location, IWeatherService service, IHealthService healthService)
        {
            this.HostScreen = screen;
            this.service    = service;
            this.location   = location;

#if DEBUG
            if ((bool)(DesignerProperties.IsInDesignModeProperty.GetMetadata(typeof(DependencyObject)).DefaultValue))
            {
            }
            else
            {
#endif

            this.refreshTodaysWeather  = ReactiveCommand.CreateFromTask(async() => await service.GetTodaysWeatherAsync(location));
            this.todaysWeatherProperty = this.refreshTodaysWeather.Select(weather => new TodaysForecastModel(weather, screen, service)).ToProperty(this, vm => vm.Today);

            this.forecastCommand = ReactiveCommand.CreateFromTask(async() =>
            {
                var forecasts = await service.GetWeatherForecastAsync(location);

                return(forecasts.Select(f => new DayForecastModel(f, screen, service)));
            });

            this.forecasts = this.forecastCommand.ToProperty(this, vm => vm.Forecasts);

            var refreshConditionsAffectedByWeatherCommand = ReactiveCommand.CreateFromTask(async(TodaysForecast weather) =>
            {
                var conditions = await healthService.GetConditionsAffectedByWeatherAsync(weather.WeatherCode, weather.Temperature);

                return(conditions.Select(c => new ConditionViewModel(screen, c.Id, c.Name, healthService)));
            });

            this.conditionsAffectedByWeatherProperty = refreshConditionsAffectedByWeatherCommand.ToProperty(this, vm => vm.ConditionsAffectedByWeather);

            this.refreshTodaysWeather.InvokeCommand(refreshConditionsAffectedByWeatherCommand);

            //Create a busy property to show the user we're busy doing something.
            Observable
            .CombineLatest(this.refreshTodaysWeather.IsExecuting, this.forecastCommand.IsExecuting, refreshConditionsAffectedByWeatherCommand.IsExecuting, (today, forecast, conditions) => today || forecast || conditions)
            .ToProperty(this, vm => vm.IsBusy, out this.isBusy);

            this.hasConditions = this.WhenAnyValue(vm => vm.ConditionsAffectedByWeather).Select(items => items != null && items.Count() > 0).ToProperty(this, vm => vm.HasConditionsAffectedByWeather);

            this.WhenNavigatedTo(() => Task.Run(async() =>
            {
                await this.refreshTodaysWeather.Execute();
                await this.forecastCommand.Execute();
            }));

#if DEBUG
        }
#endif
        }
Beispiel #28
0
 public HealthLogger(IHealthService healthService, ILogFactory logFactory) :
     base(TimeSpan.FromMinutes(10), logFactory, nameof(HealthLogger))
 {
     _healthService = healthService;
     _log           = logFactory.CreateLog(this);
 }
Beispiel #29
0
 public HomeController(IHealthService health)
 {
     Health = health ?? throw new ArgumentNullException(nameof(health));
 }
 public IsAliveController(IHealthService healthService)
 {
     _healthService = healthService;
 }
 public HomeController(IHttpContextAccessor contextAccessor, IHealthService healthService)
 {
     _contextAccessor = contextAccessor;
     HealthService    = healthService;
 }
Beispiel #32
0
 public StatusController( )
 {
     this._applicationSettings = new ApplicationSettings();
     this._healthService = new HealthService();
 }
 // NOTE: The object is instantiated using DI container, so registered dependencies are injects well
 public GeneralHandlers(IStatusProcessor statusRequest, IHealthService healthService)
 {
     _statusRequest = statusRequest;
     _healthService = healthService;
 }