コード例 #1
0
ファイル: RuleEval.cs プロジェクト: jenskaalen/SimpleMIM
        public static dynamic GetValue(FlowRule rule, CSEntry entry)
        {
            if (rule.RuleType == ExpressionType.Python)
            {
                var func = Core.GetFlowFunction(rule.Name);
                return(func(entry));
            }

            throw new NotImplementedException();
        }
コード例 #2
0
        public void MapAttributesForExport(string FlowRuleName, MVEntry mventry, CSEntry csentry)
        {
            FlowRule flowRule = _flows.FirstOrDefault(rule => rule.Name == FlowRuleName);

            if (flowRule == null)
            {
                throw new Exception("Couldnt find flowrule " + FlowRuleName);
            }

            RuleEval.Execute(flowRule, mventry, csentry);
        }
コード例 #3
0
ファイル: RuleEval.cs プロジェクト: jenskaalen/SimpleMIM
        public static void Execute(FlowRule rule, MVEntry source, CSEntry target)
        {
            if (rule.RuleType == ExpressionType.Python)
            {
                var func = Core.GetFlowFunction(rule.Name);
                func(source, target);
                return;
            }

            throw new NotImplementedException();
        }