public ItemController(ITodoItemsService itemService) { if (itemService == null) throw new ArgumentNullException(nameof(itemService)); _itemService = itemService; }
public ToDoController( ITodoItemsService todoItemsService, UserManager <ApplicationUser> userManager) { _userManager = userManager; _todoItemsService = todoItemsService; }
public MessagingTodoItemsServiceDecorator( ITodoItemsService decorated, IBus bus) { _decorated = decorated; _bus = bus; }
public ItemsController( TodoContext context, ITodoItemsService service) { _context = context; _service = service; }
public _Default(IBlogService blogService, ITodoItemsService todoItemsService, ICombinedService combinedService, ISingletonObject singleton) { _blogService = blogService; _todoItemsService = todoItemsService; _combinedService = combinedService; _singleton = singleton; }
public MainWindowVm(ITodoItemsService todoItemsService, IUsersService usersService) { this.usersService = usersService; this.todoItemsService = todoItemsService; todoItems = new ObservableCollection <TodoItemVm>(); newTodoItemPlaceholder = new TodoItemVm(); viewModelDisposed = new Subject <MainWindowVm>(); //AddTodoItemCommand = ReactiveCommand.CreateAsyncObservable<object>((arg) => //{ //}); //AddTodoItemCommand.Subscribe(e => //{ // var todoItem = new TodoItem(); // todoItem.Name = "New item"; // todoItemsService.Add(todoItem); //}); this.todoItemsService.TodoItemAdded .TakeUntil(viewModelDisposed) .Subscribe(todoItem => { var viewModel = new TodoItemVm(todoItem); todoItems.Add(viewModel); }); }
public ItemController(ITodoItemsService itemService) { if (itemService == null) { throw new ArgumentNullException(nameof(itemService)); } _itemService = itemService; }
public TodoItemsDetailsVm(ITodoItemsService todoItemsService) { this.todoItemsService = todoItemsService; CurrentTodoItem = todoItemsService.CurrentTodoItem.Select(todoItem => { return(new TodoItemVm(todoItem)); }); }
public CombinedService(ILogger logger, IBlogService blogService, ITodoItemsService todoItemsService) { _logger = logger; Id = Guid.NewGuid(); BlogService = blogService; TodoItemsService = todoItemsService; _logger.Information("CombinedService Constructor called. {Id}", Id); }
public TodoApp() { InitializeComponent(); // Service = new FakeDataService(); Service = new TodoItemsLocalDbService(); MainPage = new NavigationPage(new Views.TodoItemsView() { BindingContext = new TodoListItemsViewModel(Service) }); }
public TodoItemViewModel(ITodoItemsService service, TodoItem item) { _service = service; _item = item; SaveCommand = new Command(async() => await SaveItem()); DeleteCommand = new Command(async() => await DeleteItem()); CancelCommand = new Command(async() => await ClosePage()); }
public ListsController(ITodoItemsService itemService, ITodoListsService listService) { if (itemService == null) throw new ArgumentNullException(nameof(itemService)); if(listService == null) throw new ArgumentNullException(nameof(listService)); _itemService = itemService; _listService = listService; }
public MainPageViewModel( IAuthenticator authenticator, INavigationService navigationService, ITodoItemsService todoItemsService, IUserService userService, ISyncService syncService) { _authenticator = authenticator; _navigationService = navigationService; _todoItemsService = todoItemsService; _userService = userService; _authenticator = authenticator; }
public ListsController(ITodoItemsService itemService, ITodoListsService listService) { if (itemService == null) { throw new ArgumentNullException(nameof(itemService)); } if (listService == null) { throw new ArgumentNullException(nameof(listService)); } _itemService = itemService; _listService = listService; }
public TodoItemsListVm(ITodoItemsService todoItemsService) { this.todoItemsService = todoItemsService; // Firstly get all items, and after that watch to changes. todoItemsService.GetAll() .Select(items => items.Select(todoItem => new TodoItemVm(todoItem))) .Do(items => TodoItems.AddRange(items)) .SelectMany(_ => todoItemsService.TodoItemAdded) .Subscribe(todoItem => TodoItems.Add(new TodoItemVm(todoItem))); this.WhenAnyValue(x => x.SelectedTodoItem) .Where(todoItem => todoItem != null) .Select(todoItem => todoItem.Model) .SelectMany(todoItem => todoItemsService.SetCurrentTodoItem(todoItem)) .Subscribe(); }
public StaticVm(ITodoItemsService todoItemsService) { this.todoItemsService = todoItemsService; var allItems = todoItemsService.GetAll() .SelectMany(items => items); Observable.Merge(allItems, todoItemsService.TodoItemAdded) .Scan(this, (acc, todoItem) => { acc.TotalItems++; acc.TotalDuration += todoItem.Duration; acc.AverageDuration += acc.TotalDuration / totalItems; acc.MinDuration = Math.Min(acc.MinDuration, todoItem.Duration); acc.MaxDuration = Math.Min(acc.MaxDuration, todoItem.Duration); return(this); }).Subscribe(); }
public CreateTodoItemVm(ITodoItemsService todoItemsService) { this.todoItemsService = todoItemsService; CreateCommand = ReactiveCommand.CreateAsyncObservable(item => { var todoItem = new TodoItem(); todoItem.Name = Name; todoItem.Description = Description; todoItem.Duration = Duration; return(todoItemsService.Add(todoItem)); }); CreateCommand.Subscribe(_ => { Name = Description = null; Duration = 1; }); }
public MainWindow(ITodoItemsService todoItemsService) { InitializeComponent(); _todoItemsService = todoItemsService; FillTodoItemsList(); }
public TodoItemsController(ITodoItemsService service) { _service = service; }
public TodoItemsController(IBusPublisher busPublisher, ITracer tracer, ITodoItemsService todoItemsService) : base(busPublisher, tracer) { _todoItemsService = todoItemsService; }
public TodoController(ITodoItemsService service) { this.service = service; }
public TodoItemsController(ITodoItemsService todoItemsService) { _todoItemsService = todoItemsService; }
public TodoItemsController(ITodoItemsService itemsService) { _itemsService = itemsService; }
public TodoListItemsViewModel(ITodoItemsService service) { _service = service; SortByCommand = new Command <string>(SortByColumn); }