internal void InvocationComplete(Invocation aInvocation) { IntPtr handle = aInvocation.Handle(); lock (this) { for (int i=0; i<iActiveInvocations.Count; i++) { if (iActiveInvocations[i].Handle() == handle) { iActiveInvocations.RemoveAt(i); break; } } } }
/// <summary> /// Request an invocation object prior to setting input/output arguments /// </summary> /// <param name="aAction">Action which will be invoked</param> /// <param name="aCallback">Delegate to run when the action completes</param> /// <returns>Invocation object, ready to receive input and output arguments</returns> public Invocation Invocation(OpenHome.Net.Core.Action aAction, CpProxy.CallbackAsyncComplete aCallback) { Invocation invocation = new Invocation(this, aAction.Handle(), aCallback); lock (this) { iActiveInvocations.Add(invocation); } return invocation; }
/// <summary> /// Invoke an action /// </summary> /// <param name="aInvocation">Invocation object, with all input and output arguments added</param> public void InvokeAction(Invocation aInvocation) { CpServiceInvokeAction(iHandle, aInvocation.Handle()); }