/// <summary> /// Call blocks until the result is received. Use Send for a nonblocking call. /// </summary> /// <param name="notify">Call</param> /// <returns>Result or null if failed</returns> public Notify Call(Notify notify) { var callresult = new CallResultWait(notify, true); lock (WaitLock) { if (WaitInvokeList == null) return null; WaitInvokeList.Add(callresult); } notify.InvokeId = CurrentInvoke.Increment(); InternalSend(notify, false); callresult.Wait.WaitOne(-1); return callresult.Result; }