Inheritance: IColor
示例#1
0
 static void Main(string[] args)
 {
     var red = new Red();
        var green = new Green();
     Console.WriteLine(red.ToString());
     Console.WriteLine(green.ToString());
       //  Console.WriteLine(red.GetMyType());
        // ColorsProcessor.Process(red, green);
 }
示例#2
0
 public void RunProcessing(Red red, IProcessor processor)
 {
     processor.Process(red, this);
 }
示例#3
0
 public static void Do(Green first, Red second)
 {
     //Green, Green
     GreenRed = true; //just for tests
 }
示例#4
0
 public static void Do(Red first, Green second)
 {
     //Red, Green
     RedGreen = true; //just for tests
 }
示例#5
0
 public static void Do(Red first, Red second)
 {
     //Red, Red
     RedRed = true; //just for tests
 }
示例#6
0
 public string Prosess(Red first, Blue second)
 {
     return first.ColorRed + " " + second.ColorBlue;
 }
示例#7
0
 public string Prosess(Red first, Red second)
 {
     return first.ColorRed + " "+ second.ColorRed;
 }
示例#8
0
 public void Process(Green colorOne, Red colorTwo)
 {
     LastProcess = TypeOfProcess.GreenAndRed;
 }
示例#9
0
 public void Process(Red colorOne, Green colorTwo)
 {
     LastProcess = TypeOfProcess.RedAndGreen;
 }
示例#10
0
 public void Process(Red colorOne, Red colorTwo)
 {
     LastProcess = TypeOfProcess.RedAndRed;
 }
示例#11
0
 public string Prosess(Red first, Red second)
 {
     return(first.ColorRed + " " + second.ColorRed);
 }
示例#12
0
 public string Prosess(Red first, Blue second)
 {
     return(first.ColorRed + " " + second.ColorBlue);
 }
示例#13
0
 public void RunProcessing(Red red, IProcessor processor)
 {
     processor.Process(red, this);
 }