public HelloModule(Stopwatch watch, IHelloRepository repo) : base("api") { this.repo = repo; this.watch = watch; this.watch.Restart(); this.Get <HelloRequest, HelloResponse>(nameof(Hello), HelloOp); }
public BotAnswerer() { _questionRepository = new QuestionRepository(QuestionRepositoryFilePath); _aphorismRepository = new AphorismsRepository(AphorismRepositoryFilePath); _byeRepository = new ByeRepository(ByeRepositoryFilePath); _helloRepository = new HelloRepository(HelloRepositoryFilePath); _jokesRepository = new JokesRepository(JokesRepositoryFilePath); _myNameRepository = new MyNameRepository(MyNameRepositoryFilePath); }
public PhotoController(IHelloRepository repo, IMapper mapper, IOptions <CloudinarySettings> cloudinarySettings) { _cloudinarySettings = cloudinarySettings; _repo = repo; _mapper = mapper; var account = new Account(_cloudinarySettings.Value.CloudName, _cloudinarySettings.Value.ApiKey, _cloudinarySettings.Value.ApiSecret); _cloudinary = new Cloudinary(account); }
public HelloModule(IHelloRepository repository, AppSettings settings) { int cacheTimespan = settings.Cache.CacheTimespan; Get <GetHello>("/Hello/{name}", (req, res) => { string name = req.RouteValues.As <string>("name"); return(res.ExecHandler(cacheTimespan, () => repository.SayHello(name))); }); }
public BotThread() { Questions = new Queue <string>(); _cancellationTokenSource = new CancellationTokenSource(); _questionRepository = new QuestionRepository(QuestionRepositoryFilePath); _aphorismRepository = new AphorismsRepository(AphorismRepositoryFilePath); _byeRepository = new ByeRepository(ByeRepositoryFilePath); _helloRepository = new HelloRepository(HelloRepositoryFilePath); _jokesRepository = new JokesRepository(JokesRepositoryFilePath); _myNameRepository = new MyNameRepository(MyNameRepositoryFilePath); }
public MessageController(IHelloRepository repo, IMapper mapper) { _repo = repo; _mapper = mapper; }
public HelloActorService(ILogger <HelloActorService> logger, IStateManager stateManager, IHelloRepository helloRepository) { this.logger = logger; this.stateManager = stateManager; this.helloRepository = helloRepository; }
public HelloController(IHelloRepository helloRepository) { HelloRepository = helloRepository; }
public HelloServiceGrpcImpl(IHelloRepository helloRepository) { _helloRepository = helloRepository; }
public SayHelloControllerTests() { languageCodeValidator = Substitute.For <ILanguageCodeValidator>(); hellosRepository = Substitute.For <IHelloRepository>(); controller = new SayHelloController(languageCodeValidator, hellosRepository); }
public SayHelloController(ILanguageCodeValidator languageCodeValidator, IHelloRepository hellosRepository) { this.languageCodeValidator = languageCodeValidator; this.hellosRepository = hellosRepository; }
public HelloWorldService(IHelloRepository repository) { _repository = repository; }
public HelloService(IHelloRepository helloRepository) { this.HelloRepository = helloRepository; }