Azure Functions C# 開發人員參考Azure Functions C# developer reference

本文是在 .NET 類別庫中使用 C# 開發 Azure Functions 的簡介。This article is an introduction to developing Azure Functions by using C# in .NET class libraries.

Azure Functions 支援 C# 和 C# 指令碼程式設計語言。Azure Functions supports C# and C# script programming languages. 如果您需要在 Azure 入口網站中使用 C#的指引,請參閱 C# 指令碼 (.csx) 開發人員參考If you're looking for guidance on using C# in the Azure portal, see C# script (.csx) developer reference.

本文假設您已閱讀下列文章:This article assumes that you've already read the following articles:

支援的版本Supported versions

函數執行時間的版本適用于特定版本的 .NET。Versions of the Functions runtime work with specific versions of .NET. 下表顯示可搭配專案中特定版本函式使用的最高層級 .NET Core 和 .NET Framework 和 .NET Core。The following table shows the highest level of .NET Core and .NET Framework and .NET Core that can be used with a specific version of Functions in your project.

函數執行階段版本Functions runtime version 最大 .NET 版本Max .NET version
函數3。xFunctions 3.x .NET Core 3。1.NET Core 3.1
Functions 2.xFunctions 2.x .NET Core 2.2.NET Core 2.2
Functions 1.xFunctions 1.x .NET Framework 4.6.NET Framework 4.6

若要深入瞭解,請參閱Azure Functions 執行階段版本總覽To learn more, see Azure Functions runtime versions overview

Functions 類別庫專案Functions class library project

在 Visual Studio 中,Azure Functions 專案範本可建立 C# 類別庫專案,其中包含下列檔案:In Visual Studio, the Azure Functions project template creates a C# class library project that contains the following files:

  • host.json - 儲存會影響在本機或 Azure 中執行之專案中所有函式的組態設定。host.json - stores configuration settings that affect all functions in the project when running locally or in Azure.
  • local.settings.json - 儲存在本機執行時所使用的應用程式設定和連接字串。local.settings.json - stores app settings and connection strings that are used when running locally. 此檔案包含密碼,不會發佈至 Azure 中的函數應用程式。This file contains secrets and isn't published to your function app in Azure. 相反地,請將應用程式設定新增至您的函式應用程式。Instead, add app settings to your function app.

當您建立專案時,在組建輸出目錄中會產生如下列範例所示的資料夾結構:When you build the project, a folder structure that looks like the following example is generated in the build output directory:

<framework.version>
 | - bin
 | - MyFirstFunction
 | | - function.json
 | - MySecondFunction
 | | - function.json
 | - host.json

此目錄會部署至 Azure 中的函數應用程式。This directory is what gets deployed to your function app in Azure. Functions 執行階段版本 2.x 中所需之繫結延伸模組會以 NuGet 封裝形式新增至專案The binding extensions required in version 2.x of the Functions runtime are added to the project as NuGet packages.

重要

建置流程會為每個函式都建立 function.json 檔案。The build process creates a function.json file for each function. 這個 function.json 檔案不適合直接編輯。This function.json file is not meant to be edited directly. 您無法編輯此檔案來變更繫結設定或停用函式。You can't change binding configuration or disable the function by editing this file. 若要了解如何停用函式,請參閱如何停用函式To learn how to disable a function, see How to disable functions.

辨識為函式的方法Methods recognized as functions

在類別庫中,函式是具有 FunctionName 和觸發程序屬性的靜態方法,如下列範例所示:In a class library, a function is a static method with a FunctionName and a trigger attribute, as shown in the following example:

public static class SimpleExample
{
    [FunctionName("QueueTrigger")]
    public static void Run(
        [QueueTrigger("myqueue-items")] string myQueueItem, 
        ILogger log)
    {
        log.LogInformation($"C# function processed: {myQueueItem}");
    }
} 

FunctionName 屬性會將方法標記為函式進入點。The FunctionName attribute marks the method as a function entry point. 名稱在專案中必須是唯一的,以字母開頭,而且只包含字母、數位、_-,長度上限為127個字元。The name must be unique within a project, start with a letter and only contain letters, numbers, _, and -, up to 127 characters in length. 專案範本通常會建立名為 Run 的方法,不過任何有效的 C# 方法名稱都能成為方法名稱。Project templates often create a method named Run, but the method name can be any valid C# method name.

