public GitHubConnectSection0(ISimpleApiClientFactory apiFactory,
     ITeamExplorerServiceHolder holder,
     IConnectionManager manager,
     IPackageSettings settings)
     : base(apiFactory, holder, manager, settings, 0)
 {
 }
 public GitHubHomeSection(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder)
     : base(apiFactory, holder)
 {
     Title = "GitHub";
     View = new GitHubHomeContent();
     View.DataContext = this;
 }
 public TeamExplorerSectionBase(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder)
     : base(apiFactory, holder)
 {
     IsVisible = false;
     IsEnabled = true;
     IsExpanded = true;
 }
示例#4
0
 public GraphsNavigationItem(ISimpleApiClientFactory apiFactory, Lazy <IVisualStudioBrowser> browser,
                             ITeamExplorerServiceHolder holder)
     : base(apiFactory, holder, Octicon.graph)
 {
     this.browser = browser;
     Text         = "Graphs";
     ArgbColor    = Colors.LightBlueNavigationItem.ToInt32();
 }
 public IssuesNavigationItem(ISimpleApiClientFactory apiFactory, Lazy <IVisualStudioBrowser> browser,
                             ITeamExplorerServiceHolder holder)
     : base(apiFactory, holder, Octicon.issue_opened)
 {
     this.browser = browser;
     Text         = Resources.IssuesNavigationItemText;
     ArgbColor    = Colors.LightBlueNavigationItem.ToInt32();
 }
