8000 Remove RepositoryHost(s) by grokys · Pull Request #1283 · github/VisualStudio · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Remove RepositoryHost(s) #1283

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
WIP: Removing RepositoryHost(s)
  • Loading branch information
grokys committed Oct 26, 2017
commit f854b79087a99cc631f8f245acb0f08330d79b7a
10 changes: 3 additions & 7 deletions src/GitHub.App/Controllers/UIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ internal enum Trigger

readonly IUIFactory factory;
readonly IGitHubServiceProvider gitHubServiceProvider;
readonly IRepositoryHosts hosts;
readonly IConnectionManager connectionManager;

readonly CompositeDisposable disposables = new CompositeDisposable();
Expand Down Expand Up @@ -140,25 +139,22 @@ internal enum Trigger

public UIController(IGitHubServiceProvider serviceProvider)
: this(serviceProvider,
serviceProvider.TryGetService<IRepositoryHosts>(),
serviceProvider.TryGetService<IUIFactory>(),
serviceProvider.TryGetService<IConnectionManager>())
{
Guard.ArgumentNotNull(serviceProvider, nameof(serviceProvider));
}

public UIController(IGitHubServiceProvider gitHubServiceProvider,
IRepositoryHosts hosts, IUIFactory factory,
IUIFactory factory,
IConnectionManager connectionManager)
{
Guard.ArgumentNotNull(gitHubServiceProvider, nameof(gitHubServiceProvider));
Guard.ArgumentNotNull(hosts, nameof(hosts));
Guard.ArgumentNotNull(factory, nameof(factory));
Guard.ArgumentNotNull(connectionManager, nameof(connectionManager));

this.factory = factory;
this.gitHubServiceProvider = gitHubServiceProvider;
this.hosts = hosts;
this.connectionManager = connectionManager;

#if DEBUG
Expand Down Expand Up @@ -220,7 +216,7 @@ public void Start()
else // sanity check: it makes zero sense to pass a connection in when calling the auth flow
Debug.Assert(false, "Calling the auth flow with a connection makes no sense!");

hosts.EnsureInitialized().ToObservable()
connectionManager.GetLoadedConnections().ToObservable()
.ObserveOn(RxApp.MainThreadScheduler)
.Subscribe(_ => { }, () =>
{
Expand All @@ -231,7 +227,7 @@ public void Start()
else
{
connectionManager
.GetLoggedInConnections(hosts)
.GetLoggedInConnections()
.FirstOrDefaultAsync()
.Select(c =>
{
Expand Down
37 changes: 0 additions & 37 deletions src/GitHub.App/Factories/RepositoryHostFactory.cs

This file was deleted.

4 changes: 0 additions & 4 deletions src/GitHub.App/GitHub.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,6 @@
<Compile Include="Info\GitHubUrls.cs" />
<Compile Include="Infrastructure\ExportWrappers.cs" />
<Compile Include="Models\Account.cs" />
<Compile Include="Models\DisconnectedRepositoryHosts.cs" />
<Compile Include="Models\RepositoryHost.cs" />
<Compile Include="Models\RepositoryHosts.cs" />
<Compile Include="Models\RemoteRepositoryModel.cs" />
<Compile Include="SampleData\SampleViewModels.cs" />
<Compile Include="Api\ApiClient.cs" />
Expand All @@ -209,7 +206,6 @@
<Compile Include="UserErrors\PrivateRepositoryQuotaExceededUserError.cs" />
<Compile Include="ViewModels\PanePageViewModelBase.cs" />
<Compile Include="ViewModels\DialogViewModelBase.cs" />
<Compile Include="Models\ConnectionRepositoryHostMap.cs" />
<Compile Include="ViewModels\GistCreationViewModel.cs" />
<Compile Include="ViewModels\NotAGitRepositoryViewModel.cs" />
<Compile Include="ViewModels\NotAGitHubRepositoryViewModel.cs" />
Expand Down
34 changes: 0 additions & 34 deletions src/GitHub.App/Models/ConnectionRepositoryHostMap.cs

This file was deleted.

52 changes: 0 additions & 52 deletions src/GitHub.App/Models/DisconnectedRepositoryHosts.cs

This file was deleted.

39 changes: 0 additions & 39 deletions src/GitHub.App/Models/RepositoryHost.cs

This file was deleted.

Loading
0