public static string ToDescriptionString(this FunctionOption options) { DescriptionAttribute[] attributes = (DescriptionAttribute[])options.GetType().GetField(options.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), false); return(attributes.Length > 0 ? attributes[0].Description : string.Empty); }