public void Handle(Guid clientID, CommandMessage message)
 {
     if (clientID == Guid.Empty)
         return;
     var query = getQuery(message);
     var sb = new StringBuilder();
     sb.Append(message.CorrelationID);
     var formatter = new CacheFormatter();
     _cache.AllProjects()
         .Where(x => filter(x, query)).ToList()
         .ForEach(x => sb.AppendLine(formatter.Format(x)));
     _endpoint.Send(sb.ToString(), clientID);
 }
 public void Handle(Guid clientID, CommandMessage message)
 {
     if (message.Arguments.Count != 1)
         return;
     if (clientID == Guid.Empty)
         return;
     var sb = new StringBuilder();
     sb.Append(message.CorrelationID);
     var formatter = new CacheFormatter();
     _cache.Find(message.Arguments[0])
         .GroupBy(x => x.File).ToList()
         .ForEach(x =>
             {
                 sb.AppendLine(formatter.FormatFile(x.Key));
                 x.ToList()
                     .ForEach(y => sb.AppendLine(formatter.Format(y)));
             });
     _endpoint.Send(sb.ToString(), clientID);
 }