public SetStatus ( ResultStatus status ) : void | ||
status | ResultStatus | |
return | void |
private void notifyResultError(string @ref, ResultStatus resultStatus, string errorMsg, Action<HMessage> messageDelegate) { JObject obj = new JObject(); obj["errorMsg"] = errorMsg; HResult result = new HResult(); result.SetStatus(resultStatus); result.SetResult(obj); HMessage message = new HMessage(); message.SetRef(@ref); message.SetType("hResult"); message.SetPayload(result); this.notifyMessage(message, messageDelegate); }
//---private methods--- private HMessage InnerBuildResult(string actor, string @ref, ResultStatus? status, JToken result, HMessageOptions mOptions) { if (actor == null || actor.Length <= 0) throw new MissingAttrException("actor"); if (@ref == null || @ref.Length <= 0) throw new MissingAttrException("ref"); if (status == null) throw new MissingAttrException("status"); HResult hResult = new HResult(); hResult.SetResult(result); hResult.SetStatus(status); if (mOptions == null) mOptions = new HMessageOptions(); mOptions.Ref = @ref; return BuildMessage(actor, "hResult", hResult, mOptions); }