コード例 #1
0
        public CashContext(string type, string paramA, string paramB)
        {
            switch (type)
            {
            case "正常收费":
                cashSuper = new CashNormal();
                break;

            case "打折":
                cashSuper = new CashRebate(paramA);
                break;

            case "满返":
                cashSuper = new CashReturn(paramA, paramB);
                break;

            default:
                break;
            }
        }
コード例 #2
0
 public CashContext(CashSuper cs)
 {
     this.cs = cs;
 }