/// <summary> /// Initialize override. /// </summary> public override void Initialize(object sender, SectionInitializeEventArgs e) { ThreadHelper.ThrowIfNotOnUIThread(); base.Initialize(sender, e); // Remain hidden when full GitHub extension is installed if (FullExtensionUtilities.IsInstalled(ServiceProvider)) { IsVisible = false; return; } RefreshVisibility(); if (ServiceProvider.GetService(typeof(ITeamExplorerPage)) is ITeamExplorerPage page) { if (page.GetSection(PushToRemoteSectionId) is ITeamExplorerSection pushToRemoteSection) { pushToRemoteSection.PropertyChanged += Section_PropertyChanged; } } PublishToGitHub = new RelayCommand(o => ShowPublishDialogAsync().Forget()); }
protected override ICodeContainerProvider CreateCodeContainerProvider(Guid provider) { ThreadHelper.ThrowIfNotOnUIThread(); var codeContainerProvider = FullExtensionUtilities.FindGitHubContainerProvider(this); if (codeContainerProvider != null) { return(codeContainerProvider); } return(new InBoxGitHubContainerProvider()); }