/// <returns>false if handling the scc provider is disabled for this Rcs type</returns> private static bool RegisterGitScc(out Guid packageGuid, out Guid sccProviderGuid, out SccProvider provider) { ThreadHelper.ThrowIfNotOnUIThread(); GitSccProvider gitProvider = GetGitSccProvider(); if (gitProvider == GitSccProvider.Default) { gitProvider = GetDefaultGitSccProvider(); } if (gitProvider == GitSccProvider.Disabled) { packageGuid = new Guid(); sccProviderGuid = new Guid(); provider = SccProvider.Unknown; return(false); } switch (gitProvider) { case GitSccProvider.VisualStudioToolsForGit: { packageGuid = GetSccInstalledPackageId(VSToolsForGitPackageIds); sccProviderGuid = new Guid(VSToolsForGitSccProviderId); provider = SccProvider.VisualStudioToolsForGit; return(true); } case GitSccProvider.EasyGitIntegrationTools: { packageGuid = GetSccInstalledPackageId(EasyGitIntegrationToolsPackageIds); sccProviderGuid = new Guid(EasyGitIntegrationToolsSccProviderId); provider = SccProvider.EasyGitIntegrationTools; return(true); } default: throw new Exception(); } }
public static void SetGitSccProvider(GitSccProvider provider) { _SettingsStore.CreateCollection(SccAutoSwitcherCollection); if (provider == GitSccProvider.Default) { _SettingsStore.DeleteProperty(SccAutoSwitcherCollection, GitProviderProperty); } else { _SettingsStore.SetString(SccAutoSwitcherCollection, GitProviderProperty, provider.ToString()); } if (provider == GitSccProvider.Disabled) { return; } if (_CurrentSolutionRcsType == RcsType.Git) { RegisterPrimarySourceControlProvider(RcsType.Git); } }
/// <returns>false if handling the scc provider is disabled for this Rcs type</returns> private static bool RegisterGitScc(out Guid packageGuid, out Guid sccProviderGuid, out SccProvider provider) { GitSccProvider gitProvider = GetGitSccProvider(); if (gitProvider == GitSccProvider.Default) { gitProvider = GetDefaultGitSccProvider(); } if (gitProvider == GitSccProvider.Disabled) { packageGuid = new Guid(); sccProviderGuid = new Guid(); provider = SccProvider.Unknown; return(false); } switch (gitProvider) { case GitSccProvider.VisualStudioToolsForGit: { packageGuid = new Guid(VSToolsForGitPackagedId); sccProviderGuid = new Guid(VSToolsForGitSccProviderId); provider = SccProvider.VisualStudioToolsForGit; return(true); } case GitSccProvider.GitSourceControlProvider: { packageGuid = new Guid(GitScpPackagedId); sccProviderGuid = new Guid(GitScpSccProviderId); provider = SccProvider.GitSourceControlProvider; return(true); } default: throw new Exception(); } }
public static void SetGitSccProvider(GitSccProvider provider) { _SettingsStore.CreateCollection(SccAutoSwitcherCollection); if (provider == GitSccProvider.Default) _SettingsStore.DeleteProperty(SccAutoSwitcherCollection, GitProviderProperty); else _SettingsStore.SetString(SccAutoSwitcherCollection, GitProviderProperty, provider.ToString()); if (provider == GitSccProvider.Disabled) return; if (_CurrentSolutionRcsType == RcsType.Git) RegisterPrimarySourceControlProvider(RcsType.Git); }