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