InvocationsServer.Run Method

Definition

Overloads

Name Description
Run(Func<IServiceProvider,InvocationHandler>, String[], Action<AgentHostBuilder>)

Builds and runs an Invocations protocol server using a factory delegate for handler construction. Use this when you need full control over how the handler is created.

Run<THandler>(String[], Action<AgentHostBuilder>)

Builds and runs an Invocations protocol server using the specified handler type. This is the fastest path to a working server — one line of code.

Run(Func<IServiceProvider,InvocationHandler>, String[], Action<AgentHostBuilder>)

Source:
InvocationsServer.cs

Builds and runs an Invocations protocol server using a factory delegate for handler construction. Use this when you need full control over how the handler is created.

public static void Run(Func<IServiceProvider,Azure.AI.AgentServer.Invocations.InvocationHandler> factory, string[]? args = default, Action<Azure.AI.AgentServer.Core.AgentHostBuilder>? configure = default);
static member Run : Func<IServiceProvider, Azure.AI.AgentServer.Invocations.InvocationHandler> * string[] * Action<Azure.AI.AgentServer.Core.AgentHostBuilder> -> unit
Public Shared Sub Run (factory As Func(Of IServiceProvider, InvocationHandler), Optional args As String() = Nothing, Optional configure As Action(Of AgentHostBuilder) = Nothing)

Parameters

factory
Func<IServiceProvider,InvocationHandler>

A factory that receives the service provider and returns an InvocationHandler.

args
String[]

Optional command-line arguments.

configure
Action<AgentHostBuilder>

Optional callback to further configure the builder before running.

Applies to

Run<THandler>(String[], Action<AgentHostBuilder>)

Source:
InvocationsServer.cs

Builds and runs an Invocations protocol server using the specified handler type. This is the fastest path to a working server — one line of code.

public static void Run<THandler>(string[]? args = default, Action<Azure.AI.AgentServer.Core.AgentHostBuilder>? configure = default) where THandler : Azure.AI.AgentServer.Invocations.InvocationHandler;
static member Run : string[] * Action<Azure.AI.AgentServer.Core.AgentHostBuilder> -> unit (requires 'Handler :> Azure.AI.AgentServer.Invocations.InvocationHandler)
Public Shared Sub Run(Of THandler As InvocationHandler) (Optional args As String() = Nothing, Optional configure As Action(Of AgentHostBuilder) = Nothing)

Type Parameters

THandler

The InvocationHandler implementation to handle invocations.

Parameters

args
String[]

Optional command-line arguments.

configure
Action<AgentHostBuilder>

Optional callback to further configure the builder before running.

Applies to