Exemple #1
0
 public Client(AbstractFactory abstractFactory)
 {
     abstractProductA = abstractFactory.CreateProductA();
     Console.WriteLine($"{abstractFactory.GetType().Name} created {abstractProductA.GetType().Name}");
     abstractProductB = abstractFactory.CreateProductB();
     Console.WriteLine($"{abstractFactory.GetType().Name} created {abstractProductB.GetType().Name}");
 }
        public void Check_Abstract_Factory_Returns_Correct_Objects()
        {
            AbstractFactory  factory1 = new Factory1();
            AbstractProductA product1 = factory1.CreateProductA();
            AbstractProductB product2 = factory1.CreateProductB();

            Assert.AreEqual(product1.GetType(), typeof(ProductA1));
            Assert.AreEqual(product2.GetType(), typeof(ProductB1));
        }
Exemple #3
0
        public override void Interact(AbstractProductA a)
        {
            MessageBox.Show(this.GetType().Name +

                            " interacts with " + a.GetType().Name);
        }
Exemple #4
0
 public void Run()
 {
     Console.WriteLine(prA.GetType().ToString());
     Console.Beep();
 }
Exemple #5
0
 public override void Interact(AbstractProductA productA)
 {
     Debug.Log(GetType().Name + "interacts with" + productA.GetType().Name);
 }
Exemple #6
0
 public override void Interact(AbstractProductA a)
 {
     Debug.Log(this.GetType().Name + " interacts with " + a.GetType().Name);
 }
Exemple #7
0
 public override void Interact(AbstractProductA a)
 {
     Utility.LogEntry(this.GetType().Name +
                      " interacts with " + a.GetType().Name);
 }
Exemple #8
0
 public void Interact(AbstractProductA a)
 {
     Console.WriteLine($"{this.GetType().Name} interacts with {a.GetType().Name}");
 }
Exemple #9
0
 public override void Interact(AbstractProductA productA)
 {
     Console.WriteLine("{0} interacts with {1}", this.GetType().Name, productA.GetType().Name);
 }
Exemple #10
0
 public override void Interact(AbstractProductA a)
 {
     Console.WriteLine(this.GetType().Name + " interact with " + a.GetType().Name);
 }
Exemple #11
0
 public override string Interact(AbstractProductA abstractProductA)
 {
     return($"{GetType().Name} efetuando interações com {abstractProductA.GetType().Name}");
 }
Exemple #12
0
 public override void Interact(AbstractProductA a)
 {
     Log.WriteLine(GetType().Name +
                   " interacts with " + a.GetType().Name);
 }
 public override void Wytworz(AbstractProductA typ)
 {
     Console.WriteLine(this.GetType().Name + " jest wytwarzany w wersji " + typ.GetType().Name);
 }
Exemple #14
0
 public override void interact(AbstractProductA producta)
 {
     Console.WriteLine("This {0} class interact with {1} class", this.GetType().Name, producta.GetType().Name);
 }
Exemple #15
0
 public override void Interact(AbstractProductA productA)
 {
     Console.WriteLine("Product B2 + " + productA.GetType().Name);
 }
 public override string Interact(AbstractProductA a, bool test)
 {
     return(this.GetType().Name +
            " interacts with " + a.GetType().Name);
 }
 public override string Interagir(AbstractProductA a)
 {
     return String.Format(this.GetType().Name + " interage com " + a.GetType().Name);
 }
 public override void Interact(AbstractProductA productA) => Debug.WriteLine(GetType().Name + " interacts with " + productA.GetType().Name);
Exemple #19
0
 public override void Interact(AbstractProductA a)
 {
     Console.WriteLine(this.GetType().Name +
                       " interacts with " + a.GetType().Name);
 }
 internal override string Interact(AbstractProductA a)
 {
     return(this.GetType().Name +
            " interacts with " + a.GetType().Name);
 }