コード例 #1
0
 public static bool AddPackageSource(string source, string name)
 {
     Debug.Assert(_packageSources != null, "InitFeedsFile must be called before this method can be called.");
     name = String.IsNullOrEmpty(name) ? source.ToString() : name;
     var packageSource = new WebPackageSource(source: source, name: name);
     return AddPackageSource(_sourceFile, _packageSources, packageSource);
 }
コード例 #2
0
 public static bool AddPackageSource(WebPackageSource packageSource)
 {
     Debug.Assert(
         !String.IsNullOrEmpty(packageSource.Name) &&
         !String.IsNullOrEmpty(packageSource.Source)
         );
     return(AddPackageSource(_sourceFile, _packageSources, packageSource));
 }
コード例 #3
0
 public static bool AddPackageSource(
     IPackagesSourceFile sourceFile,
     ISet <WebPackageSource> packageSources,
     WebPackageSource packageSource
     )
 {
     if (GetSource(packageSources, packageSource.Name) != null)
     {
         return(false);
     }
     lock (_sourceFileLock)
     {
         packageSources.Add(packageSource);
         sourceFile.WriteSources(packageSources);
     }
     return(true);
 }
コード例 #4
0
        public override bool Equals(object obj)
        {
            WebPackageSource other = obj as WebPackageSource;

            return(base.Equals(other) && FilterPreferredPackages == other.FilterPreferredPackages);
        }
コード例 #5
0
 public static bool AddPackageSource(IPackagesSourceFile sourceFile, ISet<WebPackageSource> packageSources, WebPackageSource packageSource)
 {
     if (GetSource(packageSources, packageSource.Name) != null)
     {
         return false;
     }
     lock (_sourceFileLock)
     {
         packageSources.Add(packageSource);
         sourceFile.WriteSources(packageSources);
     }
     return true;
 }
コード例 #6
0
 public static bool AddPackageSource(WebPackageSource packageSource)
 {
     Debug.Assert(!String.IsNullOrEmpty(packageSource.Name) && !String.IsNullOrEmpty(packageSource.Source));
     return AddPackageSource(_sourceFile, _packageSources, packageSource);
 }
コード例 #7
0
 public static bool AddPackageSource(string source, string name)
 {
     Debug.Assert(_packageSources != null, "InitFeedsFile must be called before this method can be called.");
     name = String.IsNullOrEmpty(name) ? source.ToString() : name;
     var packageSource = new WebPackageSource(source: source, name: name);
     return AddPackageSource(_sourceFile, _packageSources, packageSource);
 }