public static IActionResult Run([HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req, TraceWriter log, [Inject("registration1")] ITestItByName testitbyName1, [Inject("registration2")] ITestItByName testitbyName2) { log.Info("C# HTTP trigger function processed a request."); return(new OkObjectResult($"Hello, this is Function2. Dependency injection sample returns \n'{testitbyName1.CallMe()}', \n'{testitbyName2.CallMe()}'")); }
public static async Task <HttpResponseMessage> Run([HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequestMessage req, TraceWriter log, [Inject("registration1")] ITestItByName testitbyName1, [Inject("registration2")] ITestItByName testitbyName2) { log.Info("C# HTTP trigger function processed a request."); return(req.CreateResponse(HttpStatusCode.OK, $"Hello, this is Function2. Dependency injection sample returns \n'{testitbyName1.CallMe()}', \n'{testitbyName2.CallMe()}'")); }