Exemple #1
0
        public static void TestRepo2()
        {
            D2.BooProcessPackage p = new D2.BooProcessPackage("..\\..\\..\\ProcessPackages\\Test2");
            foreach (string pn in p.ProcessNames)
            {
                Console.WriteLine(pn);
                p.GetProcessDefinition(pn);
            }

            var pd = p.GetProcessDefinition("ErrorHandler.1");
            pd.Version = pd.Version + 1;
            List<string> errs;
                List<string> warns;
            p.ValidateAndSaveProcessDefinition(pd, true, out errs, out warns);
        }
Exemple #2
0
        public static void TestRepo2()
        {
            D2.BooProcessPackage p = new D2.BooProcessPackage("..\\..\\..\\ProcessPackages\\Test2");
            foreach (string pn in p.ProcessNames)
            {
                Console.WriteLine(pn);
                p.GetProcessDefinition(pn);
            }

            var pd = p.GetProcessDefinition("ErrorHandler.1");

            pd.Version = pd.Version + 1;
            List <string> errs;
            List <string> warns;

            p.ValidateAndSaveProcessDefinition(pd, true, out errs, out warns);
        }
Exemple #3
0
        protected BooProcessPackage LoadPackage(string name, bool validate)
        {
            string pth = Path.Combine(BaseDirectory, name);

            log.Info("Loading package {0} from {1}", name, pth);
            if (!Directory.Exists(pth))
            {
                throw new DirectoryNotFoundException(pth);
            }
            var p  = new BooProcessPackage(pth);
            var pn = p.ProcessNames.FirstOrDefault();

            if (validate && !string.IsNullOrEmpty(pn))
            {
                p.GetProcessDefinition(pn);
            }
            return(p);
        }
 public void Initialize(ProcessDef pd, BooProcessPackage pp)
 {
     ProcessDefinition = pd;
     Package           = pp;
     Prepare();
 }