17 references to new
Microsoft.Extensions.AI.Abstractions (6)
SpeechToText\SpeechToTextResponseUpdateKind.cs (6)
21public static SpeechToTextResponseUpdateKind SessionOpen { get; } = new("sessionopen"); 24public static SpeechToTextResponseUpdateKind Error { get; } = new("error"); 27public static SpeechToTextResponseUpdateKind TextUpdating { get; } = new("textupdating"); 30public static SpeechToTextResponseUpdateKind TextUpdated { get; } = new("textupdated"); 33public static SpeechToTextResponseUpdateKind SessionClose { get; } = new("sessionclose"); 98new(reader.GetString()!);
Microsoft.Extensions.AI.Abstractions.Tests (11)
SpeechToText\SpeechToTextResponseUpdateKindTests.cs (9)
15Assert.Equal("abc", new SpeechToTextResponseUpdateKind("abc").Value); 21Assert.Throws<ArgumentNullException>("value", () => new SpeechToTextResponseUpdateKind(null!)); 22Assert.Throws<ArgumentException>("value", () => new SpeechToTextResponseUpdateKind(" ")); 28var kind1 = new SpeechToTextResponseUpdateKind("abc"); 29var kind2 = new SpeechToTextResponseUpdateKind("ABC"); 35var kind3 = new SpeechToTextResponseUpdateKind("def"); 41Assert.Equal(kind1.GetHashCode(), new SpeechToTextResponseUpdateKind("abc").GetHashCode()); 42Assert.Equal(kind1.GetHashCode(), new SpeechToTextResponseUpdateKind("ABC").GetHashCode()); 58var kind = new SpeechToTextResponseUpdateKind("abc");
SpeechToText\SpeechToTextResponseUpdateTests.cs (2)
32Kind = new SpeechToTextResponseUpdateKind("custom"), 88Kind = new SpeechToTextResponseUpdateKind("transcribed"),