Пример #1
0
 /// <summary>
 /// Reads a string asynchronous up to the next <see cref="NewLine"/> character.
 /// </summary>
 /// <returns>An awaitable <see cref="Task{String}"/> returning the string read</returns>
 public static async Task <string> ReadLineAsync(this ArduinoSession session)
 {
     return(await Task.Run(() => session.messageHeader.GetStringFromQueue(StringRequest.CreateReadLineRequest())));
 }
Пример #2
0
 /// <summary>
 /// Reads a string up to the next <see cref="NewLine"/> character.
 /// </summary>
 /// <returns>The string read</returns>
 public static string ReadLine(this ArduinoSession session)
 {
     return(session.messageHeader.GetStringFromQueue(StringRequest.CreateReadLineRequest()));
 }