OpenIDE.Core.Commands.CacheFormatter.FormatProject C# (CSharp) Method

FormatProject() public method

public FormatProject ( string file ) : string
file string
return string
        public string FormatProject(string file)
        {
            return string.Format("project|{0}", file);
        }

Usage Example

 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.AllFiles()
         .Where(x => filter(x, query))
         .GroupBy(x => x.Project).ToList()
         .ForEach(x =>
             {
                 if (x.Key != null)
                     sb.AppendLine(formatter.FormatProject(x.Key));
                 x.ToList()
                     .ForEach(y => sb.AppendLine(formatter.Format(y)));
             });
     _endpoint.Send(sb.ToString(), clientID);
 }