示例#6
0
 public PullRequestsNavigationItem(ISimpleApiClientFactory apiFactory, Lazy <IVisualStudioBrowser> browser,
                                   ITeamExplorerServiceHolder holder)
     : base(apiFactory, holder, Octicon.git_pull_request)
 {
     this.browser = browser;
     Text         = "Pull Requests";
     ArgbColor    = Colors.RedNavigationItem.ToInt32();
 }
 public EnsureLoggedInSection(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,
                              IConnectionManager cm, IRepositoryHosts hosts, ITeamExplorerServices teServices)
     : base(apiFactory, holder, cm)
 {
     IsVisible       = false;
     this.hosts      = hosts;
     this.teServices = teServices;
 }
 public PullRequestsNavigationItem(ISimpleApiClientFactory apiFactory, Lazy<IVisualStudioBrowser> browser,
                             ITeamExplorerServiceHolder holder)
     : base(apiFactory, holder, Octicon.git_pull_request)
 {
     this.browser = browser;
     Text = Resources.PullRequestsNavigationItemText;
     ArgbColor = Colors.RedNavigationItem.ToInt32();
 }
 public PullRequestsNavigationItem(ISimpleApiClientFactory apiFactory, 
         ITeamExplorerServiceHolder holder, IMenuProvider menuProvider)
     : base(apiFactory, holder, Octicon.git_pull_request)
 {
     this.menuProvider = menuProvider;
     Text = Resources.PullRequestsNavigationItemText;
     ArgbColor = Colors.RedNavigationItem.ToInt32();
 }
 public EnsureLoggedInSection(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,
     IConnectionManager cm, IRepositoryHosts hosts, IVSServices vsServices)
     : base(apiFactory, holder, cm)
 {
     IsVisible = false;
     this.hosts = hosts;
     this.vsServices = vsServices;
 }
 public WikiNavigationItem(ISimpleApiClientFactory apiFactory, Lazy<IVisualStudioBrowser> browser,
                             ITeamExplorerServiceHolder holder)
     : base(apiFactory, holder, Octicon.book)
 {
     this.browser = browser;
     Text = Resources.WikiNavigationItemText;
     ArgbColor = Colors.BlueNavigationItem.ToInt32();
 }
 public PulseNavigationItem(ISimpleApiClientFactory apiFactory, Lazy<IVisualStudioBrowser> browser,
                             ITeamExplorerServiceHolder holder)
     : base(apiFactory, holder, Octicon.pulse)
 {
     this.browser = browser;
     Text = "Pulse";
     ArgbColor = Colors.LightBlueNavigationItem.ToInt32();
 }
 public GitHubConnectSection0(IGitHubServiceProvider serviceProvider,
     ISimpleApiClientFactory apiFactory,
     ITeamExplorerServiceHolder holder,
     IConnectionManager manager,
     IPackageSettings settings)
     : base(serviceProvider, apiFactory, holder, manager, settings, 0)
 {
 }
    static GitHubPaneViewModel CreateTarget(
        IViewViewModelFactory viewModelFactory   = null,
        ISimpleApiClientFactory apiClientFactory = null,
        IConnectionManager connectionManager     = null,
        ITeamExplorerContext teamExplorerContext = null,
        IVisualStudioBrowser browser             = null,
        IUsageTracker usageTracker     = null,
        INavigationViewModel navigator = null,
        ILoggedOutViewModel loggedOut  = null,
        INotAGitHubRepositoryViewModel notAGitHubRepository = null,
        INotAGitRepositoryViewModel notAGitRepository       = null,
        ILoginFailedViewModel loginFailed = null)
    {
        viewModelFactory     = viewModelFactory ?? Substitute.For <IViewViewModelFactory>();
        connectionManager    = connectionManager ?? Substitute.For <IConnectionManager>();
        teamExplorerContext  = teamExplorerContext ?? CreateTeamExplorerContext(ValidGitHubRepo);
        browser              = browser ?? Substitute.For <IVisualStudioBrowser>();
        usageTracker         = usageTracker ?? Substitute.For <IUsageTracker>();
        loggedOut            = loggedOut ?? Substitute.For <ILoggedOutViewModel>();
        notAGitHubRepository = notAGitHubRepository ?? Substitute.For <INotAGitHubRepositoryViewModel>();
        notAGitRepository    = notAGitRepository ?? Substitute.For <INotAGitRepositoryViewModel>();
        loginFailed          = loginFailed ?? Substitute.For <ILoginFailedViewModel>();

        if (navigator == null)
        {
            navigator = CreateNavigator();
            navigator.Content.Returns((IPanePageViewModel)null);
        }

        if (apiClientFactory == null)
        {
            var validGitHubRepoClient     = Substitute.For <ISimpleApiClient>();
            var validEnterpriseRepoClient = Substitute.For <ISimpleApiClient>();
            var invalidRepoClient         = Substitute.For <ISimpleApiClient>();

            validGitHubRepoClient.GetRepository().Returns(new Octokit.Repository(1));
            validEnterpriseRepoClient.GetRepository().Returns(new Octokit.Repository(1));
            validEnterpriseRepoClient.IsEnterprise().Returns(true);

            apiClientFactory = Substitute.For <ISimpleApiClientFactory>();
            apiClientFactory.Create(null).ReturnsForAnyArgs(invalidRepoClient);
            apiClientFactory.Create(ValidGitHubRepo).Returns(validGitHubRepoClient);
            apiClientFactory.Create(ValidEnterpriseRepo).Returns(validEnterpriseRepoClient);
        }

        return(new GitHubPaneViewModel(
                   viewModelFactory,
                   apiClientFactory,
                   connectionManager,
                   teamExplorerContext,
                   browser,
                   usageTracker,
                   navigator,
                   loggedOut,
                   notAGitHubRepository,
                   notAGitRepository,
                   loginFailed));
    }
示例#15
0
 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 PullRequestsNavigationItem(IGitHubServiceProvider serviceProvider,
                                   ISimpleApiClientFactory apiFactory,
                                   ITeamExplorerServiceHolder holder,
                                   IOpenPullRequestsCommand openPullRequests)
     : base(serviceProvider, apiFactory, holder, Octicon.git_pull_request)
 {
     this.openPullRequests = openPullRequests;
     Text      = Resources.PullRequestsNavigationItemText;
     ArgbColor = Colors.RedNavigationItem.ToInt32();
 }
