public static bool IsHttpSource(string source, IVsPackageSourceProvider packageSourceProvider) { if (source != null) { if (IsHttpSource(source)) { return(true); } var packageSource = packageSourceProvider.GetEnabledPackageSourcesWithAggregate() .FirstOrDefault(p => p.Name.Equals(source, StringComparison.CurrentCultureIgnoreCase)); return((packageSource != null) && IsHttpSource(packageSource.Source)); } return(IsHttpSource(packageSourceProvider)); }
public static bool IsHttpSource(string source, IVsPackageSourceProvider packageSourceProvider) { if (source != null) { if (UriHelper.IsHttpSource(source)) { return true; } var packageSource = packageSourceProvider.GetEnabledPackageSourcesWithAggregate() .FirstOrDefault(p => p.Name.Equals(source, StringComparison.CurrentCultureIgnoreCase)); return (packageSource != null) ? UriHelper.IsHttpSource(packageSource.Source) : false; } return IsHttpSource(packageSourceProvider); }
public string[] GetPackageSources() { return(_packageSourceProvider.GetEnabledPackageSourcesWithAggregate().Select(ps => ps.Name).ToArray()); }