Ejemplo n.º 1
0
        public static async Task Main(string[] args)
        {
            ActionFactory    AF = new ActionFactory();
            EvaluatorFactory EF = new EvaluatorFactory();
            BuilderFactory   BF = new BuilderFactory(AF, EF);

            var engine = Engine <string> .CreateEngine();

            var linter = engine.LintFluent(BF.Workflow);

            var result = await linter.LintAsync(null, new CancellationToken());

            var art = result.ArticulateFlow();

            string s = JsonConvert.SerializeObject(art, new JsonSerializerSettings()
            {
                Formatting = Formatting.Indented, ReferenceLoopHandling = ReferenceLoopHandling.Ignore
            });

            Console.WriteLine(s);

            Console.ReadLine();

            /*
             * UserHasPermission
             * ItemInInventory
             *
             *
             */
        }
Ejemplo n.º 2
0
 public BuilderFactory(ActionFactory af, EvaluatorFactory ef)
 {
     this.af = af;
     this.ef = ef;
 }