internal Word(int index, WordMessage wordMessage) { if (index < 0) { throw new ArgumentOutOfRangeException(nameof(index), "Index must be non-negative."); } if (wordMessage == null) { throw new ArgumentNullException(nameof(wordMessage)); } Index = index; Confidence = wordMessage.Confidence; Value = wordMessage.Value; }
public void SendWord([FromBody] WordMessage word) => _producer.Send(word.Message);