AgentInterfaceAttribute.ProcessDelegate Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The name of the AgentApplication method that will process requests for this interface.
public string? ProcessDelegate { get; }
member this.ProcessDelegate : string
Public ReadOnly Property ProcessDelegate As String
Property Value
Remarks
If not specified, incoming requests call an Host specific method. For example, CloudAdapter.ProcessAsync. The indicated method for the AspNet CloudAdapter would be Task MyProcessAsync(HttpRequest, HttpResponse, IAgentHttpAdapter, IAgent, CancellationToken)
Example for AspNet:
[AgentInterface(protocol: AgentTransportProtocol.ActivityProtocol, path: "/api/messages"), processDelegate: MyProcessDelegate]
class MyAgent : AgentApplication
{
private async Task MyProcessDelegate(HttpRequest httpRequest, HttpResponse httpResponse, IAgentHttpAdapter adapter, IAgent agent, CancellationToken cancellationToken)
{
// Custom processing logic here
await adapter.ProcessAsync(httpRequest, httpResponse, agent, cancellationToken).ConfigureAwait(false);
// And/or custom processing logic here
}
}