private void DeserializeTab(XContainer tabElement)
        {
            var tab = new Tab
            {
                Caption = tabElement.ElementValue("Caption"),
                Id      = Convert.ToInt32(tabElement.ElementValue("Id")),
                Order   = !String.IsNullOrEmpty(tabElement.ElementValue("Order"))
                            ? (int?)Convert.ToInt32(tabElement.ElementValue("Order"))
                            : null
            };

            type.Tabs.Add(tab);
        }
Beispiel #2
0
        private static void ReadTitle(this XContainer topic, NodeBase node)
        {
            var title = topic.ElementValue(Namespaces.Content("title"));

            if (!string.IsNullOrWhiteSpace(title))
            {
                node.ChangeTextTransactional(title);
            }
        }
        private void DeserializeProperty(XContainer propElement)
        {
            var prop = new GenericProperty
            {
                Name        = propElement.ElementValue("Name"),
                Alias       = propElement.ElementValue("Alias"),
                Type        = propElement.ElementValue("Type"),
                Definition  = propElement.ElementValue("Definition"),
                Tab         = propElement.ElementValue("Tab"),
                Mandatory   = Convert.ToBoolean(propElement.ElementValue("Mandatory")),
                Validation  = propElement.ElementValue("Validation"),
                Description = propElement.ElementValue("Description")
            };

            type.GenericProperties.Add(prop);
        }
Beispiel #4
0
 /// <summary>
 /// This method returns the value of the specified element.
 /// </summary>
 /// <remarks>TODO: Currently unused.</remarks>
 /// <param name="container">The XML container instance.</param>
 /// <param name="name">The name of the element to locate.</param>
 /// <returns>An XML element matching the specified name or null if the element doesn't exist.</returns>
 public static String ElementValue(this XContainer container, XName name)
 {
     return(container.ElementValue(name, StringComparison.CurrentCulture));
 }