Share via


ExternalRequest.Create Method

Definition

Overloads

Name Description
Create(RequestPort, Object, String)

Creates a new ExternalRequest for the specified input port and data payload.

Create<T>(RequestPort, T, String)

Creates a new ExternalRequest for the specified input port and data payload.

Create(RequestPort, Object, String)

Creates a new ExternalRequest for the specified input port and data payload.

public static Microsoft.Agents.AI.Workflows.ExternalRequest Create(Microsoft.Agents.AI.Workflows.RequestPort port, object data, string? requestId = default);
static member Create : Microsoft.Agents.AI.Workflows.RequestPort * obj * string -> Microsoft.Agents.AI.Workflows.ExternalRequest
Public Shared Function Create (port As RequestPort, data As Object, Optional requestId As String = Nothing) As ExternalRequest

Parameters

port
RequestPort

The port to invoke.

data
Object

The data contained in the request.

requestId
String

An optional unique identifier for this request instance. If null, a UUID will be generated.

Returns

An ExternalRequest instance containing the specified port, data, and request identifier.

Exceptions

Thrown when the input data object does not match the expected request type.

Applies to

Create<T>(RequestPort, T, String)

Creates a new ExternalRequest for the specified input port and data payload.

public static Microsoft.Agents.AI.Workflows.ExternalRequest Create<T>(Microsoft.Agents.AI.Workflows.RequestPort port, T data, string? requestId = default);
static member Create : Microsoft.Agents.AI.Workflows.RequestPort * 'T * string -> Microsoft.Agents.AI.Workflows.ExternalRequest
Public Shared Function Create(Of T) (port As RequestPort, data As T, Optional requestId As String = Nothing) As ExternalRequest

Type Parameters

T

The type of request data.

Parameters

port
RequestPort

The input port that identifies the target endpoint for the request. Must not be null.

data
T

The data payload to include in the request. Must not be null.

requestId
String

An optional identifier for the request. If null, a default identifier may be assigned.

Returns

An ExternalRequest instance containing the specified port, data, and request identifier.

Applies to