public void Initialize(ViewRequest viewRequest) { if (viewRequest is IssueViewRequest request) { scope = request.Scope; board = request.Board; mapper.Map(new LocalIssue(), this); IssueChanged = false; Observable.FromAsync(() => scope.GetRowsByBoardIdAsync(board.Id)) .ObserveOnDispatcher() .Subscribe(rows => { AwailableRows.PublishCollection(rows); Row = AwailableRows.First(); }); Observable.FromAsync(() => scope.GetColumnsByBoardIdAsync(board.Id)) .ObserveOnDispatcher() .Subscribe(columns => { AwailableColumns.PublishCollection(columns); Column = AwailableColumns.First(); }); var issueId = request.IssueId; if (issueId != null && issueId > 0) { Observable.FromAsync(() => scope.LoadOrCreateIssueAsync(issueId)) .ObserveOnDispatcher() .Subscribe(issue => { mapper.Map(issue, this); Row = AwailableRows.First(r => r.Id == Row.Id); Column = AwailableColumns.First(c => c.Id == Column.Id); }); } } Title = $"Редактирование задачи {Head}"; IsOpened = true; }