Delen via


FunctionContext Class

Definition

Encapsulates the information about a function execution.

public abstract class FunctionContext
type FunctionContext = class
Public MustInherit Class FunctionContext
Inheritance
FunctionContext

Constructors

FunctionContext()

Properties

BindingContext

Gets the binding context for the current function invocation. This context is used to retrieve binding data.

CancellationToken

Gets the CancellationToken that signals a function invocation is being cancelled.

Features

Gets a collection containing the features supported by this context.

FunctionDefinition

Gets the FunctionDefinition that describes the function being executed.

FunctionId

Gets the function ID, typically assigned by the host. This identifier is unique to a function and stable across invocations.

InstanceServices

Gets or sets the IServiceProvider that provides access to this execution's services.

InvocationId

Gets the invocation ID. This identifier is unique to an invocation.

Items

Gets or sets a key/value collection that can be used to share data within the scope of this invocation.

RetryContext

Gets the retry context containing information about retry acvitity for the event that triggered the current function invocation.

TraceContext

Gets the distributed tracing context.

Extension Methods

BindInputAsync<T>(FunctionContext, BindingMetadata)

Binds an input binding item for the requested BindingMetadata instance.

GetInvocationResult(FunctionContext)

Gets the invocation result of the current function invocation.

GetInvocationResult<T>(FunctionContext)

Gets the invocation result of the current function invocation.

GetOutputBindings<T>(FunctionContext)

Gets the output binding entries for the current function invocation.

GetHttpRequestDataAsync(FunctionContext)

Gets the HttpRequestData instance if the invocation is for an http trigger.

GetHttpResponseData(FunctionContext)

Gets the HttpResponseData instance if the invocation is for an http trigger.

GetLogger(FunctionContext, String)

Creates a new ILogger instance for the specified FunctionContext.

GetLogger<T>(FunctionContext)

Creates a new ILogger instance using the full name of the given type.

Applies to