Ejemplo n.º 1
0
        /// <summary>
        /// Markup a rendering element with the specified classes.
        /// </summary>
        /// <param name="elem">rendering element</param>
        /// <param name="classes">classes</param>
        /// <returns>the marked element</returns>
        public static MarkedElement Markup(IRenderingElement elem, params string[] classes)
        {
            Debug.Assert(elem != null);
            var tagElem = new MarkedElement(elem);

            foreach (var cls in classes)
            {
                tagElem.AddClass(cls);
            }
            return(tagElem);
        }
Ejemplo n.º 2
0
        private static MarkedElement MarkupChemObj(IRenderingElement elem, IChemObject chemObj)
        {
            Debug.Assert(elem != null);
            var tagElem = new MarkedElement(elem);

            if (chemObj != null)
            {
                tagElem.Id = chemObj.GetProperty <string>(IdKey);
                tagElem.AddClass(chemObj.GetProperty <string>(ClassKey));
            }
            return(tagElem);
        }