internal class Program
{
private static async Task Main(string[] args)
{
var serChannel = Channel.Serial.Open("COM2", 9600);
var ws = serChannel.GetWorkspaces().Result.ToList();
if (!ws.Any())
{
System.Console.WriteLine("No workspaces found!");
return;
}
var progress = new ProgressIndicator();
progress.PropertyChanged += (sender, args) =>
{
var data = progress.PercentComplete.ToString("##.##");
System.Console.WriteLine(data);
};
serChannel.Use(progress);
var wsData = serChannel.DownloadWorkspace(ws.First()).Result;
}
}
C#