This repository was archived by the owner on Jun 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathForkRepositoryExecuteViewModelDesigner.cs
More file actions
65 lines (49 loc) · 1.93 KB
/
ForkRepositoryExecuteViewModelDesigner.cs
File metadata and controls
65 lines (49 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
using System;
using System.Reactive;
using System.Threading.Tasks;
using GitHub.Models;
using GitHub.ViewModels;
using GitHub.ViewModels.Dialog;
using Octokit;
using ReactiveUI;
using IConnection = GitHub.Models.IConnection;
namespace GitHub.SampleData
{
public class ForkRepositoryExecuteViewModelDesigner : ViewModelBase, IForkRepositoryExecuteViewModel
{
public ForkRepositoryExecuteViewModelDesigner()
{
SourceRepository = new RemoteRepositoryModelDesigner
{
Owner = "github",
Name = "VisualStudio",
CloneUrl = "https://github.com/github/VisualStudio",
};
DestinationRepository = new RemoteRepositoryModelDesigner
{
Owner = "user",
Name = "VisualStudio",
CloneUrl = "https://github.com/user/VisualStudio",
};
DestinationAccount = new AccountDesigner();
}
public IObservable<object> Done => null;
public IObservable<Unit> Back => null;
public string Title => null;
public RepositoryModel SourceRepository { get; set; }
public RepositoryModel DestinationRepository { get; set; }
public IAccount DestinationAccount { get; }
public ReactiveCommand<Unit, Repository> CreateFork => null;
public ReactiveCommand<Unit, Unit> BackCommand => null;
public bool ResetMasterTracking { get; set; } = true;
public bool AddUpstream { get; set; } = true;
public bool UpdateOrigin { get; set; } = true;
public bool CanAddUpstream => UpdateOrigin;
public bool CanResetMasterTracking => UpdateOrigin && AddUpstream;
public string Error { get; } = "I AM ERROR";
public Task InitializeAsync(LocalRepositoryModel sourceRepository, IAccount destinationAccount, IConnection connection)
{
return Task.CompletedTask;
}
}
}