private static void LoadDeclarationsElement(DeclarationsElement element, Snippet snippet) { if (element.Literals != null) { LoadLiterals(element.Literals, snippet); } if (element.Objects != null) { LoadObjects(element.Objects, snippet); } }
private static DeclarationsElement CreateDeclarationsElement(SerializationContext context) { var elements = new DeclarationsElement(); LiteralElement[] literals = CreateLiteralElements(context).ToArray(); ObjectElement[] objects = CreateObjectElements(context).ToArray(); if (literals.Length > 0) { elements.Literals = literals; } if (objects.Length > 0) { elements.Objects = objects; } return(elements); }