觸發程序屬性可指定觸發程序類型,並將輸入資料繫結至方法參數。The trigger attribute specifies the trigger type and binds input data to a method parameter. 範例函式是由佇列訊息所觸發,該佇列訊息會接著傳遞給 myQueueItem 參數中的方法。The example function is triggered by a queue message, and the queue message is passed to the method in the myQueueItem parameter.

方法簽章參數Method signature parameters

方法簽章可包含非用於觸發程序屬性的參數。The method signature may contain parameters other than the one used with the trigger attribute. 以下是幾個可以包含在其中的額外參數:Here are some of the additional parameters that you can include:

函式簽章中的參數順序不重要。The order of parameters in the function signature does not matter. 例如,您可以將觸發程序參數放在其他繫結之前或之後,且可以將記錄器參數放在觸發程序或繫結參數之前或之後。For example, you can put trigger parameters before or after other bindings, and you can put the logger parameter before or after trigger or binding parameters.

輸出繫結範例Output binding example

下列範例修改上一個範例並新增輸出佇列繫結。The following example modifies the preceding one by adding an output queue binding. 此函式會將觸發函式的佇列訊息寫入不同佇列中的新佇列訊息。The function writes the queue message that triggers the function to a new queue message in a different queue.

public static class SimpleExampleWithOutput
{
    [FunctionName("CopyQueueMessage")]
    public static void Run(
        [QueueTrigger("myqueue-items-source")] string myQueueItem, 
        [Queue("myqueue-items-destination")] out string myQueueItemCopy,
        ILogger log)
    {
        log.LogInformation($"CopyQueueMessage function processed: {myQueueItem}");
        myQueueItemCopy = myQueueItem;
    }
}

繫結參考文章 (如儲存體佇列) 說明您可以使用哪些類型的參數來搭配觸發程序、輸入或輸出繫結屬性。The binding reference articles (Storage queues, for example) explain which parameter types you can use with trigger, input, or output binding attributes.

繫結運算式範例Binding expressions example

下列程式碼會從應用程式設定取得要監視的佇列名稱,而它會在 insertionTime 參數中取得佇列訊息建立時間。The following code gets the name of the queue to monitor from an app setting, and it gets the queue message creation time in the insertionTime parameter.

public static class BindingExpressionsExample
{
    [FunctionName("LogQueueMessage")]
    public static void Run(
        [QueueTrigger("%queueappsetting%")] string myQueueItem,
        DateTimeOffset insertionTime,
        ILogger log)
    {
        log.LogInformation($"Message content: {myQueueItem}");
        log.LogInformation($"Created at: {insertionTime}");
    }
}

自動產生的 function.jsonAutogenerated function.json

建置流程在組建資料夾的函式資料夾中建立 function.json 檔案。The build process creates a function.json file in a function folder in the build folder. 如稍早所述,此檔案不適合直接編輯。As noted earlier, this file is not meant to be edited directly. 您無法編輯此檔案來變更繫結設定或停用函式。You can't change binding configuration or disable the function by editing this file.

此檔案的目的是提供資訊給縮放控制器,以用於使用情況方案的縮放決策The purpose of this file is to provide information to the scale controller to use for scaling decisions on the consumption plan. 因此,檔案只會有觸發程序資訊,而不會有輸入或輸出繫結。For this reason, the file only has trigger info, not input or output bindings.

產生的 function.json 檔案包含 configurationSource 屬性 (property),指示執行階段使用 .NET 屬性 (attribute) 屬性進行繫結,而不是使用 function.json 設定。The generated function.json file includes a configurationSource property that tells the runtime to use .NET attributes for bindings, rather than function.json configuration. 以下是範例:Here's an example:

{
  "generatedBy": "Microsoft.NET.Sdk.Functions-1.0.0.0",
  "configurationSource": "attributes",
  "bindings": [
    {
      "type": "queueTrigger",
      "queueName": "%input-queue-name%",
      "name": "myQueueItem"
    }
  ],
  "disabled": false,
  "scriptFile": "..\\bin\\FunctionApp1.dll",
  "entryPoint": "FunctionApp1.QueueTrigger.Run"
}

Microsoft.NET.Sdk.FunctionsMicrosoft.NET.Sdk.Functions

function.json 檔案產生是由 NuGet 套件 Microsoft.NET.Sdk.Functions 執行。The function.json file generation is performed by the NuGet package Microsoft.NET.Sdk.Functions.

