예제 #1
0
 public void InvokeAsync(System.String Caller, System.String DeviceUDN, System.String ServiceID, System.String Action, System.Byte[] InArgs, System.Int32 Handle, object _Tag, Delegate_OnResult_InvokeAsync _Callback)
 {
     UPnPArgument[] args = new UPnPArgument[6];
        args[0] = new UPnPArgument("Caller", Caller);
        args[1] = new UPnPArgument("DeviceUDN", DeviceUDN);
        args[2] = new UPnPArgument("ServiceID", ServiceID);
        args[3] = new UPnPArgument("Action", Action);
        args[4] = new UPnPArgument("InArgs", InArgs);
        args[5] = new UPnPArgument("Handle", Handle);
        _S.InvokeAsync("InvokeAsync", args, new object[2]{_Tag,_Callback},new UPnPService.UPnPServiceInvokeHandler(Sink_InvokeAsync), new UPnPService.UPnPServiceInvokeErrorHandler(Error_Sink_InvokeAsync));
 }
예제 #2
0
 public void RemoveWeakEvent_Result_InvokeAsync(Delegate_OnResult_InvokeAsync d)
 {
     WeakReference[] WR = (WeakReference[])WeakList_InvokeAsync.ToArray(typeof(WeakReference));
        foreach(WeakReference W in WR)
        {
        if(W.IsAlive)
        {
           if((Delegate_OnResult_InvokeAsync)W.Target == d)
           {
                    WeakList_InvokeAsync.Remove(W);
                       break;
           }
        }
        }
 }
예제 #3
0
 public void AddWeakEvent_Result_InvokeAsync(Delegate_OnResult_InvokeAsync d)
 {
     WeakList_InvokeAsync.Add(new WeakReference(d));
 }