Пример #1
0
        private static void LoadDeclarationsElement(DeclarationsElement element, Snippet snippet)
        {
            if (element.Literals != null)
                LoadLiterals(element.Literals, snippet);

            if (element.Objects != null)
                LoadObjects(element.Objects, snippet);
        }
Пример #2
0
        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;
        }