Class Helpers
Shortcut Methods, mostly focused on getting attributes from class properties and enums.
Inheritance
System.Object
Helpers
Assembly: Supabase.Core.dll
Syntax
public static class Helpers : object
Methods
|
Improve this Doc
View Source
GetCustomAttribute<T>(Object)
Returns a cast Custom Attribute from a given object.
Declaration
public static T GetCustomAttribute<T>(object obj)
where T : Attribute
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type Parameters
|
Improve this Doc
View Source
GetCustomAttribute<T>(Type)
Returns a cast Custom Attribute from a given type.
Declaration
public static T GetCustomAttribute<T>(Type type)
where T : Attribute
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
Type Parameters
|
Improve this Doc
View Source
GetMappedToAttr(Enum)
Shortcut method for accessing a MapTo
attribute, combined with an Enum.
Declaration
public static MapToAttribute GetMappedToAttr(Enum obj)
Parameters
Type |
Name |
Description |
Enum |
obj |
|
Returns
|
Improve this Doc
View Source
GetPropertyValue<T>(Object, String)
Returns the current value from a given class property
Declaration
public static T GetPropertyValue<T>(object obj, string propName)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
System.String |
propName |
|
Returns
Type Parameters