Functions 執行階段的 1.x 版和 2.x 版都是使用同一個套件。The same package is used for both version 1.x and 2.x of the Functions runtime. 1.x 專案與 2.x 專案可依目標架構來區分。The target framework is what differentiates a 1.x project from a 2.x project. 以下是 .csproj 檔案的相關部分,顯示不同的目標架構和相同的 Sdk 套件:Here are the relevant parts of .csproj files, showing different target frameworks and the same Sdk package:

Functions 1.xFunctions 1.x

<PropertyGroup>
  <TargetFramework>net461</TargetFramework>
</PropertyGroup>
<ItemGroup>
  <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.8" />
</ItemGroup>

Functions 2.xFunctions 2.x

<PropertyGroup>
  <TargetFramework>netcoreapp2.1</TargetFramework>
  <AzureFunctionsVersion>v2</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
  <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.8" />
</ItemGroup>

Sdk 套件相依性中的是觸發程序和繫結。Among the Sdk package dependencies are triggers and bindings. 1.x 專案會參考1.x 觸發程式和系結,因為這些觸發程式和系結是以 .NET Framework 為目標,而2.x 觸發程式和系結是以 .NET Core 為目標。A 1.x project refers to 1.x triggers and bindings because those triggers and bindings target the .NET Framework, while 2.x triggers and bindings target .NET Core.

Sdk 套件也會相依於 Newtonsoft.Json (英文),並間接相依於 WindowsAzure.Storage (英文)。The Sdk package also depends on Newtonsoft.Json, and indirectly on WindowsAzure.Storage. 這些相依性可確保您的專案會使用能夠搭配專案所設為目標之 Functions 執行階段版本運作的套件版本。These dependencies make sure that your project uses the versions of those packages that work with the Functions runtime version that the project targets. 例如,Newtonsoft.Json 含有適用於 .NET Framework 4.6.1 的 11 版,但目標為 .NET Framework 4.6.1 的 Functions 執行階段只能與 Newtonsoft.Json 9.0.1 相容。For example, Newtonsoft.Json has version 11 for .NET Framework 4.6.1, but the Functions runtime that targets .NET Framework 4.6.1 is only compatible with Newtonsoft.Json 9.0.1. 因此,您在該專案中的函式程式碼也必須使用 Newtonsoft.Json 9.0.1。So your function code in that project also has to use Newtonsoft.Json 9.0.1.

適用於 Microsoft.NET.Sdk.Functions 的原始程式碼位於 GitHub 存放庫 azure-functions-vs-build-sdk (英文)。The source code for Microsoft.NET.Sdk.Functions is available in the GitHub repo azure-functions-vs-build-sdk.

執行階段版本Runtime version

Visual Studio 會使用 Azure Functions Core Tools 來執行 Functions 專案。Visual Studio uses the Azure Functions Core Tools to run Functions projects. Core Tools 是適用於 Functions 執行階段的命令列介面。The Core Tools is a command-line interface for the Functions runtime.

如果您使用 npm 安裝 Core Tools,那就不會影響 Visual Studio 所使用的 Core Tools 版本。If you install the Core Tools by using npm, that doesn't affect the Core Tools version used by Visual Studio. 對於 Functions 執行階段 1.x 版,Visual Studio 會在 %USERPROFILE%\AppData\Local\Azure.Functions.Cli 中儲存 Core Tools 版本,並使用儲存於該處的最新版本。For the Functions runtime version 1.x, Visual Studio stores Core Tools versions in %USERPROFILE%\AppData\Local\Azure.Functions.Cli and uses the latest version stored there. 對於 Functions 2.x,Core Tools 會隨附於 Azure Functions 與 Web 工作工具擴充功能中。For Functions 2.x, the Core Tools are included in the Azure Functions and Web Jobs Tools extension. 對於 1.x 和 2.x,您可以在執行 Functions 專案時,於主控台輸出中查看使用的是哪個版本:For both 1.x and 2.x, you can see what version is being used in the console output when you run a Functions project:

[3/1/2018 9:59:53 AM] Starting Host (HostId=contoso2-1518597420, Version=2.0.11353.0, ProcessId=22020, Debug=False, Attempt=0, FunctionsExtensionVersion=)

支援的繫結類型Supported types for bindings

