static void Main(string[] args) { var notification = new VideoNotification(); notification.RegisterNotificationChannel(new MailNotificationChannel()); notification.RegisterNotificationChannel(new SmsNotificationChannel()); //notification.Notification(); //object a = new object(); //var testIsOperator = new SmsNotificationChannel(); //if (testIsOperator is INotificationChannel) // Console.WriteLine("object implements INoticationChannel"); //var castAsObject = (INotificationChannel)testIsOperator; ExampleClass conflict = new ExampleClass(); IPaint paint = conflict; ISurface surface = conflict; conflict.Paint(); paint.Paint(); surface.Paint(); Console.WriteLine(conflict.Mystery()); //conflict.Mystery(); Console.ReadKey(); }
public TPainter Draw(float stepByX, float stepByY) { ScaleByAxisX = stepByX; ScaleByAxisY = stepByY; state = _painter.Paint(_fractal.GetFractalData(ComplexRectange, new Size(300, 300))); _fractal.GetFractalDataAsync(ComplexRectange, new Size(700, 700)) .ContinueWith(task => { state = _painter.Paint(task.Result); }); _fractal.GetFractalDataAsync(ComplexRectange, new Size(1400, 1400)) .ContinueWith(task => { state = _painter.Paint(task.Result); }); PixelRectangle = new Rectangle(new Point(), _painter.GetOriginalCanvasSize()); return(state); }