public GitHubConnectSection(IGitHubServiceProvider serviceProvider, ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder, IConnectionManager manager, IPackageSettings packageSettings, IVSServices vsServices, ILocalRepositories localRepositories, int index) : base(serviceProvider, apiFactory, holder, manager) { Guard.ArgumentNotNull(apiFactory, nameof(apiFactory)); Guard.ArgumentNotNull(holder, nameof(holder)); Guard.ArgumentNotNull(manager, nameof(manager)); Guard.ArgumentNotNull(packageSettings, nameof(packageSettings)); Guard.ArgumentNotNull(vsServices, nameof(vsServices)); Guard.ArgumentNotNull(localRepositories, nameof(localRepositories)); Title = "GitHub"; IsEnabled = true; IsVisible = false; LoggedIn = false; sectionIndex = index; this.packageSettings = packageSettings; this.vsServices = vsServices; this.localRepositories = localRepositories; Clone = CreateAsyncCommandHack(DoClone); connectionManager.Connections.CollectionChanged += RefreshConnections; PropertyChanged += OnPropertyChange; UpdateConnection(); }
/// <summary> /// Gets a derived collection that contains all known repositories with the specified /// clone URL, ordered by name. /// </summary> /// <param name="repos">The local repositories object.</param> /// <param name="address">The address.</param> public static IReactiveDerivedList <LocalRepositoryModel> GetRepositoriesForAddress( this ILocalRepositories repos, HostAddress address) { return(repos.Repositories.CreateDerivedCollection( x => x, x => x.CloneUrl != null && address.Equals(HostAddress.Create(x.CloneUrl)), OrderedComparer <LocalRepositoryModel> .OrderBy(x => x.Name).Compare)); }
public GitHubConnectSection1(IGitHubServiceProvider serviceProvider, ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder, IConnectionManager manager, IPackageSettings settings, IVSServices vsServices, ILocalRepositories localRepositories) : base(serviceProvider, apiFactory, holder, manager, settings, vsServices, localRepositories, 1) { }
public GitHubConnectSection0(IGitHubServiceProvider serviceProvider, ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder, IConnectionManager manager, IPackageSettings settings, ITeamExplorerServices teamExplorerServices, ILocalRepositories localRepositories, IUsageTracker usageTracker) : base(serviceProvider, apiFactory, holder, manager, settings, teamExplorerServices, localRepositories, usageTracker, 0) { }
public GitHubConnectSection(IGitHubServiceProvider serviceProvider, ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder, IConnectionManager manager, IPackageSettings packageSettings, ITeamExplorerServices teamExplorerServices, ILocalRepositories localRepositories, IUsageTracker usageTracker, int index) : base(serviceProvider, apiFactory, holder, manager) { Guard.ArgumentNotNull(apiFactory, nameof(apiFactory)); Guard.ArgumentNotNull(holder, nameof(holder)); Guard.ArgumentNotNull(manager, nameof(manager)); Guard.ArgumentNotNull(packageSettings, nameof(packageSettings)); Guard.ArgumentNotNull(teamExplorerServices, nameof(teamExplorerServices)); Guard.ArgumentNotNull(localRepositories, nameof(localRepositories)); Guard.ArgumentNotNull(usageTracker, nameof(usageTracker)); Title = "GitHub"; IsEnabled = true; IsVisible = false; sectionIndex = index; this.apiFactory = apiFactory; this.holder = holder; this.packageSettings = packageSettings; this.teamExplorerServices = teamExplorerServices; this.localRepositories = localRepositories; this.usageTracker = usageTracker; Clone = ReactiveCommand.CreateFromTask(DoClone); ConnectionManager.Connections.CollectionChanged += RefreshConnections; PropertyChanged += OnPropertyChange; UpdateConnection(); }