private void InvokeSync()
{
// trivial validation of the sync wrappers to all APIs
// single sync call to whichever device happens to be first in our list
if (iDeviceList.Count == 0)
{
Console.Write("No devices found, so nothing to test\n");
return;
}
ControlPoint.ICpDevice device = iDeviceList[0];
Console.Write("\n\nSync call to device " + device.Udn() + "\n");
ControlPoint.Proxies.CpProxyUpnpOrgConnectionManager1 connMgr = new ControlPoint.Proxies.CpProxyUpnpOrgConnectionManager1(device);
try
{
string source;
string sink;
connMgr.SyncGetProtocolInfo(out source, out sink);
Console.Write("source is " + source + "\nsink is " + sink + "\n");
}
catch (ControlPoint.ProxyError)
{
Console.WriteLine("...failed. (This may be expected but shouldn't be easily reproducible.)");
}
connMgr.Dispose();
}