Method AddAgent
- Namespace
- LMKit.Agents.Resilience
- Assembly
- LM-Kit.NET.dll
AddAgent(Agent)
Adds an agent to the fallback chain.
public FallbackAgentExecutor AddAgent(Agent agent)
Parameters
agentAgentThe agent to add.
Returns
- FallbackAgentExecutor
This executor for method chaining.
AddAgent(Agent, Func<ResilienceContext, bool>)
Adds an agent with a condition for when it should be used.
public FallbackAgentExecutor AddAgent(Agent agent, Func<ResilienceContext, bool> condition)
Parameters
agentAgentThe agent to add.
conditionFunc<ResilienceContext, bool>Condition that must be true for this agent to be tried.
Returns
- FallbackAgentExecutor
This executor for method chaining.
AddAgent(Func<Agent>)
Adds an agent factory for lazy creation.
public FallbackAgentExecutor AddAgent(Func<Agent> agentFactory)
Parameters
Returns
- FallbackAgentExecutor
This executor for method chaining.