private static void AddExtensionsToCatalog(AggregateCatalog catalog, IConsole console) { var extensionLocator = new ExtensionLocator(); var files = extensionLocator.FindExtensions(); RegisterExtensions(catalog, files, console); }
private IEnumerable <NuGet.Credentials.ICredentialProvider> GetCredentialProviders() { var extensionLocator = new ExtensionLocator(); var providers = new List <Credentials.ICredentialProvider>(); var pluginProviders = new PluginCredentialProviderBuilder(extensionLocator, Settings).BuildAll(); providers.Add(new CredentialProviderAdapter(new SettingsCredentialProvider(SourceProvider, Console))); providers.AddRange(pluginProviders); providers.Add(new ConsoleCredentialProvider(Console)); return(providers); }
private IEnumerable <NuGet.Credentials.ICredentialProvider> GetCredentialProviders() { var extensionLocator = new ExtensionLocator(); var providers = new List <Credentials.ICredentialProvider>(); var pluginProviders = new PluginCredentialProviderBuilder(extensionLocator, Settings).BuildAll().ToList(); providers.Add(new CredentialProviderAdapter(new SettingsCredentialProvider(SourceProvider, Console))); if (pluginProviders.Any()) { providers.AddRange(pluginProviders); if (PreviewFeatureSettings.DefaultCredentialsAfterCredentialProviders) { providers.Add(new DefaultCredentialsCredentialProvider()); } } providers.Add(new ConsoleCredentialProvider(Console)); return(providers); }
private async Task <IEnumerable <ICredentialProvider> > GetCredentialProvidersAsync() { var extensionLocator = new ExtensionLocator(); var providers = new List <ICredentialProvider>(); var pluginProviders = new PluginCredentialProviderBuilder(extensionLocator, Settings, Console) .BuildAll(Verbosity.ToString()) .ToList(); var securePluginProviders = await(new SecurePluginCredentialProviderBuilder(PluginManager.Instance, canShowDialog: true, logger: Console)).BuildAllAsync(); providers.Add(new CredentialProviderAdapter(new SettingsCredentialProvider(SourceProvider, Console))); providers.AddRange(securePluginProviders); providers.AddRange(pluginProviders); if (pluginProviders.Any() || securePluginProviders.Any()) { if (PreviewFeatureSettings.DefaultCredentialsAfterCredentialProviders) { providers.Add(new DefaultNetworkCredentialsCredentialProvider()); } } providers.Add(new ConsoleCredentialProvider(Console)); return(providers); }