17 references to new
Microsoft.Extensions.AI.Abstractions (6)
TextToSpeech\TextToSpeechResponseUpdateKind.cs (6)
22public static TextToSpeechResponseUpdateKind SessionOpen { get; } = new("sessionopen"); 25public static TextToSpeechResponseUpdateKind Error { get; } = new("error"); 28public static TextToSpeechResponseUpdateKind AudioUpdating { get; } = new("audioupdating"); 31public static TextToSpeechResponseUpdateKind AudioUpdated { get; } = new("audioupdated"); 34public static TextToSpeechResponseUpdateKind SessionClose { get; } = new("sessionclose"); 99new(reader.GetString()!);
Microsoft.Extensions.AI.Abstractions.Tests (11)
TextToSpeech\TextToSpeechResponseUpdateKindTests.cs (9)
15Assert.Equal("abc", new TextToSpeechResponseUpdateKind("abc").Value); 21Assert.Throws<ArgumentNullException>("value", () => new TextToSpeechResponseUpdateKind(null!)); 22Assert.Throws<ArgumentException>("value", () => new TextToSpeechResponseUpdateKind(" ")); 28var kind1 = new TextToSpeechResponseUpdateKind("abc"); 29var kind2 = new TextToSpeechResponseUpdateKind("ABC"); 35var kind3 = new TextToSpeechResponseUpdateKind("def"); 41Assert.Equal(kind1.GetHashCode(), new TextToSpeechResponseUpdateKind("abc").GetHashCode()); 42Assert.Equal(kind1.GetHashCode(), new TextToSpeechResponseUpdateKind("ABC").GetHashCode()); 58var kind = new TextToSpeechResponseUpdateKind("abc");
TextToSpeech\TextToSpeechResponseUpdateTests.cs (2)
27Kind = new TextToSpeechResponseUpdateKind("custom"), 49Kind = new TextToSpeechResponseUpdateKind("audiogenerated"),