/// <summary> /// Initializes a new instance of the <see cref="ValuesController"/> class. /// </summary> /// <param name="valuesRepository">The values repository.</param> /// <param name="actionResultFactory">The action result factory.</param> public ValuesController( IValuesRepository valuesRepository, IHttpActionResultFactory actionResultFactory) { this.valuesRepository = valuesRepository ?? throw new ArgumentNullException(nameof(valuesRepository)); this.actionResultFactory = actionResultFactory ?? throw new ArgumentNullException(nameof(actionResultFactory)); }
public GetAllValuesHandler(IValuesRepository valuesRepository, ILogger <ValuesController> logger, IOptionsMonitor <MyTestConfig> myTestConfig, IMapper mapper) { _valuesRepository = valuesRepository; _logger = logger; _mapper = mapper; _myTestConfig = myTestConfig.CurrentValue; }
private static void AddValue(object sender, MsgHandlerEventArgs e) { _log.LogInfo(DateTime.Now.TimeOfDay.ToString()); var message = MessageSerializer.Deserializer <AddValueCommand>(e.Message.Data); var value = message.Value; var optionsBuilder = new DbContextOptionsBuilder <TemplateContext>(); optionsBuilder.UseSqlServer(Config.CONNECTION_STRING); try { using (var context = new TemplateContext(optionsBuilder.Options)) { _valueRepository = new ValueRepository(context, _log); var valueToInsert = new Value() { Description = value }; var insertTask = _valueRepository.InsertAsync(valueToInsert); insertTask.Wait(); if (insertTask.IsCompletedSuccessfully) { _log.LogInfo($"Processed message: {message.CorrelationId} at {DateTime.Now.TimeOfDay}"); } else { _log.LogInfo($"Failed to process message: {message.CorrelationId} with value: {value}"); } } } catch (Exception ex) { _log.LogInfo(ex.Message); _log.LogInfo(ex.StackTrace); } }
public ValuesController(IValuesRepository valuesRepository, IDistributedCache distributedCache, IMapper mapper) { _log = LogManager.GetCurrentClassLogger(); _valuesRepository = valuesRepository; _distributedCache = distributedCache; _mapper = mapper; }
public TestRunner(ITestRepository testRepo, IRuleProcessor ruleProcessor, IStateProcessor stateProcessor, IValuesRepository valuesRepository, ILifetimeScope scope) { _testRepository = testRepo; _ruleProcessor = ruleProcessor; _stateProcessor = stateProcessor; _valuesRepository = valuesRepository; _scope = scope; }
public HomeController(IValuesRepository repository) { if (repository == null) { throw new ArgumentNullException("repository"); } this._repository = repository; }
public SetValueCommand(IValuesRepository <string> repository) { if (repository == null) { throw new ArgumentNullException(nameof(repository)); } _repository = repository; }
public SetValueCommand(IValuesRepository repository) { if (repository == null) { throw new ArgumentNullException(); } _repository = repository; }
public GetValueQuery(IValuesRepository repository) { if (repository == null) { throw new ArgumentNullException(nameof(repository)); } _repository = repository; }
public SensorsManager( ISensorsRepository sensorsRepository, IValueTypesRepository valueTypesRepository, IValuesRepository valuesRepository ) { _sensorsRepository = sensorsRepository; _valueTypesRepository = valueTypesRepository; _valuesRepository = valuesRepository; }
public LoginPage(IUserRepository userRepository = null, INotifyPage notifyPage = null, IValuesRepository valuesRepository = null) { _userRepository = userRepository ?? DependencyService.Get<IUserRepository>(); _notifyPage = notifyPage ?? new NotifyPage(this); _valuesRepository = valuesRepository ?? DependencyService.Get<IValuesRepository>(); _userLoginModel = _userRepository.GetUserLoginModel(); BindingContext = _userLoginModel; InitializeComponent(); }
public GetAllValuesQuery(IValuesRepository <string> repository, IOptions <DefaultConfigurationValues> defaultConfigurationValues) { if (repository == null) { throw new ArgumentNullException(nameof(repository)); } if (defaultConfigurationValues == null) { throw new ArgumentNullException(nameof(defaultConfigurationValues)); } _repository = repository; _defaultConfigurationValues = defaultConfigurationValues.Value; }
public PersonalBackendBase( IValuesRepository valuesRepository, IKeyIdPairsRepository keyIdRepository) { if (valuesRepository == null) { throw new ArgumentNullException(nameof(valuesRepository)); } if (keyIdRepository == null) { throw new ArgumentNullException(nameof(keyIdRepository)); } _values = valuesRepository; _keyIdPairs = keyIdRepository; }
public ValuesController(IValuesRepository repository) { _repository = repository; }
public ValuesController(IValuesRepository valuesRepository) { m_valuesRepository = valuesRepository; }
public RouletteController(IValuesRepository valuesRepository) =>
public ValuesService(IValuesRepository valuesRepository) { _valuesRepository = valuesRepository; }
public ValuesController(IValuesRepository repo, ILinksService linksService) { this.repo = repo; this.linksService = linksService; }
public TestsController(ITestRepository testRepo, IEnumerable <ITest> tests, IValuesRepository valuesRepository) { _testRepo = testRepo; _tests = tests; _valuesRepository = valuesRepository; }
public PersonalBackendModel( IValuesRepository valuesRepository, IKeyIdPairsRepository keyIdRepository) : base(valuesRepository, keyIdRepository) { }
public ValuesFcd(IValuesRepository repo, IValuesService service, WebApiMapper mapper) : base(mapper) { _repo = repo; _service = service; }
public ValuesController(IValuesRepository valuesRepository) { this.valuesRepository = valuesRepository; }
public ValuesController(NatsBus bus, IValuesRepository valuesRepository, ILog log) { this._bus = bus; this._valuesRepository = valuesRepository; this._log = log; }
public ValuesController(IValuesRepository valuesRepository) { _values = valuesRepository; }
public ValuesController(IValuesRepository repo, ISomeHelper someHelper) { _repo = repo; _someHelper = someHelper; }
// resolving repository through constructor dependency public ValuesManager( IValuesRepository repository) { _repository = repository; }
public ValuesController(IValuesRepository repo) { this._repo = repo; }
public MessagesController(SimpleBotUser bot, IValuesRepository values) { _bot = bot; _values = values; }
public ValuesController(IValuesRepository repo, IMapper mapper) { _mapper = mapper; _repo = repo; }
public ValuesController() { _valuesRepository = CacheContainer.Get <ValuesRepository>(); }
public ValuesController(IValuesRepository context) { _context = context; }
public ValuesController(ValuesRepository _repository) { repository = _repository; }
/// <summary> /// Initializes a new instance of the <see cref="ValuesController"/> class. /// </summary> /// <param name="valuesRepository">The values repository.</param> public ValuesController(IValuesRepository valuesRepository) { this.valuesRepository = valuesRepository ?? throw new ArgumentNullException(nameof(valuesRepository)); }