static void Main(string[] args) { MyDI.Register <IMessage, FileMessage>(); SendMessage("Hello World"); Console.WriteLine("Press any key for continuing..."); Console.ReadKey(); }
private static void SendMessage(string message) { var fooIMessage = MyDI.Resolve <IMessage>(); fooIMessage.Write(message); }