public static TextDefinition GetFriendlyNameFor( Type t )
{
if( t.IsDefined( typeof( FriendlyNameAttribute ), false ) )
{
object[] objs = t.GetCustomAttributes( typeof( FriendlyNameAttribute ), false );
if( objs != null && objs.Length > 0 )
{
FriendlyNameAttribute friendly = objs[0] as FriendlyNameAttribute;
return friendly.FriendlyName;
}
}
return t.Name;
}