SyncGetProtocolInfo() public method

Invoke the action synchronously
Blocks until the action has been processed on the device and sets any output arguments
public SyncGetProtocolInfo ( String &aSource, String &aSink ) : void
aSource String
aSink String
return void
Ejemplo n.º 1
0
 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();
 }
Ejemplo n.º 2
0
 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.CpDevice 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();
 }