OpenHome.Net.ControlPoint.Proxies.CpProxyUpnpOrgConnectionManager1.Dispose C# (CSharp) Method

Dispose() public method

Must be called for each class instance. Must be called before Core.Library.Close().
public Dispose ( ) : void
return void
        public void Dispose()
        {
            lock (this)
            {
                if (iHandle == IntPtr.Zero)
                    return;
                DisposeProxy();
                iHandle = IntPtr.Zero;
            }
            iActionGetProtocolInfo.Dispose();
            iActionPrepareForConnection.Dispose();
            iActionConnectionComplete.Dispose();
            iActionGetCurrentConnectionIDs.Dispose();
            iActionGetCurrentConnectionInfo.Dispose();
            iSourceProtocolInfo.Dispose();
            iSinkProtocolInfo.Dispose();
            iCurrentConnectionIDs.Dispose();
        }

Usage Example

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();
 }
All Usage Examples Of OpenHome.Net.ControlPoint.Proxies.CpProxyUpnpOrgConnectionManager1::Dispose