public static PersonBuilderFunctional SetProfession(this PersonBuilderFunctional pb, string job) { pb.AddAction(p => { p.Position = job; }); return(pb); }
public static void Execute() { // Open closed var builder = new PersonBuilderFunctional().SetName("TTTT").SetProfession("Soft").Build(); // open closed with generics and inheritence var builder1 = new PersonBuilderFunctional1().SetName("TTTT").SetProfession("Soft").Build(); }