public static string GetDescription(this DependencyFlag flag) { DescriptionAttribute[] attribs = typeof(DependencyFlag).GetField(flag.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), false) as DescriptionAttribute[]; if (attribs.Length > 0) { return(attribs[0].Description); } else { return(flag.ToString()); } }
public virtual void RaiseDependencyFlag(DependencyFlag flag) { DependencyRaisedEvent?.Invoke(flag); }