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); }
public static bool AddPackageSource(WebPackageSource packageSource) { Debug.Assert( !String.IsNullOrEmpty(packageSource.Name) && !String.IsNullOrEmpty(packageSource.Source) ); return(AddPackageSource(_sourceFile, _packageSources, packageSource)); }
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); }
public override bool Equals(object obj) { WebPackageSource other = obj as WebPackageSource; return(base.Equals(other) && FilterPreferredPackages == other.FilterPreferredPackages); }
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; }
public static bool AddPackageSource(WebPackageSource packageSource) { Debug.Assert(!String.IsNullOrEmpty(packageSource.Name) && !String.IsNullOrEmpty(packageSource.Source)); return AddPackageSource(_sourceFile, _packageSources, packageSource); }