◆ GetDescription< T >()
static string BrawlLib.Internal.ObjectExtension.GetDescription< T > |
( |
this T |
obj | ) |
|
|
inlinestatic |
16 {
17 var s = ((DescriptionAttribute) obj?.GetType().GetField(obj.ToString()).GetCustomAttributes(true)
18 .FirstOrDefault(a => a is DescriptionAttribute))?.Description ?? obj?.ToString() ?? string.Empty;
19 return s;
20 }
◆ GetDisplayName< T >()
static string BrawlLib.Internal.ObjectExtension.GetDisplayName< T > |
( |
this T |
obj | ) |
|
|
inlinestatic |
10 {
11 return ((DisplayNameAttribute) obj?.GetType().GetField(obj.ToString()).GetCustomAttributes(true)
12 .FirstOrDefault(a => a is DisplayNameAttribute))?.DisplayName ?? obj?.ToString() ?? string.Empty;
13 }
The documentation for this class was generated from the following file:
- BrawlLib/Internal/ObjectExtension.cs