每個繫結都有自己支援的類型;例如,Blob 觸發程序屬性可套用至字串參數、POCO 參數、CloudBlockBlob 參數或任何數個其他支援的類型。Each binding has its own supported types; for instance, a blob trigger attribute can be applied to a string parameter, a POCO parameter, a CloudBlockBlob parameter, or any of several other supported types. Blob 繫結的繫結參考文章會列出所有支援的參數類型。The binding reference article for blob bindings lists all supported parameter types. 如需詳細資訊,請參閱觸發程序和繫結以及每個繫結類型的繫結參考文件For more information, see Triggers and bindings and the binding reference docs for each binding type.

提示

如果您打算使用 HTTP 或 WebHook 的繫結,請做好規劃,以免因為 HttpClient 具現化不當而耗盡連接埠。If you plan to use the HTTP or WebHook bindings, plan to avoid port exhaustion that can be caused by improper instantiation of HttpClient. 如需詳細資訊,請參閱如何管理 Azure Functions 中的連線For more information, see How to manage connections in Azure Functions.

繫結至方法傳回值Binding to method return value

您可以將方法傳回值用於輸出繫結,方法是將屬性套用至方法傳回值。You can use a method return value for an output binding, by applying the attribute to the method return value. 如需範例,請參閱觸發程序和繫結For examples, see Triggers and bindings.

唯有成功的函式執行一律導致傳回值傳遞至輸出繫結時,才使用此傳回值。Use the return value only if a successful function execution always results in a return value to pass to the output binding. 否則,使用 ICollectorIAsyncCollector,如下一節所示。Otherwise, use ICollector or IAsyncCollector, as shown in the following section.

撰寫多個輸出值Writing multiple output values

若要將多個值寫入至輸出繫結,或者如果成功的函式引動過程可能未導致任何項目傳遞至輸出繫結,請使用 ICollectorIAsyncCollector 類型。To write multiple values to an output binding, or if a successful function invocation might not result in anything to pass to the output binding, use the ICollector or IAsyncCollector types. 這些類型是在方法完成時,寫入至輸出繫結的唯寫集合。These types are write-only collections that are written to the output binding when the method completes.

這個範例會使用 ICollector 將多個佇列訊息寫入相同佇列:This example writes multiple queue messages into the same queue using ICollector:

public static class ICollectorExample
{
    [FunctionName("CopyQueueMessageICollector")]
    public static void Run(
        [QueueTrigger("myqueue-items-source-3")] string myQueueItem,
        [Queue("myqueue-items-destination")] ICollector<string> myDestinationQueue,
        ILogger log)
    {
        log.LogInformation($"C# function processed: {myQueueItem}");
        myDestinationQueue.Add($"Copy 1: {myQueueItem}");
        myDestinationQueue.Add($"Copy 2: {myQueueItem}");
    }
}

記錄Logging

若要使用 C# 將輸出記錄至串流記錄,請包含 ILogger 類型的引數。To log output to your streaming logs in C#, include an argument of type ILogger. 建議您將它命名為 log,如下列範例所示:We recommend that you name it log, as in the following example:

public static class SimpleExample
{
    [FunctionName("QueueTrigger")]
    public static void Run(
        [QueueTrigger("myqueue-items")] string myQueueItem, 
        ILogger log)
    {
        log.LogInformation($"C# function processed: {myQueueItem}");
    }
} 

避免在 Azure Functions 中使用 Console.WriteAvoid using Console.Write in Azure Functions. 如需詳細資訊,請參閱監視 Azure Functions 文章中的在 C# 函式中寫入記錄For more information, see Write logs in C# functions in the Monitor Azure Functions article.

非同步處理Async

若要讓函式變成非同步,請使用 async 關鍵字並傳回 Task 物件。To make a function asynchronous, use the async keyword and return a Task object.

public static class AsyncExample
{
    [FunctionName("BlobCopy")]
    public static async Task RunAsync(
        [BlobTrigger("sample-images/{blobName}")] Stream blobInput,
        [Blob("sample-images-copies/{blobName}", FileAccess.Write)] Stream blobOutput,
        CancellationToken token,
        ILogger log)
    {
        log.LogInformation($"BlobCopy function processed.");
        await blobInput.CopyToAsync(blobOutput, 4096, token);
    }
}

您無法在非同步函式中使用 out 參數。You can't use out parameters in async functions. 針對輸出繫結,請改為使用函式傳回值收集器物件For output bindings, use the function return value or a collector object instead.

取消權杖Cancellation tokens

