public void LoadBIVs(ICctsRepository repository, EA.Package selectedPackage) { BIVs.Clear(); foreach (var docLibrary in repository.GetDocLibraries(selectedPackage.PackageID)) { if (!BIVs.ContainsKey(docLibrary.Name)) { BIVs.Add(docLibrary.Name, new cBIV(docLibrary.Name, docLibrary.Id, repository)); } } if (BIVs.Count == 0) { throw new CacheException(string.Format("No DOClibraries found in package '{0}'", selectedPackage.Name)); } }
public void LoadBIVs(ICctsRepository repository) { foreach (IDocLibrary docl in repository.GetDocLibraries()) { if (BIVs.ContainsKey(docl.Name)) { BIVs.Clear(); throw new CacheException("The wizard encountered two BIVs having identical names. Please make sure that all BIVs within the model have unique names before proceeding with the wizard."); } BIVs.Add(docl.Name, new cBIV(docl.Name, docl.Id)); } if (BIVs.Count == 0) { throw new CacheException("The repository did not contain any Business Information Views (BIVs) or any DOCLibraries. Please make sure at least one BIV or one DOCLibrary is present before proceeding with the wizard."); } }