public TInterface ActivateProxy <TInterface>(Lifetime lifetime, IProtocol protocol) where TInterface : class { var type = ProxyGenerator.CreateType <TInterface>(); var proxyInstance = Activator.ActivateBind(type, lifetime, protocol) as TInterface; return(proxyInstance); }