Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public string[] GetPackageSources()
 {
     return(_packageSourceProvider.GetEnabledPackageSourcesWithAggregate().Select(ps => ps.Name).ToArray());
 }