Example #1
0
        private void EnqueueMessage(IMessage message, [CallerMemberName] string method = null)
        {
            var serializedString = ChannelWriteHelper.FormatOutput(message, method);
            var queueItem        = new RegisteredClientMessageQueueItem
            {
                SerializedMessage = serializedString,
                Message           = message,
                Method            = method
            };

            if (ActiveConnection == null)
            {
                _pushNotificationSender?.SendNotification(queueItem.SerializedMessage);
            }

            MessageQueue.Enqueue(queueItem);
        }
Example #2
0
        private void EnqueueMessage(IMessage message, [CallerMemberName] string method = null)
        {
            var serializedString = ChannelWriteHelper.FormatOutput(message, method);
            var queueItem = new RegisteredClientMessageQueueItem
            {
                SerializedMessage = serializedString,
                Message = message,
                Method = method
            };

            if (ActiveConnection == null)
                _pushNotificationSender?.SendNotification(queueItem.SerializedMessage);

            MessageQueue.Enqueue(queueItem);
        }