可以接受 CancellationToken 參數的函式,讓作業系統能夠在函式即將終止時通知您的程式碼。A function can accept a CancellationToken parameter, which enables the operating system to notify your code when the function is about to be terminated. 您可以使用此通知來確保函數不會在讓資料維持不一致狀態的情況下意外終止。You can use this notification to make sure the function doesn't terminate unexpectedly in a way that leaves data in an inconsistent state.

下列範例示範如何檢查即將終止的函式。The following example shows how to check for impending function termination.

public static class CancellationTokenExample
{
    public static void Run(
        [QueueTrigger("inputqueue")] string inputText,
        TextWriter logger,
        CancellationToken token)
    {
        for (int i = 0; i < 100; i++)
        {
            if (token.IsCancellationRequested)
            {
                logger.WriteLine("Function was cancelled at iteration {0}", i);
                break;
            }
            Thread.Sleep(5000);
            logger.WriteLine("Normal processing for queue message={0}", inputText);
        }
    }
}

環境變數Environment variables

若要取得環境變數或應用程式設定值,請使用 System.Environment.GetEnvironmentVariable,如下列程式碼範例所示:To get an environment variable or an app setting value, use System.Environment.GetEnvironmentVariable, as shown in the following code example:

public static class EnvironmentVariablesExample
{
    [FunctionName("GetEnvironmentVariables")]
    public static void Run([TimerTrigger("0 */5 * * * *")]TimerInfo myTimer, ILogger log)
    {
        log.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}");
        log.LogInformation(GetEnvironmentVariable("AzureWebJobsStorage"));
        log.LogInformation(GetEnvironmentVariable("WEBSITE_SITE_NAME"));
    }

    public static string GetEnvironmentVariable(string name)
    {
        return name + ": " +
            System.Environment.GetEnvironmentVariable(name, EnvironmentVariableTarget.Process);
    }
}

本機開發以及於 Azure 執行時,均可從環境變數讀取應用程式設定。App settings can be read from environment variables both when developing locally and when running in Azure. 在本機開發時,應用程式設定來自 local.settings.json 檔案中的 Values 集合。When developing locally, app settings come from the Values collection in the local.settings.json file. 在本機和 Azure 這兩個環境中,GetEnvironmentVariable("<app setting name>") 會擷取具名應用程式設定的值。In both environments, local and Azure, GetEnvironmentVariable("<app setting name>") retrieves the value of the named app setting. 例如在本機執行時,如果您的 local.settings.json 檔案包含 { "Values": { "WEBSITE_SITE_NAME": "My Site Name" } },則會傳回 "My Site Name"。For instance, when you're running locally, "My Site Name" would be returned if your local.settings.json file contains { "Values": { "WEBSITE_SITE_NAME": "My Site Name" } }.

System.Configuration.ConfigurationManager.AppSettings 屬性是用於取得應用程式設定值的替代 API,但建議您使用 GetEnvironmentVariable,如下所示。The System.Configuration.ConfigurationManager.AppSettings property is an alternative API for getting app setting values, but we recommend that you use GetEnvironmentVariable as shown here.

執行階段的繫結Binding at runtime

在 C# 和其他 .NET 語言中,您可以使用相對於屬性中宣告式繫結的命令式繫結模式。In C# and other .NET languages, you can use an imperative binding pattern, as opposed to the declarative bindings in attributes. 當繫結參數需要在執行階段而不是設計階段中計算時,命令式繫結非常有用。Imperative binding is useful when binding parameters need to be computed at runtime rather than design time. 利用此模式,您可以快速在您的函式程式碼中繫結至支援的輸入和輸出繫結。With this pattern, you can bind to supported input and output bindings on-the-fly in your function code.

定義命令式繫結,如下所示︰Define an imperative binding as follows:

  • 請勿在函式簽章中加入您所需命令式繫結的屬性。Do not include an attribute in the function signature for your desired imperative bindings.

  • 傳入輸入參數 Binder binderIBinder binderPass in an input parameter Binder binder or IBinder binder.

  • 使用下列 C# 模式來執行資料繫結。Use the following C# pattern to perform the data binding.

    using (var output = await binder.BindAsync<T>(new BindingTypeAttribute(...)))
    {
        ...
    }
    

    BindingTypeAttribute 是可定義繫結的 .NET 屬性,而 T 是該繫結類型所支援的輸入或輸出類型。BindingTypeAttribute is the .NET attribute that defines your binding, and T is an input or output type that's supported by that binding type. T 不能是 out 參數類型 (例如 out JObject)。T cannot be an out parameter type (such as out JObject). 例如,Mobile Apps 資料表輸出系結支援六種輸出類型,但您只能使用ICollector<t > ,或透過命令式系結來IAsyncCollector<t >For example, the Mobile Apps table output binding supports six output types, but you can only use ICollector<T> or IAsyncCollector<T> with imperative binding.

