public override string ToString() { StringBuilder sb = new StringBuilder(); if (!string.IsNullOrEmpty(Context.Language)) { sb.AppendFormat("Language: '{0}'", Context.Language); sb.AppendLine(); } if (!string.IsNullOrEmpty(Context.ProjectType)) { sb.AppendFormat("ProjectType: '{0}'", Context.ProjectType); sb.AppendLine(); } if (!string.IsNullOrEmpty(Context.FrontEndFramework)) { sb.AppendFormat("Front End Framework: '{0}'", Context.FrontEndFramework); sb.AppendLine(); } if (!string.IsNullOrEmpty(Context.BackEndFramework)) { sb.AppendFormat("Back End Framework: '{0}'", Context.BackEndFramework); sb.AppendLine(); } foreach (var property in Context.PropertyBag) { sb.AppendFormat($"{property.Key.ToLowerInvariant()}", property.Value); sb.AppendLine(); } if (Pages.Any()) { sb.AppendFormat("Pages: '{0}'", string.Join(", ", Pages.Select(p => $"{p.Name} - {p.TemplateId}").ToArray())); sb.AppendLine(); } if (Features.Any()) { sb.AppendFormat("Features: '{0}'", string.Join(", ", Features.Select(p => $"{p.Name} - {p.TemplateId}").ToArray())); sb.AppendLine(); } if (Services.Any()) { sb.AppendFormat("Services: '{0}'", string.Join(", ", Services.Select(p => $"{p.Name} - {p.TemplateId}").ToArray())); sb.AppendLine(); } if (Testing.Any()) { sb.AppendFormat("Testing: '{0}'", string.Join(", ", Testing.Select(p => $"{p.Name} - {p.TemplateId}").ToArray())); sb.AppendLine(); } return(sb.ToString()); }
public override string ToString() { StringBuilder sb = new StringBuilder(); if (!string.IsNullOrEmpty(Language)) { sb.AppendFormat("Language: '{0}'", Language); sb.AppendLine(); } if (!string.IsNullOrEmpty(ProjectType)) { sb.AppendFormat("ProjectType: '{0}'", ProjectType); sb.AppendLine(); } if (!string.IsNullOrEmpty(FrontEndFramework)) { sb.AppendFormat("Front End Framework: '{0}'", FrontEndFramework); sb.AppendLine(); } if (!string.IsNullOrEmpty(BackEndFramework)) { sb.AppendFormat("Back End Framework: '{0}'", BackEndFramework); sb.AppendLine(); } if (Pages.Any()) { sb.AppendFormat("Pages: '{0}'", string.Join(", ", Pages.Select(p => $"{p.Name} - {p.TemplateId}").ToArray())); sb.AppendLine(); } if (Features.Any()) { sb.AppendFormat("Features: '{0}'", string.Join(", ", Features.Select(p => $"{p.Name} - {p.TemplateId}").ToArray())); sb.AppendLine(); } if (Services.Any()) { sb.AppendFormat("Services: '{0}'", string.Join(", ", Services.Select(p => $"{p.Name} - {p.TemplateId}").ToArray())); sb.AppendLine(); } if (Testing.Any()) { sb.AppendFormat("Testing: '{0}'", string.Join(", ", Testing.Select(p => $"{p.Name} - {p.TemplateId}").ToArray())); sb.AppendLine(); } return(sb.ToString()); }