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
コード例 #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) { }
            }
        }
コード例 #2
0
 protected override void CompleteRequest(IntPtr aAsyncHandle)
 {
     iService.EndGetProtocolInfo(aAsyncHandle, out iSource, out iSink);
 }