/// <summary> /// For printing view declaration hieararchy. /// </summary> public StringBuilder PrintViewDeclaration(StringBuilder sb, ViewDeclaration viewDeclaration, int depth) { sb.AppendLine(depth, "{0} ({1})", viewDeclaration.Id, viewDeclaration.ParentDeclaration?.Id); foreach (var child in viewDeclaration.ChildDeclarations) { PrintViewDeclaration(sb, child, depth + 1); } return(sb); }
private List <ViewDeclarationInfo> GetViewDeclarations(ViewDeclaration viewDeclaration) { var viewDeclarations = new List <ViewDeclarationInfo>(); viewDeclarations.Add(new ViewDeclarationInfo { Declaration = viewDeclaration }); foreach (var childDeclaration in viewDeclaration.ChildDeclarations) { viewDeclarations.AddRange(GetViewDeclarations(childDeclaration)); } return(viewDeclarations); }
public void Clear() { Name = null; Namespace = null; TypeName = null; FilePath = null; BasedOn = null; NeedUpdate = false; ContentContainer = null; PropertyExpressions.Clear(); ViewDeclarations.Clear(); Module = null; HideInDesigner = false; ContentTemplates.Clear(); HasContentTemplates = false; HasCode = false; HasXml = false; }