コード例 #1
0
        private IGate ReplaceTransitionVariablesHandler(TransitionSet tset, IGate q, bool value)
        {
            var result = q;

            if (result is IVariableCondition)
            {
                var vc = ((IVariableCondition)result);
                if (!tset.Contains(vc.Variable))
                {
                    result = Gate.Constant(value);
                }
            }

            return(result);
        }
コード例 #2
0
ファイル: StateMachine.cs プロジェクト: thomas13335/smg
        private IGate ReplaceTransitionVariablesHandler(TransitionSet tset, IGate q, bool value)
        {
            var result = q;

            if (result is IVariableCondition)
            {
                var vc = ((IVariableCondition)result);
                if (!tset.Contains(vc.Variable))
                {
                    result = Gate.Constant(value);
                }
            }

            return result;
        }