public IList <MessageBusMessage> GetHistory()
        {
            var history = _messageBusService.GetHistory();

            history.Reverse();
            return(history);
        }
示例#2
0
    public IList <MessageBusMessage> GetHistory(string typeFilter = null)
    {
        var history = _messageBusService.GetHistory();

        if (!string.IsNullOrEmpty(typeFilter))
        {
            history.RemoveAll(i =>
            {
                if (!i.InnerMessage.TryGetValue("type", out var typeValue))
                {
                    return(false);
                }

                var type = Convert.ToString(typeValue, CultureInfo.InvariantCulture);
                return(!string.Equals(type, typeFilter, StringComparison.Ordinal));
            });
        }

        return(history);
    }