# Function ToMethodWithInjectionContext

- ToMethodWithInjectionContext<ReturnType, Parameter, MethodType>(call, injector, metadata?): MethodType

- #### Type Parameters

  - ReturnType = any
  - Parameter = any
  - MethodType extends Method<ReturnType, Parameter> = Method<ReturnType, Parameter>

  #### Parameters

  - call: ((parameters?, ...args) => ReturnType | Promise<ReturnType>)
    - - (parameters?, ...args): ReturnType | Promise<ReturnType>

      - #### Parameters

        - `Optional` parameters: Parameter
        - `Rest` ...args: any[]

        #### Returns ReturnType | Promise<ReturnType>

  - injector: Injector
  - metadata: any = ...

  #### Returns MethodType

  - Defined in packages/angular/forms/src/lib/utilities.ts:10