/// <summary> /// 发布事件调用失败的结果 /// </summary> internal static void PublishRaiseFailed(dynamic identity, EventKey key, string message) { var en = EventUtil.GetRaiseResult(key.EventName, key.EventId);//消息队列的事件名称 var arg = CreatePublishRaiseResultArg(identity, key, false, message, string.Empty); EventPortal.Publish(en, arg); }
/// <summary> /// 发布事件调用成功的结果 /// </summary> /// <param name="eventName"></param> /// <param name="eventId"></param> /// <param name="message"></param> internal static void PublishRaiseSucceeded(dynamic identity, string eventName, Guid eventId, string argsCode) { var en = EventUtil.GetRaiseResult(eventName, eventId); //消息队列的事件名称 //返回事件成功被执行的结果 var arg = CreatePublishRaiseResultArg(identity, new EventKey(eventId, eventName), true, string.Empty, argsCode); EventPortal.Publish(en, arg); }
/// <summary> /// 删除由于接受调用结果而创建的临时队列 /// </summary> /// <param name="eventName"></param> /// <param name="eventId"></param> internal static void CleanupRemoteEventResult(string eventName, Guid eventId) { var raiseResultEventName = EventUtil.GetRaiseResult(eventName, eventId); EventPortal.Cleanup(raiseResultEventName); }
/// <summary> /// 订阅远程事件的返回结果的事件 /// </summary> internal static void SubscribeRemoteEventResult(string eventName, Guid eventId) { var raiseResultEventName = EventUtil.GetRaiseResult(eventName, eventId); EventPortal.Subscribe(raiseResultEventName, ReceiveResultEventHandler.Instance); }