public StateClass(XStateClass stateClass) { Name = stateClass.ToDescription(); IconData = stateClass.ToString(); }
internal static string GetStateClassName(XStateClass stateClass) { var type = typeof (XStateClass); var memInfo = type.GetMember(stateClass.ToString()); var attributes = memInfo[0].GetCustomAttributes(typeof (DescriptionAttribute), false); return ((DescriptionAttribute)attributes[0]).Description; }