コード例 #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));
        }
コード例 #2
0
ファイル: UriHelper.cs プロジェクト: monoman/NugetCracker
        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);
        }
コード例 #3
0
ファイル: PowerShellHost.cs プロジェクト: hu19891110/NuGet
 public string[] GetPackageSources()
 {
     return(_packageSourceProvider.GetEnabledPackageSourcesWithAggregate().Select(ps => ps.Name).ToArray());
 }