public void Visit(IBanana banana) { banana.Peel(); banana.Eat(); }
/// <summary> /// Constructor of <see cref="Mixer"/> /// </summary> /// <param name="apple">Implementation of IApple instance</param> /// <param name="banana">Implementation of IBanana instance</param> public Mixer(IApple apple, IBanana banana) { _apple = apple; _banana = banana; }
public static IFruit AsFruit(this IBanana banana) { return(new FruitAdaptor(banana.GetName())); }