public void AddPackageSource(string uri) { var feedUri = new FeedUri(uri); CatalogManager.DownloadCatalog(feedUri); if (CatalogManager.AddSource(feedUri)) { CatalogManager.GetOnlineSafe(); } else { Log.Warn(string.Format(Resources.CatalogAlreadyRegistered, feedUri.ToStringRfc())); } }
public override ExitCode Execute() { var uri = new FeedUri(AdditionalArgs[0]); if (!_skipVerify) { CatalogManager.DownloadCatalog(uri); } if (CatalogManager.AddSource(uri)) { if (!_skipVerify) { CatalogManager.GetOnlineSafe(); } return(ExitCode.OK); } else { Handler.OutputLow(Resources.CatalogSources, string.Format(Resources.CatalogAlreadyRegistered, uri.ToStringRfc())); return(ExitCode.NoChanges); } }
public void AddPackageSource([NotNull] FeedUri location) { CatalogManager.AddSource(location); }