Share via


AIFunctionContext Class

Definition

Provides additional context to the invocation of an AIFunction created by AIFunctionFactory.

public ref class AIFunctionContext
public class AIFunctionContext
type AIFunctionContext = class
Public Class AIFunctionContext
Inheritance
AIFunctionContext

Remarks

A delegate or MethodInfo passed to AIFunctionFactory methods may represent a method that has a parameter of type AIFunctionContext. Whereas all other parameters are passed by name from the supplied collection of arguments, a AIFunctionContext parameter is passed specially by the AIFunction implementation, in order to pass relevant context into the method's invocation. For example, any CancellationToken passed to the InvokeAsync(IEnumerable<KeyValuePair<String,Object>>, CancellationToken) method is available from the CancellationToken property.

Constructors

AIFunctionContext()

Initializes a new instance of the AIFunctionContext class.

Properties

CancellationToken

Gets or sets a CancellationToken related to the operation.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to