Ejemplo n.º 1
0
 public void CloseEARepository(bool saveDiagrams)
 {
     if (true == saveDiagrams)
     {
         eaRepo.SaveAllDiagrams();
     }
     eaRepo.CloseFile();
 }
        public EAPModels CollectClasses(string input, ref string err)
        {
            m_Repository = new EA.Repository();
            try
            {
                m_Repository.OpenFile(input);
            }
            catch
            {
                err = err + "\nIt is not able to open EAP file. Check the instalation of EAP";

                return(null);
            }

            eapModels = new EAPModels();
            EAPModel model = null;

            EA.Package MyModel      = (EA.Package)m_Repository.Models.GetAt(0);
            string     packageAlias = MyModel.Packages.Count > 0 ? ((EA.Package)(MyModel.Packages.GetAt(0))).Alias : null;

            if (packageAlias == null || packageAlias == "")
            {
                model = new EAPModel(nameModel);
                eapModels.Models.Add(model);
            }

            for (short iPackage = 0; iPackage < MyModel.Packages.Count; iPackage++)
            {
                EA.Package package = (EA.Package)MyModel.Packages.GetAt(iPackage);
                MyModelCopy = package;
                DoPackage(package, false, model, true);
            }


            for (short iPackage = 0; iPackage < MyModel.Packages.Count; iPackage++)
            {
                EA.Package package = (EA.Package)MyModel.Packages.GetAt(iPackage);
                MyModelCopy = package;
                DoPackage(package, false, model, false);
            }

            FindAttributeEnumCode();
            FixGroupClass();

            m_Repository.CloseFile();

            if (Validate)
            {
                //FindModelCodeIsNotEAP();
                tw.Close();
            }

            return(eapModels);
        }
Ejemplo n.º 3
0
 public int EA_Close()
 {
     try
     {
         if (schema != "")
         {
             eaRepository.CloseFile();
         }
     }
     catch
     { }
     schema = "";
     return(0);
 }
 public void CloseRepository()
 {
     eaRepository.CloseFile();
 }