Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="m"></param>
        /// <param name="p"></param>
        /// <returns></returns>
        public static T GetProperty <T>(DomainModel m, string p)
            where T : new()
        {
            var dict = ((IDictionary <String, object>)m.Bag);

            var hasKey = dict.TryGetValue(p, out object res);

            if (!hasKey)
            {
                return(default);
Esempio n. 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="m"></param>
 /// <param name="propertyName"></param>
 /// <returns></returns>
 public static bool HasProperty(DomainModel m, string propertyName)
 {
     return(HasProperty(m.Bag, propertyName));
 }