Exemple #1
0
        public static void Run()
        {
            Bderived   b = new Bderived();
            ABase      a = b;
            Iinterface i = b;

            a.hello();
            b.hello();
            i.hello();
        }
Exemple #2
0
 override public IProcessor Create(ABase a)
 {
     // this is ugly for a large amount of ABase implementations of course
     if (a is A1)
     {
         return(new Runtime1());
     }
     if (a is A2)
     {
         return(new Runtime2());
     }
     throw new NotSupportedException();
 }
Exemple #3
0
        public void AddAnswerToAnAnswerSheet()
        {
            AnswerSheet s = SetupSheet();
            QBinary     q = s.Form.Questions.AddANewQuestion <QBinary>("Est-ce que c'est bon ?", true);
            ABase       a = s.CreateAnswerFor(q);

            Assert.IsNotNull(a);
            Assert.IsInstanceOf(typeof(ABinary), a);

            ABinary b = (ABinary)a;

            b.Answer = true;
        }
Exemple #4
0
 public void Valid(ABase answer)
 {
     Console.WriteLine("I'm BASE");
 }
Exemple #5
0
 public abstract IProcessor Create(ABase a);
Exemple #6
0
 public void ProcessA(ABase a)
 {
     // process away differently
 }
Exemple #7
0
 public void ProcessA(ABase a)
 {
     // process away
 }