public ItemAddViewModel(INavigationService navigationService, IToDoItemRepository toDoItemsRepository) { _navigationService = navigationService; _toDoItemsRepository = toDoItemsRepository; SaveItemCommand = new DelegateCommand(OnSaveItem); }
/// <summary> /// Seed sample data in the Todo container /// </summary> /// <param name="builder"></param> /// <returns></returns> public static async Task SeedToDoContainerIfEmptyAsync(this IApplicationBuilder builder) { using (IServiceScope serviceScope = builder.ApplicationServices.GetRequiredService <IServiceScopeFactory>().CreateScope()) { IToDoItemRepository _repo = serviceScope.ServiceProvider.GetService <IToDoItemRepository>(); // Check if empty string sqlQueryText = "SELECT * FROM c"; IEnumerable <ToDoItem> todos = await _repo.GetItemsAsync(sqlQueryText); if (todos.Count() == 0) { for (int i = 0; i < 100; i++) { ToDoItem beer = new ToDoItem() { Category = "Grocery", Title = $"Get {i} beers" }; await _repo.AddItemAsync(beer); } } } }
public ToDoItemsController( IToDoItemRepository toDoItemRepository, IMapper mapper) { _mapper = mapper; _ToDoItemService = toDoItemRepository; }
public ToDoItemListViewModel(IToDoItemRepository _toDoItemRepository, IDialogService _dialogService) { repository = _toDoItemRepository; dialogService = _dialogService; ToDoItems = new ObservableCollection <ToDoItem>(repository.GetToDoItems()); AddCommand = new DelegateCommand(Add, CanAdd); }
public MainPageViewModel(INavigationService navigationService, IToDoItemRepository toDoItemsRepository) { _navigationService = navigationService; _toDoItemsRepository = toDoItemsRepository; RefreshListViewCommand = new DelegateCommand(OnListViewRefreshing); }
/// <summary> /// Ctor /// </summary> /// <param name="repo"></param> /// <param name="mapper"></param> /// <param name="cachedToDoItemsService"></param> public QueryHandler(IToDoItemRepository repo, IMapper mapper, ICachedToDoItemsService cachedToDoItemsService) { this._repo = repo ?? throw new ArgumentNullException(nameof(repo)); this._mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); this._cachedToDoItemsService = cachedToDoItemsService ?? throw new ArgumentNullException(nameof(cachedToDoItemsService)); }
public StarterFunction(ILogger <StarterFunction> log, IEmailService emailService, IToDoItemRepository repo) { this._log = log ?? throw new ArgumentNullException(nameof(log)); this._emailService = emailService ?? throw new ArgumentNullException(nameof(emailService)); this._repo = repo ?? throw new ArgumentNullException(nameof(repo)); }
public ToDoItemCompletedDomainEventHandler( IToDoItemRepository todoRepository, ILoggerFactory logger, IAppIntegrationEventService appIntegrationEventService) { _todoRepository = todoRepository ?? throw new ArgumentNullException(nameof(todoRepository)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _appIntegrationEventService = appIntegrationEventService; }
public ToDoItemsListViewModel(IToDoItemRepository repository) { if (repository == null) { throw new ArgumentNullException("repository must not be null"); } this._repository = repository; this.LoadIncomplete(); }
public ToDoItemEditViewModel(IToDoItemRepository repository, int id) : this(repository) { if (id <= 0) { throw new ArgumentException("id must be greater than 0!"); } this.Load(id); }
/// <summary> /// Validator ctor /// </summary> public CreateToDoItemCommandValidator(IToDoItemRepository repo) { this._repo = repo ?? throw new ArgumentNullException(nameof(repo)); RuleFor(x => x.Category) .NotEmpty(); RuleFor(x => x.Title) .NotEmpty() .MustAsync(HasUniqueTitle).WithMessage("Title must be unique"); }
public ToDoItemDetailsViewModel(IToDoItemRepository repository) { if (repository == null) { throw new ArgumentNullException("repository must not be null"); } this._repository = repository; this.ToDoItem = new ToDoItem(); }
public ToDoItemTest() { var options = new DbContextOptionsBuilder <ToDoContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; var dbContext = new ToDoContext(options); _toDoListRepository = new ToDoListRepository(dbContext); _toDoItemRepository = new ToDoItemRepository(dbContext); _unitOfWork = new UnitOfWork(dbContext); }
public ToDoItemListPageViewModel(INavigationService navigationService, IToDoItemRepository toDoItemsRepository) { _navigationService = navigationService; _toDoItemsRepository = toDoItemsRepository; AddToDoItemCommand = new DelegateCommand(OnAddItem); ChangeStateCommand = new DelegateCommand <ToDoItem>(OnChangeState); EditItemCommand = new DelegateCommand(OnEditItem); DeleteCommand = new DelegateCommand <ToDoItem>(OnDeleteItem); RefreshListViewCommand = new DelegateCommand(OnListViewRefreshing); GoToAppSettingsCommand = new DelegateCommand(OnGoinngToAppSettings); }
public ToDoViewPresenter(ITodoView view, IToDoItemRepository repository, IActionExecutor actionExecutor, IMessageBoxPresenter messageBoxPresenter) { _view = view ?? throw new ArgumentNullException(nameof(view)); _repository = repository ?? throw new ArgumentNullException(nameof(repository)); _actionExecutor = actionExecutor ?? throw new ArgumentNullException(nameof(actionExecutor)); _messageBoxPresenter = messageBoxPresenter ?? throw new ArgumentNullException(nameof(messageBoxPresenter)); view.CloseButtonClick += view.Dispose; view.AddButtonClick += OnAddButtonClick; view.ToDoItemChecked += OnChangeItemChecked; view.Loaded += OnLoaded; }
public ToDoItemController(IUnitOfWork unitOfWork, IToDoListRepository toDoListRepository, IToDoItemRepository toDoItemRepository, IMapper mapper, IOperatorUser operatorUser) { _unitOfWork = unitOfWork; _toDoListRepository = toDoListRepository; _toDoItemRepository = toDoItemRepository; _mapper = mapper; _operatorUser = operatorUser; }
/// <summary> /// Validator ctor /// </summary> public UpdateToDoItemCommandValidator(IToDoItemRepository repo) { this._repo = repo ?? throw new ArgumentNullException(nameof(repo)); RuleFor(x => x.Id) .NotEmpty(); RuleFor(x => x.Category) .NotEmpty(); RuleFor(x => x.Title) .NotEmpty(); }
public ToDoItemEditViewModel(IToDoItemRepository repository) { if (repository == null) { throw new ArgumentNullException("repository must not be null"); } this._repository = repository; this.ToDoItem = new ToDoItem() { IsCompleted = false, ReminderIsEnabled = true, }; }
public MyListController( UserManager <ApplicationUser> userManager, IToDoItemRepository toDoItemRepository, ICategoryRepository categoryRepository, ILoggerFactory loggerFactory, IMemoryCache memoryCache, TempFavoritesService favoritesService) { this._userManager = userManager; this._toDoItemRepository = toDoItemRepository; this._categoryRepository = categoryRepository; this._logger = loggerFactory.CreateLogger <MyListController>(); this._cache = memoryCache; this._favoritesService = favoritesService; }
public ToDoItemBpc(IRepositoryFactory repositoryFactory, ILoggerFactory loggerFactory) { if (repositoryFactory == null) { throw new ArgumentNullException(nameof(repositoryFactory)); } if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); } _logger = loggerFactory.CreateLogger(nameof(ToDoItemBpc)); _repositoryFactory = repositoryFactory; _toDoItemRepository = _repositoryFactory.CreateTodoItemRepository(); }
public ToDoItemPageViewModel(INavigationService navigationService, IItemAnnouncementService itemAnnouncementService, IToDoItemRepository toDoItemsRepository, IVoiceRecognitionService voiceRecognitionService) { _navigationService = navigationService; _itemAnnouncementService = itemAnnouncementService; _voiceRecognitionService = voiceRecognitionService; _toDoItemsRepository = toDoItemsRepository; SaveItemCommand = new DelegateCommand(OnSaveItem); DeleteItemCommand = new DelegateCommand(OnDeleteItem); GoBackCommand = new DelegateCommand(OnGoBack); SpeakCommand = new DelegateCommand(OnSpeak); SpeechToTitleCommand = new DelegateCommand(OnSpeechToTitle); SpeechToNotesCommand = new DelegateCommand(OnSpeechToNotes); }
public StatisticsService(IToDoItemRepository toDoItemRepository) { _toDoItemRepository = toDoItemRepository; }
public ToDoController(IToDoItemRepository toDoItemRepository) { _toDoItemRepository = toDoItemRepository; }
public AddToDoItemCommandHandler(IToDoItemRepository repository) { _repository = repository; }
public GetOneToDoItemRequestHandler(IToDoItemRepository repo) { _repo = repo; }
public ToDoController(IToDoItemRepository toDoItemRepository) { _todoItemRepository = toDoItemRepository; }
public ToDoItemController(IToDoItemRepository taskRepository) { _taskRepository = taskRepository; }
public UpdateToDoItemStatusCommandHandler(IToDoItemRepository toDoItemRepository, ILogger <UpdateToDoItemStatusCommandHandler> logger) : base(toDoItemRepository, logger) { }
public HomeController(IToDoItemRepository toDoItemRepository, IStudentRepository studentRepository, IUnitOfWork unitOfWorkRepository) { _toDoItemRepository = toDoItemRepository; _studentRepository = studentRepository; _unitOfWorkRepository = unitOfWorkRepository; }
public MarkItemCompleteCommandHandler(IToDoItemRepository repository) { _repository = repository; }
/// <summary> /// Ctor /// </summary> /// <param name="repo"></param> /// <param name="mapper"></param> public CommandHandler(IToDoItemRepository repo, IMapper mapper) { this._repo = repo ?? throw new ArgumentNullException(nameof(repo)); this._mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }
public ToDoItemsController(IToDoItemRepository toDoItemsRepository) { _repository = toDoItemsRepository; }
public DeleteToDoItemCommandHandler(IToDoItemRepository toDoItemRepository, ILogger <DeleteToDoItemCommandHandler> logger) : base(toDoItemRepository, logger) { }
public ToDoItemService(IToDoItemRepository toDoItemRepository) { _toDoItemRepository = toDoItemRepository; }
public CreateToDoItemCommandHandler(IToDoItemRepository toDoItemRepository, IRepository <ToDoList> toDoListepository, ILogger <CreateToDoItemCommandHandler> logger) : base(toDoItemRepository, logger) { _toDoListRepository = toDoListepository; }
public StatasticsService(IToDoItemRepository toDoItemRepository) { _todoItemRepository = toDoItemRepository; }