.NET开发设计模式-模板模式

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay
{
    /// <summary>
    /// 付款成功回调
    /// </summary>
    public class PayNotify
    {
        /// <summary>
        /// 执行付款操作
        /// 对外只提供该接口
        /// </summary>
        public void ExecNotify()
        {
            this.ExecOrder();
            this.ExecMoney();
            this.ExecOther();
        }

        /// <summary>
        /// 付款成功之后处理订单操作
        /// </summary>
        private void ExecOrder()
        {
            /*通过反射执行你需要的定制的接口或者方法*/
        }

        /// <summary>
        /// 付款成功之后处理佣金操作
        /// </summary>
        private void ExecMoney()
        {
            /*通过反射执行你需要的定制的接口或者方法*/
        }

        /// <summary>
        /// 付款成功之后处理其它操作
        /// </summary>
        private void ExecOther()
        {
            /*通过反射执行你需要的定制的接口或者方法*/
        }

    }

}

 

posted @ 2017-08-24 16:56  王彬-效率开发  阅读(193)  评论(0编辑  收藏  举报