Exemple #1
0
        protected CodeRoot CreateNamespaceAndInterface(IBaseConstruct inter)
        {
            Interface interface1 = new Interface(controller, "Interface1");

            interface1.Modifiers.Add("public");
            interface1.AddChild(inter);
            AttributeSection attrs = new AttributeSection(controller);
            Attribute        attr  = new Attribute(controller);

            attr.PositionalArguments.Add("true");
            attr.Name = "Serializable";
            attrs.AddAttribute(attr);
            interface1.AddAttributeSection(attrs);
            Namespace ns = new Namespace(controller);

            ns.Name = "ArchAngel.Tests";
            ns.AddChild(interface1);
            CodeRoot root = new CodeRoot(controller);

            root.AddChild(ns);
            return(root);
        }