Table of Contents

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

agent Agent

The 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

agent Agent

The agent to add.

condition Func<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

agentFactory Func<Agent>

Factory to create the agent.

Returns

FallbackAgentExecutor

This executor for method chaining.