public void PrepareForSale(IWag wag) { WagRegistration wagReg = new WagRegistration(wag); wagReg.AllocateWagNumber(); WagDocumentation.PrintSpecSheet(wag); }
private static void SmallWidget() { AbstractWidget widget = new SmallWidget(); WagBuilder builder = new WidgetBuilder(widget); WagDirector director = new WidgetDirector(); IWag smallWidget = director.Build(builder); Console.WriteLine(smallWidget); }
private static void MediumWidget() { AbstractWidget widget = new MediumWidget(FinishColor.PaintedGreen); WagBuilder builder = new WidgetBuilder(widget); WagDirector director = new WidgetDirector(); IWag mediumWidget = director.Build(builder); Console.WriteLine(mediumWidget); }
private static void BuilderPatternDemo() { AbstractWidget abstractWidget = new SmallWidget(FinishColor.PlatedPlatinum); WagBuilder wagBuilder = new WidgetBuilder(abstractWidget); WagDirector wagDirector = new WidgetDirector(); IWag widget = wagDirector.Build(wagBuilder); Console.WriteLine(widget); AbstractGadget abstractGadget = new SmallGadget(FinishColor.PlainBlack); WagBuilder builder = new GadgetBuilder(abstractGadget); WagDirector director = new GadgetDirector(); IWag gadget = director.Build(builder); Console.WriteLine(gadget); }
public CustomComponentsOption(IWag wag) : base(wag) { }
public AbstractWagOption(IWag wag) : base(FinishColor.PlatedGold) { this.decoratedWag = wag; }
public EverythingGoldOption(IWag wag) : base(wag) { }
public WagRegistration(IWag wag) { this._wag = wag; }
public static void PrintSpecSheet(IWag wag) { Console.WriteLine("Printing Specifications SHeet . . ."); }