示例#17
0
 public WikiNavigationItem(IGitHubServiceProvider serviceProvider,
                           ISimpleApiClientFactory apiFactory,
                           Lazy <IVisualStudioBrowser> browser,
                           ITeamExplorerServiceHolder holder)
     : base(serviceProvider, apiFactory, holder, Octicon.book)
 {
     this.browser = browser;
     Text         = Resources.WikiNavigationItemText;
     ArgbColor    = Colors.BlueNavigationItem.ToInt32();
 }
 public GitHubPaneViewModel(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,
                            IConnectionManager cm, IRepositoryHosts hosts)
     : base(apiFactory, holder)
 {
     this.connectionManager = cm;
     this.hosts             = hosts;
     syncContext            = SynchronizationContext.Current;
     CancelCommand          = ReactiveCommand.Create();
     Title = "GitHub";
 }
 public EnsureLoggedInSection(IGitHubServiceProvider serviceProvider,
                              ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,
                              IConnectionManager cm, ITeamExplorerServices teServices,
                              IDialogService dialogService)
     : base(serviceProvider, apiFactory, holder, cm)
 {
     IsVisible          = false;
     this.teServices    = teServices;
     this.dialogService = dialogService;
 }
示例#20
0
        public TeamExplorerSectionBase(IGitHubServiceProvider serviceProvider,
                                       ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,
                                       IConnectionManager cm) : this(serviceProvider, apiFactory, holder)
        {
            Guard.ArgumentNotNull(serviceProvider, nameof(serviceProvider));
            Guard.ArgumentNotNull(apiFactory, nameof(apiFactory));
            Guard.ArgumentNotNull(holder, nameof(holder));
            Guard.ArgumentNotNull(cm, nameof(cm));

            connectionManager = cm;
        }
示例#21
0
        public TeamExplorerItemBase(IGitHubServiceProvider serviceProvider,
                                    ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder)
            : base(serviceProvider)
        {
            Guard.ArgumentNotNull(serviceProvider, nameof(serviceProvider));
            Guard.ArgumentNotNull(apiFactory, nameof(apiFactory));
            Guard.ArgumentNotNull(holder, nameof(holder));

            this.apiFactory = apiFactory;
            this.holder     = holder;
        }
示例#22
0
 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)
 {
 }
示例#23
0
 public GitHubConnectSection1(IGitHubServiceProvider serviceProvider,
                              ISimpleApiClientFactory apiFactory,
                              ITeamExplorerServiceHolder holder,
                              IConnectionManager manager,
                              IPackageSettings settings,
                              IVSServices vsServices,
                              IRepositoryCloneService cloneService,
                              IDialogService dialogService)
     : base(serviceProvider, apiFactory, holder, manager, settings, vsServices, cloneService, dialogService, 1)
 {
 }
示例#24
0
        public TeamExplorerSectionBase(IGitHubServiceProvider serviceProvider,
                                       ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder)
            : base(serviceProvider, apiFactory, holder)
        {
            Guard.ArgumentNotNull(serviceProvider, nameof(serviceProvider));
            Guard.ArgumentNotNull(apiFactory, nameof(apiFactory));
            Guard.ArgumentNotNull(holder, nameof(holder));

            IsVisible  = false;
            IsEnabled  = true;
            IsExpanded = true;
        }
示例#25
0
        public ForkNavigationItem(IGitHubServiceProvider serviceProvider,
                                  ISimpleApiClientFactory apiFactory,
                                  ITeamExplorerServiceHolder holder,
                                  IDialogService dialogService,
                                  IUsageTracker usageTracker)
            : base(serviceProvider, apiFactory, holder, Octicon.repo_forked)
        {
            this.dialogService = dialogService;
            this.usageTracker  = usageTracker;

            Text      = Resources.ForkNavigationItemText;
            ArgbColor = Colors.PurpleNavigationItem.ToInt32();
            ConnectionManager.Connections.CollectionChanged += ConnectionsChanged;
        }
        public GitHubConnectSection(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder, IConnectionManager manager, int index)
            : base(apiFactory, holder, manager)
        {
            Title = "GitHub";
            IsEnabled = true;
            IsVisible = false;
            IsExpanded = true;
            LoggedIn = false;

            sectionIndex = index;

            connectionManager.Connections.CollectionChanged += RefreshConnections;
            PropertyChanged += OnPropertyChange;
            UpdateConnection();
        }
        public GitHubConnectSection(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder, IConnectionManager manager, int index)
            : base(apiFactory, holder, manager)
        {
            Title      = "GitHub";
            IsEnabled  = true;
            IsVisible  = false;
            IsExpanded = true;
            LoggedIn   = false;

            sectionIndex = index;

            connectionManager.Connections.CollectionChanged += RefreshConnections;
            PropertyChanged += OnPropertyChange;
            UpdateConnection();
        }
