コード例 #1
0
ファイル: Program.cs プロジェクト: hippieZhou/DesignPatterns
        static IExpression GetMaleExpression()
        {
            IExpression robert = new TerminalExpression("Robert");
            IExpression john   = new TerminalExpression("John");

            return(new OrExpression(robert, john));
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: hippieZhou/DesignPatterns
        static IExpression GetMarriedWomanExpression()
        {
            IExpression julie   = new TerminalExpression("Julie");
            IExpression married = new TerminalExpression("Married");

            return(new AndExpression(julie, married));
        }