Example #1
0
 private static async Task UseMixinsToCreateFinalObject(ILogger logger)
 {
     Console.WriteLine("Create object using mixins and call methods");
     var obj = new RealObject();
     obj.Mixin<SquareDrawerObject>();
     obj.Mixin<TreeDrawerObject>();
     var deadletter = new DeadLetterObject(logger);
     await deadletter.Send(obj, new DrawTreeMessage(3));
     await deadletter.Send(obj, new DrawSquareMessage(3));
 }
Example #2
0
        private static async Task UseMixinsToCreateFinalObject(ILogger logger)
        {
            Console.WriteLine("Create object using mixins and call methods");
            var obj = new RealObject();

            obj.Mixin <SquareDrawerObject>();
            obj.Mixin <TreeDrawerObject>();
            var deadletter = new DeadLetterObject(logger);
            await deadletter.Send(obj, new DrawTreeMessage(3));

            await deadletter.Send(obj, new DrawSquareMessage(3));
        }