/// <summary> /// A third option, to the Call and CallSync, /// this method is in the middle of both. /// /// Do a call, and wait for a response of the receiver /// that it *actually received the call*. It will not wait or /// return the result, nor will it wait for the result to be /// generated, only make sure the caller has received the call. /// </summary> /// <typeparam name="TType"></typeparam> /// <param name="receiverId"></param> /// <returns></returns> public TType CallConfirmed <TType>(ComponentId receiverId, TimeSpan?confirmTimeout, out CallOutcome outcome) where TType : class { outcome = new CallOutcome(); return(DoCall <TType>(receiverId, confirmTimeout, null, null, null, null, SuperPoolProxyCall.ModeEnum.Default, outcome)); }
public TType CallConfirmed <TType>(ComponentId receiverId, TimeSpan?confirmTimeout, out CallOutcome outcome) where TType : class { outcome = new CallOutcome(); return(this.DoCall <TType>(receiverId, confirmTimeout, new TimeSpan?(), (AsyncCallResultDelegate)null, (object)null, new TimeSpan?(), SuperPoolProxyCall.ModeEnum.Default, outcome)); }
/// <summary> /// Perform the actual call. /// </summary> protected TType DoCall <TType>(ComponentId receiverId, TimeSpan?requestConfirmTimeout, TimeSpan?timeout, AsyncCallResultDelegate asyncResultDelegate, object asyncResultState, TimeSpan?asyncResultTimeout, SuperPoolProxyCall.ModeEnum callMode, CallOutcome outcome) where TType : class { Matrix.Framework.SuperPool.Core.SuperPool pool = _superPool; if (pool == null) { return(null); } SuperPoolProxyCall proxyCall; TType result; if (pool.Call <TType>(this, receiverId, out result, out proxyCall) == false) { // Call failed. return(null); } proxyCall.AsyncResultDelegate = asyncResultDelegate; proxyCall.AsyncResultState = asyncResultState; proxyCall.AsyncResultTimeout = asyncResultTimeout; proxyCall.RequestConfirmTimeout = requestConfirmTimeout; proxyCall.Timeout = timeout; proxyCall.Mode = callMode; proxyCall.Outcome = outcome; return(result); }
protected TType DoCall <TType>(ComponentId receiverId, TimeSpan?requestConfirmTimeout, TimeSpan?timeout, AsyncCallResultDelegate asyncResultDelegate, object asyncResultState, TimeSpan?asyncResultTimeout, SuperPoolProxyCall.ModeEnum callMode, CallOutcome outcome) where TType : class { SuperPool superPool = this._superPool; if (superPool == null) { return(default(TType)); } TType result; SuperPoolProxyCall call; if (!superPool.Call <TType>(this, receiverId, out result, out call)) { return(default(TType)); } call.AsyncResultDelegate = asyncResultDelegate; call.AsyncResultState = asyncResultState; call.AsyncResultTimeout = asyncResultTimeout; call.RequestConfirmTimeout = requestConfirmTimeout; call.Timeout = timeout; call.Mode = callMode; call.Outcome = outcome; return(result); }