Beispiel #1
0
        public ElementDef <T> Element <T>(params XName[] names)
        {
            if (names == null || names.Length == 0)
            {
                names = Namespaces.Select(ns => GetName <T>(ns)).ToArray();
            }

            var def = new ElementDef <T>(this, names[0]);

            Register(def);

            for (var i = 1; i < names.Length; i++)
            {
                Register(new ElementFork(def, names[i]));
            }

            return(def);
        }
 internal PropertyCollection(ElementDef <T> elementDef, XNamespace[] namespaces, DefCollection <IPropertyDef> properties)
 {
     _elementDef = elementDef;
     _namespaces = namespaces;
     _properties = properties;
 }