示例#28
0
        public GitHubHomeSection(IGitHubServiceProvider serviceProvider,
                                 ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,
                                 IVisualStudioBrowser visualStudioBrowser)
            : base(serviceProvider, apiFactory, holder)
        {
            Title                    = "GitHub";
            View                     = new GitHubHomeContent();
            View.DataContext         = this;
            this.visualStudioBrowser = visualStudioBrowser;

            var openOnGitHub = ReactiveCommand.Create();

            openOnGitHub.Subscribe(_ => DoOpenOnGitHub());
            OpenOnGitHub = openOnGitHub;
        }
        public TeamExplorerNavigationItemBase(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder, Octicon octicon)
            : base(apiFactory, holder)
        {
            this.octicon = octicon;

            IsVisible = false;
            IsEnabled = true;

            OnThemeChanged();
            VSColorTheme.ThemeChanged += _ =>
            {
                OnThemeChanged();
            };

            holder.Subscribe(this, UpdateRepo);
        }
        public TeamExplorerNavigationItemBase(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder, Octicon octicon)
            : base(apiFactory, holder)
        {
            this.octicon = octicon;

            IsVisible = false;
            IsEnabled = true;

            OnThemeChanged();
            VSColorTheme.ThemeChanged += _ =>
            {
                OnThemeChanged();
            };

            holder.Subscribe(this, UpdateRepo);
        }
 public GitHubPublishSection(IGitHubServiceProvider serviceProvider,
                             ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,
                             IConnectionManager cm, Lazy <IVisualStudioBrowser> browser)
     : base(serviceProvider, apiFactory, holder, cm)
 {
     lazyBrowser    = browser;
     Title          = Resources.GitHubPublishSectionTitle;
     Name           = "GitHub";
     Provider       = "GitHub, Inc";
     Description    = Resources.BlurbText;
     ShowLogin      = false;
     ShowSignup     = false;
     ShowGetStarted = false;
     IsVisible      = false;
     IsExpanded     = true;
     InitializeSectionView();
 }
示例#32
0
        public GitHubPaneViewModel(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,
                                   IConnectionManager cm, IRepositoryHosts hosts, INotificationDispatcher notifications)
            : base(apiFactory, holder)
        {
            this.connectionManager = cm;
            this.hosts             = hosts;
            syncContext            = SynchronizationContext.Current;
            CancelCommand          = ReactiveCommand.Create();
            Title   = "GitHub";
            Message = String.Empty;

            this.WhenAnyValue(x => x.Control.DataContext)
            .OfType <BaseViewModel>()
            .Select(x => x.WhenAnyValue(y => y.Title))
            .Switch()
            .Subscribe(x => Title = x ?? "GitHub");
        }
示例#33
0
        public GitHubPaneViewModel(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,
            IConnectionManager cm, IRepositoryHosts hosts, INotificationDispatcher notifications)
            : base(apiFactory, holder)
        {
            this.connectionManager = cm;
            this.hosts = hosts;
            syncContext = SynchronizationContext.Current;
            CancelCommand = ReactiveCommand.Create();
            Title = "GitHub";
            Message = String.Empty;

            this.WhenAnyValue(x => x.Control.DataContext)
                .OfType<BaseViewModel>()
                .Select(x => x.WhenAnyValue(y => y.Title))
                .Switch()
                .Subscribe(x => Title = x ?? "GitHub");
        }
        public TeamExplorerNavigationItemBase(IGitHubServiceProvider serviceProvider,
                                              ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder, Octicon octicon)
            : base(serviceProvider, apiFactory, holder)
        {
            this.octicon = octicon;

            IsVisible = false;
            IsEnabled = true;

            OnThemeChanged();
            VSColorTheme.ThemeChanged += _ =>
            {
                OnThemeChanged();
                Invalidate();
            };

            // Navigation items need to listen for repo change events before they're visible
            SubscribeToRepoChanges();
        }
