Example #1
0
        /// <summary>
        /// Add a &lt;Value>-Attribute
        /// </summary>
        /// <param name="this"></param>
        /// <param name="type"></param>
        /// <param name="value"></param>
        /// <param name="action"></param>
        /// <returns></returns>
        public static T AddValue <T>(this T @this, CG.ValueType type, string value, Action <Value> action)
            where T : BaseCoreCompareElement <T>
        {
            var val = new Value(type, value);

            action(val);
            @this.Childs.Add(val);
            return(@this);
        }
Example #2
0
 /// <summary>
 /// Add a &lt;Value>-Attribute
 /// </summary>
 /// <param name="this"></param>
 /// <param name="type"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 public static T AddValue <T>(this T @this, CG.ValueType type, string value)
     where T : BaseCoreCompareElement <T>
 {
     return(AddValue(@this, type, value, x => { }));
 }