コード例 #1
0
 public FortunesController(IFortuneRepository fortunes, ILogger <FortunesController> logger,
                           IOptions <CloudFoundryApplicationOptions> applicationOptions)
 {
     _fortunes           = fortunes;
     _logger             = logger;
     _applicationOptions = applicationOptions.Value;
 }
コード例 #2
0
 public FunModule(Random random, IFortuneRepository fortuneRepository,
                  IAskResponseRepository askResponseRepository)
 {
     _random                = random;
     _fortuneRepository     = fortuneRepository;
     _askResponseRepository = askResponseRepository;
 }
コード例 #3
0
 public FortunesController(
     IFortuneRepository fortunes,
     ILogger <FortunesController> logger)
 {
     //_fortunes = new FortuneRepository(SampleData.FortuneContext);
     _fortunes = fortunes;
     _logger   = logger;
 }
コード例 #4
0
        public FortunesController(ILogger <FortunesController> logger, IFortuneRepository fortunes,
                                  IOptions <CloudFoundryApplicationOptions> appOptions,
                                  IOptions <CloudFoundryServicesOptions> servOptions)
        {
            _logger   = logger;
            _fortunes = fortunes;

            CloudFoundryServices    = servOptions.Value;
            CloudFoundryApplication = appOptions.Value;
        }
コード例 #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FortunesController" /> class.
        /// </summary>
        /// <param name="fortunes">The fortunes.</param>
        /// <param name="logFactory">The log factory.</param>
        /// <param name="appOptions">The application options.</param>
        /// <param name="servOption">The serv option.</param>
        public FortunesController(IFortuneRepository fortunes, ILoggerFactory logFactory = null,
                                  IOptions <CloudFoundryApplicationOptions> appOptions   = null,
                                  IOptions <CloudFoundryServicesOptions> servOption      = null)
        {
            _fortunes = fortunes;
            _logger   = logFactory?.CreateLogger <FortunesController>();

            //if (appOptions != null)
            //    CloudFoundryApplication = appOptions.Value;
            //if (servOption != null)
            //    CloudFoundryServices = servOption.Value;
        }
コード例 #6
0
 public FortuneTellerController(IFortuneRepository fortuneRepository)
 {
     _fortuneRepository = fortuneRepository;
 }
コード例 #7
0
 public FortunesController(ILogger <FortunesController> logger, IFortuneRepository fortunes)
 {
     _logger   = logger;
     _fortunes = fortunes;
 }
コード例 #8
0
 public FortuneTeller(IFortuneRepository fortuneRepository, IRandomNumberGenerator randomNumberGenerator)
 {
     _fortuneRepository     = fortuneRepository;
     _randomNumberGenerator = randomNumberGenerator;
 }
コード例 #9
0
 public FortunesController(IFortuneRepository fortunes, ILogger <FortunesController> logger)
 {
     _fortunes = fortunes;
     _logger   = logger;
 }
コード例 #10
0
 public FortunesController(ILogger <FortunesController> logger, IFortuneRepository repository)
 {
     _logger     = logger;
     _repository = repository;
 }
コード例 #11
0
 public FortunesController()
 {
     _fortunes = new FortuneRepository(SampleData.FortuneContext);
     _logger   = LoggingConfig.LoggerFactory.CreateLogger <FortunesController>();
 }
コード例 #12
0
 public FortunesController()
 {
     _fortunes = new FortuneRepository(SampleData.FortuneContext);
     _logger   = ApplicationContext.Current.LoggerFactory.CreateLogger <FortunesController>();
 }
コード例 #13
0
 public FortunesController(IFortuneRepository fortunes, IEurekaClientService eurekaClientService, ILoggerFactory logFactory = null)
 {
     _fortunes            = fortunes;
     _eurekaClientService = eurekaClientService;
     _logger = logFactory?.CreateLogger <FortunesController>();
 }
コード例 #14
0
 public FortunesController(IFortuneRepository fortunes, ILoggerFactory logFactory = null)
 {
     _fortunes = fortunes;
     _logger   = logFactory?.CreateLogger <FortunesController>();
 }
コード例 #15
0
 public FortunesController(IFortuneRepository fortunes)
 {
     _fortunes = fortunes;
 }
コード例 #16
0
 public FortunesController(IFortuneRepository fortunes, IEurekaClientService eurekaClientService, ILogger <FortunesController> logger)
 {
     _fortunes            = fortunes;
     _eurekaClientService = eurekaClientService;
     _logger = logger;
 }