protected XmlDocument WriteComponent(string element, IComponentMapping mapping)
        {
            var doc = new XmlDocument();
            var componentElement = doc.AddElement(element);

            if (mapping.IsSpecified("Name"))
            {
                componentElement.WithAtt("name", mapping.Name);
            }

            if (mapping.IsSpecified("Insert"))
            {
                componentElement.WithAtt("insert", mapping.Insert);
            }

            if (mapping.IsSpecified("Update"))
            {
                componentElement.WithAtt("update", mapping.Update);
            }

            if (mapping.IsSpecified("Access"))
            {
                componentElement.WithAtt("access", mapping.Access);
            }

            if (mapping.IsSpecified("OptimisticLock"))
            {
                componentElement.WithAtt("optimistic-lock", mapping.OptimisticLock);
            }

            return(doc);
        }
        protected XmlDocument WriteComponent(string element, IComponentMapping mapping)
        {
            var doc = new XmlDocument();
            var componentElement = doc.AddElement(element);

            if (mapping.IsSpecified("Name"))
                componentElement.WithAtt("name", mapping.Name);

            if (mapping.IsSpecified("Insert"))
                componentElement.WithAtt("insert", mapping.Insert);

            if (mapping.IsSpecified("Update"))
                componentElement.WithAtt("update", mapping.Update);

            if (mapping.IsSpecified("Access"))
                componentElement.WithAtt("access", mapping.Access);

            if (mapping.IsSpecified("OptimisticLock"))
                componentElement.WithAtt("optimistic-lock", mapping.OptimisticLock);

            return doc;
        }
Ejemplo n.º 3
0
 public override bool IsSet(Member property)
 {
     return(mapping.IsSpecified(mappedProperties.Get(property)));
 }