public static string CreateEntityAndAttributeDescription(EntityIntellisenseData entity, AttributeIntellisenseData attribute) { List <string> lines = new List <string>(); if (entity.IsIntersectEntity) { lines.Add("IntersectEntity"); if (entity.ManyToManyRelationships != null) { var relations = entity.ManyToManyRelationships.Values.Where(r => string.Equals(r.IntersectEntityName, entity.EntityLogicalName, StringComparison.InvariantCultureIgnoreCase)); foreach (var rel in relations.OrderBy(r => r.Entity1Name).ThenBy(r => r.Entity2Name).ThenBy(r => r.Entity1IntersectAttributeName).ThenBy(r => r.Entity2IntersectAttributeName)) { lines.Add(string.Format("{0} - {1}", rel.Entity1Name, rel.Entity2Name)); } } } CreateFileHandler.FillLabelEntity(lines, true, entity.DisplayName, entity.DisplayCollectionName, entity.Description); lines.Add(string.Empty); lines.Add(string.Format("Attribute:\t{0}", GetDisplayTextAttribute(entity.EntityLogicalName, attribute))); FillDescriptionAttribute(lines, attribute); return(string.Join(System.Environment.NewLine, lines)); }
public IEnumerable <string> GetCommentsForEntity(EntityMetadata entityMetadata) { List <string> comments = new List <string>(); CreateFileHandler.FillLabelEntity(comments, _config.AllDescriptions, entityMetadata.DisplayName, entityMetadata.DisplayCollectionName, entityMetadata.Description, _config.TabSpacer); return(comments); }