Skip to content

AnthropicProviderOptionsValidator

Namespace AgentPrism · Assembly AgentPrism.Anthropic.dll

Validates AnthropicProviderOptions settings at application startup.

public sealed class AnthropicProviderOptionsValidator : IValidateOptions<AnthropicProviderOptions>

objectAnthropicProviderOptionsValidator

IValidateOptions<AnthropicProviderOptions>

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

Validation is written by hand; ValidateDataAnnotations relies on reflection and produces IL2026. AgentPrism.Anthropic must stay AOT compatible.

Failure messages never contain the API key. Validation messages go to the log and the startup exception; leaking the key there would expose it.

public AnthropicProviderOptionsValidator()

Validate(string?, AnthropicProviderOptions)

Section titled “ Validate(string?, AnthropicProviderOptions)”
public ValidateOptionsResult Validate(string? name, AnthropicProviderOptions options)

name string?

options AnthropicProviderOptions

ValidateOptionsResult