Use a new method to implement replace require invoke with property of objectbased on namespace.