Esempio n. 1
0
        static async Task Main(string[] args)
        {
            Console.Write("Select role: ");
            var role         = SelectRole(Console.ReadLine());
            var speechReader = new SpeechReader(SpeechLoader.GetAll(), role);


            using (var rdfClient = new RdfClient(role, speechReader))
            {
                rdfClient.IsEnd.WaitOne();
            }
        }
Esempio n. 2
0
        public RdfClient(string name, SpeechReader reader)
        {
            _httpClient = new HttpClient();
            Name        = name;
            _reader     = reader;
            NotificationHandler.Instance.Value.StartHandling(Guid.NewGuid()).Wait();
            NotificationHandler.Instance.Value.NewMessageReceive += OnMessage;

            var speech = _reader.TrySayFirst();

            if (speech is not null)
            {
                Say(speech.Content);
            }
        }