コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReportsController"/> class.
 /// </summary>
 /// <param name="repository">The repository.</param>
 /// <param name="paramsParser"></param>
 /// <param name="durationParser"></param>
 /// <param name="creator"></param>
 public ReportsController(IReportsRepository repository, IFilterParamsParser paramsParser, IDurationParser durationParser, IReportCreator creator)
 {
     _repository     = repository ?? throw new ArgumentNullException(nameof(repository));
     _paramsParser   = paramsParser ?? throw new ArgumentNullException(nameof(paramsParser));
     _durationParser = durationParser ?? throw new ArgumentNullException(nameof(durationParser));
     _creator        = creator ?? throw new ArgumentNullException(nameof(creator));
 }
コード例 #2
0
 public KubernetesClient(IKubernetesConfigProvider configProvider, IWatchdogStatusAggregator statusAggregator, ILoggerFactory loggerFactory, IAutoCraneConfig config, IDurationParser durationParser)
 {
     this.logger           = loggerFactory.CreateLogger <KubernetesClient>();
     this.client           = new Kubernetes(configProvider.Get());
     this.statusAggregator = statusAggregator;
     this.config           = config;
     this.durationParser   = durationParser;
 }
コード例 #3
0
 public ResuppliesPerMgltService(ISwApiClient swApiClient, IDurationParser durationParser)
 {
     this.swApiClient    = swApiClient;
     this.durationParser = durationParser;
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController"/> class.
 /// </summary>
 /// <param name="repository">The repository.</param>
 /// <param name="durationParser"></param>
 public HomeController(IReportsRepository repository, IDurationParser durationParser)
 {
     _repository     = repository ?? throw new ArgumentNullException(nameof(repository));
     _durationParser = durationParser ?? throw new ArgumentNullException(nameof(durationParser));
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController"/> class.
 /// </summary>
 public HomeController()
 {
     //TODO: DI here as well
     _repository     = new ReportsRepository();
     _durationParser = new DurationParser();
 }