//输出自身所有属性
 public void ShowSelf()
 {
     Display();
     Swim();
     quackType.Quack();
     flyType.Fly();
 }
Example #2
0
 static void Iwanttofly(IFly fly)
 {
     fly.Fly();
 }
Example #3
0
 public void MakeFly()
 {
     _fly.Fly();
 }
 public void PerformFly()
 {
     flyBehavior.Fly();
 }
Example #5
0
 public void Fly()
 {
     ifly.Fly();
 }
Example #6
0
 public void Fly()
 {
     _fly.Fly();
 }
Example #7
0
 public virtual void fDuckMet()
 {
     _fly.Fly();
 }
 public void Fly()
 {
     FlyAbility.Fly();
 }
Example #9
0
 public override void Fly()
 {
     ifly.Fly();
     //Console.WriteLine("Fly");
 }
Example #10
0
 public string TryToFly()
 {
     return(flyingType.Fly());
 }
Example #11
0
 public override string ToString()
 {
     return($"name : {name} height : {height} when fly : {myFliyingAbility.Fly()}");
 }
Example #12
0
 public virtual void MakeFly()
 {
     _fly.Fly();
 }
Example #13
0
 public void Fly()
 {
     Console.WriteLine("Do you Fly?");
     _flyBehaviour.Fly();
     Console.WriteLine();
 }
Example #14
0
 public void PerformFly()
 {
     Fly.Fly();
 }
Example #15
0
 /// <summary>
 /// 可以飛的英雄執行飛行,因為不是每個繼承 IAvengers 的英雄類別都有再繼承 IFly 介面
 /// 因次要限定傳入的英雄參數有繼承 IFly 才能執行飛行方法
 /// </summary>
 public void FlyAway(IFly canFlyHero)
 {
     canFlyHero.Fly();
 }
Example #16
0
 public void Fly()
 {
     FlytType?.Fly();
 }
Example #17
0
 public void DoFly()
 {
     flyAction.Fly();
 }
Example #18
0
 public virtual void Fly()
 {
     _fly?.Fly();
 }
Example #19
0
 static void FlyPlease(IFly flying)
 {
     flying.Fly();
 }
Example #20
0
 public virtual void FPropFunc()
 {
     _fly.Fly();
 }
 public void Test()
 {
     Console.WriteLine($"test in {nameof(HasDependencyTest)}");
     _fly.Fly();
 }
Example #22
0
 private static void ICanFly(IFly flyingDuck)
 {
     flyingDuck.Fly();
 }