Skip to content

AzureOpenAIProviderOptionsValidator

Namespace AgentPrism · Assembly AgentPrism.Azure.dll

Validates AzureOpenAIProviderOptions when the application starts.

public sealed class AzureOpenAIProviderOptionsValidator : IValidateOptions<AzureOpenAIProviderOptions>

objectAzureOpenAIProviderOptionsValidator

IValidateOptions<AzureOpenAIProviderOptions>

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.Azure must stay AOT compatible.

Error messages contain neither the API key nor the endpoint address. Validation messages go to the log and to the startup exception.

public AzureOpenAIProviderOptionsValidator()

Validate(string?, AzureOpenAIProviderOptions)

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

name string?

options AzureOpenAIProviderOptions

ValidateOptionsResult