Skip to content

VoiceOptionsValidator

Namespace AgentPrism · Assembly AgentPrism.Voice.dll

Validates VoiceOptions values while the application STARTS.

public sealed class VoiceOptionsValidator : IValidateOptions<VoiceOptions>

objectVoiceOptionsValidator

IValidateOptions<VoiceOptions>

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

Validation is hand-written: ValidateDataAnnotations uses reflection and breaks AOT compatibility.

The error message never carries the API key. Writing the value while saying the key is wrong would hand the secret to whoever sees the error.

public VoiceOptionsValidator()
public ValidateOptionsResult Validate(string? name, VoiceOptions options)

name string?

options VoiceOptions

ValidateOptionsResult