Skip to content

InstructionCultureResolver

Namespace AgentPrism · Assembly AgentPrism.Core.dll

Resolves the instructions text a run should use from an AgentDefinition’s culture dictionary.

public static class InstructionCultureResolver

objectInstructionCultureResolver

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Resolution order: the requested culture -> its parent subtag ("tr-TR" -> "tr") -> AgentDefinition.Instructions. An unmatched culture never fails compilation; it silently falls back to the default text. Matching is case-insensitive: BCP-47 tags are conventionally lowercase, but a definition authored by hand may not be.

Resolves the instructions text for a definition and a requested culture.

public static string? Resolve(AgentDefinition definition, string? culture)

definition AgentDefinition

The definition being compiled.

culture string?

The requested culture; null or empty uses the default.

string?

The matched culture’s text, or AgentDefinition.Instructions when no entry matches (or the definition carries no culture dictionary).