OpenHome.Net.ControlPoint.Invocation.Invocation C# (CSharp) Метод

Invocation() приватный Метод

Constructor. Not intended for external use (use CpService.Invocation instead)
private Invocation ( CpService aService, IntPtr aAction, CpProxy aCallback ) : System
aService CpService Service the action is being invoked on
aAction System.IntPtr Handle to the action being invoked
aCallback CpProxy Callback to run when the action completes
Результат System
        internal Invocation(CpService aService, IntPtr aAction, CpProxy.CallbackAsyncComplete aCallback)
        {
            iService = aService;
            iInputArgs = new List<Argument>();
            iOutputArgs = new List<Argument>();
            GCHandle gch = GCHandle.Alloc(this); /* no need to store gch as a member as AsyncComplete is guaranteed
                                                    to be called, even in error cases */
            iAsyncComplete = aCallback;
            iCallbackAsyncComplete = new CpProxy.CallbackActionComplete(AsyncComplete);
            IntPtr ptr = GCHandle.ToIntPtr(gch);
            iHandle = CpServiceInvocation(aService.Handle(), aAction, iCallbackAsyncComplete, ptr);
        }