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

EndGetProtocolInfo() public method

Retrieve the output arguments from an asynchronously invoked action.
This may only be called from the callback set in the above Begin function.
public EndGetProtocolInfo ( IntPtr aAsyncHandle, String &aSource, String &aSink ) : void
aAsyncHandle System.IntPtr Argument passed to the delegate set in the above Begin function
aSource String
aSink String
return void
        public void EndGetProtocolInfo(IntPtr aAsyncHandle, out String aSource, out String aSink)
        {
            uint code;
            string desc;
            if (Invocation.Error(aAsyncHandle, out code, out desc))
            {
                throw new ProxyError(code, desc);
            }
            uint index = 0;
            aSource = Invocation.OutputString(aAsyncHandle, index++);
            aSink = Invocation.OutputString(aAsyncHandle, index++);
        }

Usage Example

Ejemplo n.º 1
0
        private void GetProtocolInfoComplete(IntPtr aAsyncHandle)
        {
            lock (this)
            {
                if (DateTime.Now >= iActionPollStopTime)
                {
                    return;
                }
                iConnMgr.BeginGetProtocolInfo(GetProtocolInfoComplete);

                try
                {
                    string source;
                    string sink;
                    iConnMgr.EndGetProtocolInfo(aAsyncHandle, out source, out sink);
                    iActionCount++;
                    if (sink == null && iExpectedSink != null)
                    {
                        Console.Write("Expected " + iExpectedSink + "\n...got (null)\n");
                    }
                    else
                    {
                        if (iExpectedSink == null)
                        {
                            iExpectedSink = sink;
                        }
                        else if (sink != iExpectedSink)
                        {
                            Console.Write("Expected " + iExpectedSink + "\n...got " + sink + "\n");
                        }
                    }
                }
                catch (ControlPoint.ProxyError) { }
            }
        }
All Usage Examples Of OpenHome.Net.ControlPoint.Proxies.CpProxyUpnpOrgConnectionManager1::EndGetProtocolInfo