Class NameUtil
Utility class for handling object names and display names.
public static class NameUtil
- Inheritance
-
NameUtil
- Inherited Members
Fields
UnsetText
Default text used when a name is not set.
public const string UnsetText = "Unset"
Field Value
Methods
GetSelectionName(object)
Gets the selection name for an object, using custom implementation if available, or falling back to type display name or type name.
public static string GetSelectionName(this object src)
Parameters
src
objectThe source object to get the name for
Returns
- string
The selection name for the object
GetSelectionName(Type)
Gets the selection name for a type, using its DisplayName attribute if available, or falling back to the type name.
public static string GetSelectionName(this Type type)
Parameters
type
TypeThe type to get the name for
Returns
- string
The selection name for the type