How to put the entry point of an Azure Function inside a .NET DLL?

前端 未结 2 1132
醉酒成梦
醉酒成梦 2021-02-11 07:57

The Azure Functions samples illustrate how to put the process entry point within a C# script file .csx. However, how can I achieve the behavior with a regular C# li

2条回答
  •  别跟我提以往
    2021-02-11 08:26

    As of the writing of this question, it was not supported, but now it is!

    https://github.com/Azure/azure-webjobs-sdk-script/wiki/Precompiled-functions

    Excerpt from wiki:

    {
    "scriptFile": "PreCompiledFunctionSample.dll",
    "entryPoint": "PreCompiledFunctionSample.MyFunction.Run",
    "bindings": [
        {
            "authLevel": "function",
            "name": "req",
            "type": "httpTrigger",
            "direction": "in"
        },
        {
            "name": "$return",
            "type": "http",
            "direction": "out"
        }
    ],
    "disabled": false
    }
    

提交回复
热议问题