public IClientFactory WithPet(Action <IPetFactory> pet) { var petFactory = new PetFactory(); pet(petFactory); this.pets.Add(petFactory.Build()); return(this); }
public IClientFactory WithPets(IList <Action <IPetFactory> > pets) { this.pets = new List <Pet>(); var petFactory = new PetFactory(); foreach (var pet in pets) { pet(petFactory); this.pets.Add(petFactory.Build()); } return(this); }