/// <summary> /// Check whether Pattern is actionable or not based on PatternMethod /// </summary> /// <param name="ptn"></param> /// <returns></returns> public static bool IsUIActionablePatternByPatternMethodType(this A11yPattern ptn) { return((from m in ptn.GetType().GetMethods() let a = m.GetCustomAttribute(typeof(PatternMethodAttribute)) where a != null && (bool)a.GetType().GetProperty("IsUIAction").GetValue(a) == true select a).Count() != 0); }
/// <summary> /// Check whether Pattern is actionable or not based on PatternMethod /// </summary> /// <param name="ptn"></param> /// <returns></returns> public static bool IsUIActionablePatternByPatternMethodType(this A11yPattern ptn) { if (ptn == null) { throw new ArgumentNullException(nameof(ptn)); } return((from m in ptn.GetType().GetMethods() let a = m.GetCustomAttribute(typeof(PatternMethodAttribute)) where a != null && (bool)a.GetType().GetProperty("IsUIAction").GetValue(a) == true select a).Any()); }