public virtual DynamicXml GetXmlPropertyValue( DynamicNode model, string propertyAlias, Func<DynamicNode, bool> func = null )
        {
            DynamicXml xmlNode = null;
              string propertyValue = GetPropertyValue( model, propertyAlias, func );

              if ( !string.IsNullOrEmpty( propertyValue ) ) {
            xmlNode = new DynamicXml( XElement.Parse( propertyValue, LoadOptions.None ) );
              }

              return xmlNode;
        }
Пример #2
0
        public virtual DynamicXml GetXmlPropertyValue(DynamicNode model, string propertyAlias, Func <DynamicNode, bool> func = null)
        {
            DynamicXml xmlNode       = null;
            string     propertyValue = GetPropertyValue(model, propertyAlias, func);

            if (!string.IsNullOrEmpty(propertyValue))
            {
                xmlNode = new DynamicXml(XElement.Parse(propertyValue, LoadOptions.None));
            }

            return(xmlNode);
        }
Пример #3
0
        /// <summary>
        /// Initializes the model binder.
        /// </summary>
        /// <param name="CurrentNodeId">The current node id.</param>
        /// <param name="PropertyData">The property data.</param>
        /// <param name="instance">The instance.</param>
        /// <returns>True if initialization was successful. Otherwise false.</returns>
        public bool Init(int CurrentNodeId, string PropertyData, out object instance)
        {
            if (!Settings.RazorModelBindingEnabled)
            {
                instance = new DynamicXml(PropertyData);

                return(true);
            }

            try
            {
                var c = new GridRowCollection(PropertyData).OrderBy(x => x.SortOrder).ToList();

                instance = (GridRowCollection)c;
            }
            catch
            {
                instance = new GridRowCollection();

                return(false);
            }

            return(true);
        }
Пример #4
0
        /// <summary>
        /// Initializes the model binder.
        /// </summary>
        /// <param name="CurrentNodeId">The current node id.</param>
        /// <param name="PropertyData">The property data.</param>
        /// <param name="instance">The instance.</param>
        /// <returns>True if initialization was successful. Otherwise false.</returns>
        public bool Init(int CurrentNodeId, string PropertyData, out object instance)
        {
            if (!Settings.RazorModelBindingEnabled)
            {
                instance = new DynamicXml(PropertyData);

                return true;
            }

            try
            {
                var c = new GridRowCollection(PropertyData).OrderBy(x => x.SortOrder).ToList();

                instance = (GridRowCollection)c;
            }
            catch
            {
                instance = new GridRowCollection();

                return false;
            }

            return true;
        }
Пример #5
0
 public DynamicXml(XPathNodeIterator xpni)
 {
     _inner = new Umbraco.Core.Dynamics.DynamicXml(xpni);
 }
Пример #6
0
 public DynamicXml(string xml)
 {
     _inner = new Umbraco.Core.Dynamics.DynamicXml(xml);
 }
Пример #7
0
 public DynamicXml(XElement baseElement)
 {
     _inner = new Umbraco.Core.Dynamics.DynamicXml(baseElement);
 }
Пример #8
0
        public DynamicXml(XPathNodeIterator xpni)
        {
			_inner = new Umbraco.Core.Dynamics.DynamicXml(xpni);
        }
Пример #9
0
        public DynamicXml(string xml)
        {
			_inner = new Umbraco.Core.Dynamics.DynamicXml(xml);
        }
Пример #10
0
 public DynamicXml(XElement baseElement)
 {
 	_inner = new Umbraco.Core.Dynamics.DynamicXml(baseElement);
 }