Function ToMethodWithInjectionContext