public FortuneController(
     IFortuneService fortuneService,
     IMapper mapper)
 {
     _fortuneService = fortuneService;
     _mapper         = mapper;
 }
Example #2
0
 public FortuneServiceCommand(IHystrixCommandOptions options,
                              IFortuneService fortuneService,
                              ILogger <FortuneServiceCommand> logger) : base(options)
 {
     _fortuneService       = fortuneService;
     _logger               = logger;
     IsFallbackUserDefined = true;
 }
Example #3
0
 public MultiFortuneServiceCommand(IHystrixCommandGroupKey groupKey,
                                   ICollection <ICollapsedRequest <Fortune, int> > requests,
                                   IFortuneService fortuneService,
                                   ILogger <MultiFortuneServiceCommand> logger) : base(groupKey)
 {
     _fortuneService = fortuneService;
     _logger         = logger;
     _requests       = requests;
 }
 public HomeController(
     //FortuneServiceCommand fortuneServiceCommand,
     IFortuneService fortuneService,
     ILogger <HomeController> logger)
 {
     //_fortuneServiceCommand = fortuneServiceCommand;
     _fortunes = fortuneService;
     _logger   = logger;
 }
Example #5
0
 public FortuneServiceCommand(IHystrixCommandOptions options,
                              IFortuneService fortuneService,
                              ILogger <FortuneServiceCommand> logger,
                              IConfiguration configuration) : base(options)
 {
     _fortuneService       = fortuneService;
     _logger               = logger;
     IsFallbackUserDefined = true;
     fallbackText          = configuration.GetValue <string>("fallbackFortune");
 }
 public HomeController(IFortuneService fortunes)
 {
     _fortunes = fortunes;;
 }
Example #7
0
 public HomeController()
 {
     _fortunes = new FortuneService(DiscoveryConfig.DiscoveryClient, LoggingConfig.LoggerFactory);
     _logger   = LoggingConfig.LoggerFactory.CreateLogger <HomeController>();
 }
Example #8
0
 public HomeController(IFortuneService fortunes,  ILoggerFactory logFactory = null)
 {
     _fortunes = fortunes;
     _logger = logFactory?.CreateLogger<HomeController>();
 }
        public async Task <string> GoProductAsync([FromServices] IFortuneService service)
        {
            var a = "test'";

            return(await service.RandomFortuneAsync());
        }
 public RandomModel(IFortuneService fortuneService)
 {
     _fortuneService = fortuneService;
 }
Example #11
0
 public FortuneServiceCommand(IHystrixCommandOptions options, IFortuneService fortuneService) : base(options)
 {
     _fortuneService       = fortuneService;
     IsFallbackUserDefined = true;
 }
 public FortuneServiceCollapser(IHystrixCollapserOptions options, IFortuneService fortuneService, ILoggerFactory logFactory) : base(options)
 {
     _logger         = logFactory.CreateLogger <FortuneServiceCollapser>();
     _loggerFactory  = logFactory;
     _fortuneService = fortuneService;
 }
Example #13
0
 public FortunesController(ILogger <FortunesController> logger, IFortuneService fortunes)
 {
     _logger   = logger;
     _fortunes = fortunes;
 }