Exemplo n.º 1
0
        //PUBLIC METHODS
        /// <summary>
        /// Gets human readable event name
        /// </summary>
        public static string FormatName(IHasName obj)
        {
            //get enum name of object
            var name = obj.GetName();

            //convert enum name to string
            var nameWithoutSpaces = name.ToString();

            //add spaces in between camel case letters
            var nameWithSpace = SplitCamelCase(nameWithoutSpaces);

            return(nameWithSpace);
        }
 public static bool IsNamed(this IHasName that, string name)
 {
     return(that.GetName() == name);
 }