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