in DataStreamerAppServiceUWPCommSample/DataStreamerAppServiceUWPCommSample/App.xaml.cs [182:201]
private async Task WriteDataAsync(string data)
{
if (DataStreamerConnection == null)
{
throw new ObjectDisposedException(nameof(DataStreamerConnection));
}
ValueSet message = new ValueSet();
AppServiceResponse response = null;
message.Add("Command", "Write");
message.Add("Data", data);
response = await DataStreamerConnection.SendMessageAsync(message);
if (response.Status != AppServiceResponseStatus.Success)
{
Debug.WriteLine($"Failed to send data: {response.Status.ToString()}");
}
}