AgentTestHost.CreateTestFlow Method
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.
Creates a TestFlow wired to the IAgent resolved from DI. Because IAgent is registered as transient, each call produces a new agent instance. All flows share the same Adapter and its ActiveQueue.
public Microsoft.Agents.Builder.Testing.TestFlow CreateTestFlow();
member this.CreateTestFlow : unit -> Microsoft.Agents.Builder.Testing.TestFlow
Public Function CreateTestFlow () As TestFlow
Returns
Remarks
The agent is resolved from the root DI scope. Register IAgent and its dependencies as transient or singleton — scoped registrations will behave as singletons for the lifetime of the host.