internal void AddRepository(Repository repository) { //Logger.LogMethod(); Logger.LogDebug("repository: " + repository.DefaultLibraryUrl); this.repositories.Add(repository.GetId(), repository); }
private Artifact BuildArtifact(Repository defaultRepository, Browser.BrowseDialog dlg) { Uri uri = new Uri(dlg.FileUrl); Repository selectedRepository = this.GetRepository(dlg.Url); selectedRepository = selectedRepository == null ? defaultRepository : selectedRepository; Artifact artifact = new Artifact(uri, selectedRepository); artifact.AddFieldRange(dlg.Fields); artifact.SetContentType(dlg.ContentType); selectedRepository.AddArtifact(artifact); return artifact; }
private Browser.BrowseDialog CreateBrowseDialog(Browser.BrowseDialog.DialogMode mode, string filter, Repository defaultRepository) { Logger.LogDebug("defaultRepository: " + defaultRepository.DefaultLibraryUrl); Browser.BrowseDialog dlg = new Browser.BrowseDialog(defaultRepository.DefaultLibraryUrl); dlg.Filters = filter; dlg.Mode = mode; // add sites to known sites combo foreach (Repository repository in this.repositories.Values) { foreach (string site in repository.Sites) { dlg.AddKnownSite(site, site); } } return dlg; }
private void Init(Uri documentUrl, Repository repository) { try { //Logger.LogMethod(); this.repository = repository; this.uri = documentUrl; FetchVersions(); } catch (Exception ex) { Logger.LogError(ex); throw; } }
public Artifact(Uri documentUrl, Repository repository) { Init(documentUrl, repository); }
public Artifact(string documentId, Repository repository) { Init(new Uri(repository.Scheme + "://" + documentId), repository); }