示例#35
0
        public GitHubPaneViewModel(IGitHubServiceProvider serviceProvider,
                                   ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,
                                   IConnectionManager cm, IRepositoryHosts hosts, IUIProvider uiProvider)
            : base(serviceProvider, apiFactory, holder)
        {
            this.connectionManager = cm;
            this.hosts             = hosts;
            this.uiProvider        = uiProvider;

            CancelCommand = ReactiveCommand.Create();
            Title         = "GitHub";
            Message       = String.Empty;

            this.WhenAnyValue(x => x.Control.DataContext)
            .OfType <BaseViewModel>()
            .Select(x => x.WhenAnyValue(y => y.Title))
            .Switch()
            .Subscribe(x => Title = x ?? "GitHub");
        }
示例#36
0
        public GitHubPublishSection(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,
            IConnectionManager cm, Lazy<IVisualStudioBrowser> browser,
            IRepositoryHosts hosts)
            : base(apiFactory, holder, cm)
        {

            lazyBrowser = browser;
            this.hosts = hosts;
            Title = Resources.GitHubPublishSectionTitle;
            Name = "GitHub";
            Provider = "GitHub, Inc";
            Description = Resources.BlurbText;
            ShowLogin = false;
            ShowSignup = false;
            ShowGetStarted = false;
            IsVisible = false;
            IsExpanded = true;
            InitializeSectionView();
        }
        public GitHubConnectSection(IGitHubServiceProvider serviceProvider,
                                    ISimpleApiClientFactory apiFactory,
                                    ITeamExplorerServiceHolder holder,
                                    IConnectionManager manager,
                                    IPackageSettings packageSettings,
                                    int index)
            : base(serviceProvider, apiFactory, holder, manager)
        {
            Title        = "GitHub";
            IsEnabled    = true;
            IsVisible    = false;
            LoggedIn     = false;
            sectionIndex = index;

            this.packageSettings = packageSettings;

            connectionManager.Connections.CollectionChanged += RefreshConnections;
            PropertyChanged += OnPropertyChange;
            UpdateConnection();
        }
示例#38
0
        public GitHubHomeSection(IGitHubServiceProvider serviceProvider,
                                 ISimpleApiClientFactory apiFactory,
                                 ITeamExplorerServiceHolder holder,
                                 IVisualStudioBrowser visualStudioBrowser,
                                 ITeamExplorerServices teamExplorerServices,
                                 IPackageSettings settings,
                                 IUsageTracker usageTracker)
            : base(serviceProvider, apiFactory, holder)
        {
            Title                     = "GitHub";
            View                      = new GitHubHomeContent();
            View.DataContext          = this;
            this.visualStudioBrowser  = visualStudioBrowser;
            this.teamExplorerServices = teamExplorerServices;
            this.settings             = settings;
            this.usageTracker         = usageTracker;

            var openOnGitHub = ReactiveCommand.Create();

            openOnGitHub.Subscribe(_ => DoOpenOnGitHub());
            OpenOnGitHub = openOnGitHub;

            // We want to display a welcome message but only if Team Explorer isn't
            // already displaying the "Install 3rd Party Tools" message. To do this
            // we need to set a timer and check in the tick as at this point the message
            // won't be initialized.
            if (!settings.HideTeamExplorerWelcomeMessage)
            {
                var timer = new DispatcherTimer();
                timer.Interval = new TimeSpan(10);
                timer.Tick    += (s, e) =>
                {
                    timer.Stop();
                    if (!IsGitToolsMessageVisible())
                    {
                        ShowWelcomeMessage();
                    }
                };
                timer.Start();
            }
        }
        public GitHubPublishSection(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,
                                    IConnectionManager cm, Lazy <IVisualStudioBrowser> browser,
                                    IRepositoryHosts hosts)
            : base(apiFactory, holder, cm)
        {
            lazyBrowser    = browser;
            this.hosts     = hosts;
            Title          = "Publish to GitHub";
            Name           = "GitHub";
            Provider       = "GitHub, Inc";
            Description    = "Powerful collaboration, code review, and code management for open source and private projects.";
            ShowLogin      = false;
            ShowSignup     = false;
            ShowGetStarted = false;
            IsVisible      = false;
            IsExpanded     = true;
            var view = new GitHubInvitationContent();

            SectionContent   = view;
            view.DataContext = this;
        }
