17 references to new
Microsoft.Extensions.AI.Abstractions (6)
SpeechToText\SpeechToTextResponseUpdateKind.cs (6)
22public static SpeechToTextResponseUpdateKind SessionOpen { get; } = new("sessionopen"); 25public static SpeechToTextResponseUpdateKind Error { get; } = new("error"); 28public static SpeechToTextResponseUpdateKind TextUpdating { get; } = new("textupdating"); 31public static SpeechToTextResponseUpdateKind TextUpdated { get; } = new("textupdated"); 34public static SpeechToTextResponseUpdateKind SessionClose { get; } = new("sessionclose"); 99new(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"), 87Kind = new SpeechToTextResponseUpdateKind("transcribed"),