static void Main(string[] args) { ActualFoo actualFoo = new ActualFoo(); var app = new AppProxy <IFoo>().Init(actualFoo); app.Execute(); var o = app.Object as ActualFoo; Console.ReadLine(); }