單一屬性範例Single attribute example

下列範例程式碼會使用在執行階段定義的 blob 路徑來建立儲存體 blob 輸出繫結,然後將字串寫入 blob。The following example code creates a Storage blob output binding with blob path that's defined at run time, then writes a string to the blob.

public static class IBinderExample
{
    [FunctionName("CreateBlobUsingBinder")]
    public static void Run(
        [QueueTrigger("myqueue-items-source-4")] string myQueueItem,
        IBinder binder,
        ILogger log)
    {
        log.LogInformation($"CreateBlobUsingBinder function processed: {myQueueItem}");
        using (var writer = binder.Bind<TextWriter>(new BlobAttribute(
                    $"samples-output/{myQueueItem}", FileAccess.Write)))
        {
            writer.Write("Hello World!");
        };
    }
}

BlobAttribute 會定義儲存體 blob 輸入或輸出繫結,而 TextWriter 是支援的輸出繫結類型。BlobAttribute defines the Storage blob input or output binding, and TextWriter is a supported output binding type.

多個屬性範例Multiple attribute example

先前的範例會取得函數應用程式主要儲存體帳戶連接字串的應用程式設定 (也就是 AzureWebJobsStorage)。The preceding example gets the app setting for the function app's main Storage account connection string (which is AzureWebJobsStorage). 您可以指定要用於儲存體帳戶的自訂應用程式設定,方法是新增 StorageAccountAttribute 並將屬性陣列傳遞至 BindAsync<T>()You can specify a custom app setting to use for the Storage account by adding the StorageAccountAttribute and passing the attribute array into BindAsync<T>(). 使用 Binder 參數,而不是 IBinderUse a Binder parameter, not IBinder. 例如:For example:

public static class IBinderExampleMultipleAttributes
{
    [FunctionName("CreateBlobInDifferentStorageAccount")]
    public async static Task RunAsync(
            [QueueTrigger("myqueue-items-source-binder2")] string myQueueItem,
            Binder binder,
            ILogger log)
    {
        log.LogInformation($"CreateBlobInDifferentStorageAccount function processed: {myQueueItem}");
        var attributes = new Attribute[]
        {
        new BlobAttribute($"samples-output/{myQueueItem}", FileAccess.Write),
        new StorageAccountAttribute("MyStorageAccount")
        };
        using (var writer = await binder.BindAsync<TextWriter>(attributes))
        {
            await writer.WriteAsync("Hello World!!");
        }
    }
}

觸發和繫結Triggers and bindings

下表顯示 Azure Functions 執行時間的主要版本所支援的系結:This table shows the bindings that are supported in the major versions of the Azure Functions runtime:

TypeType 1.x1.x 2.x 和更新版本12.x and higher1 觸發程序Trigger 輸入Input 輸出Output
Blob 儲存體Blob storage
Cosmos DBCosmos DB
Event GridEvent Grid
事件中樞Event Hubs
HTTP & webhookHTTP & webhooks
IoT 中心IoT Hub
Microsoft Graph
Excel 資料表
Microsoft Graph
Excel tables
Microsoft Graph
OneDrive 檔案
Microsoft Graph
OneDrive files
Microsoft Graph
Outlook 電子郵件
Microsoft Graph
Outlook email
Microsoft Graph
事件
Microsoft Graph
events
Microsoft Graph
驗證權杖
Microsoft Graph
Auth tokens
行動應用程式Mobile Apps
通知中樞Notification Hubs
佇列儲存體Queue storage
SendGridSendGrid
服務匯流排Service Bus
SignalRSignalR
資料表儲存體Table storage
計時器Timer
TwilioTwilio

1從版本2.x 執行時間開始,必須註冊 HTTP 和計時器以外的所有系結。1 Starting with the version 2.x runtime, all bindings except HTTP and Timer must be registered. 請參閱註冊繫結延伸模組See Register binding extensions.

後續步驟Next steps