예제 #1
0
 public static void ExecuteOn_Up_Through_Up(XComponent.Common.Event.DefaultEvent defaultEvent, XComponent.HistoryManager.UserObject.PublishedHistory publishedHistory, object object_InternalMember, RuntimeContext context, IUpDefaultEventOnUpHistoryManagerSenderInterface sender)
 {
     TriggeredMethodContext.Instance.GetDefaultLogger().Info("History manager started!");
 }
예제 #2
0
        public static void ExecuteOn_Up_Through_HistoryRequestReceived(XComponent.HistoryManager.UserObject.HistoryRequest historyRequest, XComponent.HistoryManager.UserObject.PublishedHistory publishedHistory, object object_InternalMember, RuntimeContext context, IHistoryRequestReceivedHistoryRequestOnUpHistoryManagerSenderInterface sender)
        {
            TriggeredMethodContext.Instance.GetDefaultLogger().Info($"Request received for messages in room {historyRequest.RoomName}...");
            TriggeredMethodContext.Instance.GetDefaultLogger().Info($"Sending response in private topic {historyRequest.ResponseTopic}...");

            sender.PublishRequestResponse(context,
                                          new HistoryResponse()
            {
                PublishedHistory = new PublishedHistory()
                {
                    Messages = new List <PublishedMessage>(
                        publishedHistory
                        .Messages
                        .Where(message => message.Room == historyRequest.RoomName))
                },
                ResponseTopic = historyRequest.ResponseTopic
            });
        }
예제 #3
0
 public static void ExecuteOn_Up_Through_MessageReceived(XComponent.ChatManager.UserObject.PublishedMessage publishedMessage, XComponent.HistoryManager.UserObject.PublishedHistory publishedHistory, object object_InternalMember, RuntimeContext context, IMessageReceivedPublishedMessageOnUpHistoryManagerSenderInterface sender)
 {
     // Notice: No concurrency here, thanks to our bus + akka core.
     publishedHistory.Messages.Add(publishedMessage);
 }