Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            IResumeBuilder resumeBuilder = new ResumeBuilder()
                                           .BuildBasicInfo(resume =>
            {
                resume.Name           = "张三";
                resume.Age            = 18;
                resume.Gender         = "男";
                resume.ExpectedSalary = "100W";
            })
                                           .BuildWorkExperence(work =>
            {
                work.Company   = "A公司";
                work.Detail    = "负责XX系统开发,精通YY。。。。。";
                work.StartDate = DateTime.Parse("2019-1-1");
                work.EndDate   = DateTime.Parse("2020-1-1");
            });

            ResumeBase resume1 = resumeBuilder
                                 .Build();

            ItResume resume2 = resume1.Clone() as ItResume;

            resume2.ExpectedSalary       = "面议";
            resume2.WorkExperence.Detail = "aaaaaaaaaa";
            resume1.Display();
            resume2.Display();
        }
Ejemplo n.º 2
0
        public ResumeBase Build()
        {
            ItResume resume = new ItResume()
            {
                Name           = this._basicInfo.Name,
                Gender         = this._basicInfo.Gender,
                Age            = this._basicInfo.Age,
                ExpectedSalary = this._basicInfo.ExpectedSalary,
                WorkExperence  = new WorkExperence
                {
                    Company   = this._workExperence.Company,
                    Detail    = this._workExperence.Detail,
                    StartDate = this._workExperence.StartDate,
                    EndDate   = this._workExperence.EndDate
                }
            };

            return(resume);
        }
Ejemplo n.º 3
0
        public override ResumeBase Clone()
        {
            ItResume resume = new ItResume()
            {
                Name           = this.Name,
                Gender         = this.Gender,
                Age            = this.Age,
                ExpectedSalary = this.ExpectedSalary,
                WorkExperence  = new WorkExperence
                {
                    Company   = this.WorkExperence.Company,
                    Detail    = this.WorkExperence.Detail,
                    StartDate = this.WorkExperence.StartDate,
                    EndDate   = this.WorkExperence.EndDate
                }
            };

            return(resume);
        }