示例#40
0
        public GitHubPublishSection(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,
                                    IConnectionManager cm, Lazy <IVisualStudioBrowser> browser,
                                    IRepositoryHosts hosts)
            : base(apiFactory, holder, cm)
        {
            lazyBrowser    = browser;
            this.hosts     = hosts;
            Title          = Resources.GitHubPublishSectionTitle;
            Name           = "GitHub";
            Provider       = "GitHub, Inc";
            Description    = Resources.BlurbText;
            ShowLogin      = false;
            ShowSignup     = false;
            ShowGetStarted = false;
            IsVisible      = false;
            IsExpanded     = true;
            var view = new GitHubInvitationContent();

            SectionContent   = view;
            view.DataContext = this;
        }
        public GitHubPublishSection(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,
            IConnectionManager cm, Lazy<IVisualStudioBrowser> browser,
            IRepositoryHosts hosts)
            : base(apiFactory, holder, cm)
        {

            lazyBrowser = browser;
            this.hosts = hosts;
            Title = "Publish to GitHub";
            Name = "GitHub";
            Provider = "GitHub, Inc";
            Description = "Powerful collaboration, code review, and code management for open source and private projects.";
            ShowLogin = false;
            ShowSignup = false;
            ShowGetStarted = false;
            IsVisible = false;
            IsExpanded = true;
            var view = new GitHubInvitationContent();
            SectionContent = view;
            view.DataContext = this;
        }
示例#42
0
        public GitHubHomeSection(IGitHubServiceProvider serviceProvider,
                                 ISimpleApiClientFactory apiFactory,
                                 ITeamExplorerServiceHolder holder,
                                 IVisualStudioBrowser visualStudioBrowser,
                                 ITeamExplorerServices teamExplorerServices,
                                 IPackageSettings settings,
                                 IUsageTracker usageTracker)
            : base(serviceProvider, apiFactory, holder)
        {
            Title                     = "GitHub";
            View                      = new GitHubHomeContent();
            View.DataContext          = this;
            this.visualStudioBrowser  = visualStudioBrowser;
            this.teamExplorerServices = teamExplorerServices;
            this.settings             = settings;
            this.usageTracker         = usageTracker;

            var openOnGitHub = new RelayCommand(_ => DoOpenOnGitHub());

            OpenOnGitHub = openOnGitHub;
        }
示例#43
0
        public GitHubConnectSection(IGitHubServiceProvider serviceProvider,
                                    ISimpleApiClientFactory apiFactory,
                                    ITeamExplorerServiceHolder holder,
                                    IConnectionManager manager,
                                    IPackageSettings packageSettings,
                                    IVSServices vsServices,
                                    IRepositoryCloneService cloneService,
                                    IDialogService dialogService,
                                    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(cloneService, nameof(cloneService));
            Guard.ArgumentNotNull(dialogService, nameof(dialogService));
            Guard.ArgumentNotNull(localRepositories, nameof(localRepositories));

            Title        = "GitHub";
            IsEnabled    = true;
            IsVisible    = false;
            LoggedIn     = false;
            sectionIndex = index;

            this.packageSettings   = packageSettings;
            this.vsServices        = vsServices;
            this.cloneService      = cloneService;
            this.dialogService     = dialogService;
            this.localRepositories = localRepositories;

            Clone = CreateAsyncCommandHack(DoClone);

            connectionManager.Connections.CollectionChanged += RefreshConnections;
            PropertyChanged += OnPropertyChange;
            UpdateConnection();
        }
 public GitHubConnectSection1(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder, IConnectionManager manager)
     : base(apiFactory, holder, manager, 1)
 {
 }
 public TeamExplorerSectionBase(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,
     IConnectionManager cm) : this(apiFactory, holder)
 {
     connectionManager = cm;
 }
 public TeamExplorerItemBase(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder)
 {
     this.apiFactory = apiFactory;
     this.holder = holder;
 }
 public EnsureLoggedInSectionSync(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,
     IConnectionManager cm, IRepositoryHosts hosts, ITeamExplorerServices teServices)
     : base(apiFactory, holder, cm, hosts, teServices)
 {}