Ejemplo n.º 1
0
        public void LoadCDTs(ICctsRepository repository)
        {
            if (CDTs.Count == 0)
            {
                ICdtLibrary cdtl = repository.GetCdtLibraryById(Id);

                foreach (ICdt cdt in cdtl.Cdts)
                {
                    if (CDTs.ContainsKey(cdt.Name))
                    {
                        CDTs.Clear();
                        throw new CacheException("The wizard encountered two CDTs within one CDT library having identical names. Please verify your model!");
                    }

                    CDTs.Add(cdt.Name, new cCDT(cdt.Name, cdt.Id));
                }

                if (CDTs.Count == 0)
                {
                    throw new CacheException(
                              "The CC library did not contain any CDTs. Please make sure at least one CDT is present in the library before proceeding with the wizard.");
                }
            }
        }