예제 #1
0
        /// <summary>
        /// 反射+配置文件
        /// </summary>
        /// <returns></returns>
        public static AbstractAudit Builder(ApplyContext context)
        {
            AbstractAudit dev = new DevManagerAudit(context)
            {
                ID = "01", Name = "开发经理王"
            };
            AbstractAudit charge = new ChargeAudit(context)
            {
                ID = "02", Name = "主管李"
            };
            AbstractAudit dep = new DepManagerAudit(context)
            {
                ID = "03", Name = "部门经理赵"
            };
            AbstractAudit major = new MajordomoAudit(context)
            {
                ID = "04", Name = "总监孙"
            };
            AbstractAudit ceo = new CEOAudit(context)
            {
                ID = "05", Name = "CEO"
            };

            dev.SetNextAudit(charge);
            charge.SetNextAudit(dep);
            dep.SetNextAudit(major);
            return(dev);
        }
예제 #2
0
파일: Program.cs 프로젝트: ningfd/Net
        /// <summary>
        /// 高级开发
        /// 流程可随意调整
        /// </summary>
        /// <param name="context"></param>
        private static void Invoke3(ApplyContext context)
        {
            AbstractAudit dev = new DevManagerAudit(context)
            {
                ID = "01", Name = "开发经理王"
            };
            AbstractAudit charge = new ChargeAudit(context)
            {
                ID = "02", Name = "主管李"
            };
            AbstractAudit dep = new DepManagerAudit(context)
            {
                ID = "03", Name = "部门经理赵"
            };
            AbstractAudit major = new MajordomoAudit(context)
            {
                ID = "04", Name = "总监孙"
            };
            AbstractAudit ceo = new CEOAudit(context)
            {
                ID = "05", Name = "CEO"
            };

            dev.SetNextAudit(charge);
            charge.SetNextAudit(dep);
            dep.SetNextAudit(major);
            ceo.SetNextAudit(ceo);
            dev.Audit();
        }