Helper methods for objects.
More...
|
static ? object | GetField (object obj, string name, BindingFlags flags=BindingFlags.NonPublic|BindingFlags.Instance) |
| Searches for a field in an object and returns the value.
|
|
static ? T | GetField< T > (object obj, string name, BindingFlags flags=BindingFlags.NonPublic|BindingFlags.Instance) |
| Searches for a field in an object and returns the value.
|
|
static void | SetField (object obj, string name, object value, BindingFlags flags=BindingFlags.NonPublic|BindingFlags.Instance) |
| Sets the value of a field in an object.
|
|
static ? object | GetProperty (object obj, string name, BindingFlags flags=BindingFlags.NonPublic|BindingFlags.Instance) |
| Searches for a property in an object and returns the value.
|
|
static ? T | GetProperty< T > (object obj, string name, BindingFlags flags=BindingFlags.NonPublic|BindingFlags.Instance) |
| Searches for a property in an object and returns the value.
|
|
static void | SetProperty (object obj, string name, object value, BindingFlags flags=BindingFlags.NonPublic|BindingFlags.Instance) |
| Sets the value of a property in an object.
|
|
static ? object | InvokeMethod (string className, string methodName, BindingFlags flags=BindingFlags.Static|BindingFlags.Public, params object[] parameters) |
| Invokes a method on a full qualified class.
|
|
Helper methods for objects.
◆ GetField()
static ? object BogaNet.Helper.ObjectHelper.GetField |
( |
object | obj, |
|
|
string | name, |
|
|
BindingFlags | flags = BindingFlags::NonPublic | BindingFlags::Instance ) |
|
static |
Searches for a field in an object and returns the value.
- Parameters
-
obj | Object-instance |
name | Name of the field |
flags | Binding flags for the field (optional, default: NonPublic/Instance) |
- Returns
- Value of the field
- Exceptions
-
◆ GetField< T >()
Searches for a field in an object and returns the value.
- Template Parameters
-
- Parameters
-
obj | Object-instance |
name | Name of the field |
flags | Binding flags for the field (optional, default: NonPublic/Instance) |
- Returns
- Value of the field
- Exceptions
-
◆ GetProperty()
static ? object BogaNet.Helper.ObjectHelper.GetProperty |
( |
object | obj, |
|
|
string | name, |
|
|
BindingFlags | flags = BindingFlags::NonPublic | BindingFlags::Instance ) |
|
static |
Searches for a property in an object and returns the value.
- Parameters
-
obj | Object-instance |
name | Name of the property |
flags | Binding flags for the property (optional, default: NonPublic/Instance) |
- Returns
- Value of the property
- Exceptions
-
◆ GetProperty< T >()
Searches for a property in an object and returns the value.
- Template Parameters
-
- Parameters
-
obj | Object-instance |
name | Name of the property |
flags | Binding flags for the property (optional, default: NonPublic/Instance) |
- Returns
- Value of the property
- Exceptions
-
◆ InvokeMethod()
static ? object BogaNet.Helper.ObjectHelper.InvokeMethod |
( |
string | className, |
|
|
string | methodName, |
|
|
BindingFlags | flags = BindingFlags::Static | BindingFlags::Public, |
|
|
params object[] | parameters ) |
|
static |
Invokes a method on a full qualified class.
- Parameters
-
className | Full qualified name of the class |
methodName | Public static method of the class to execute |
flags | Binding flags for the method (optional, default: static/public) |
parameters | Parameters for the method (optional) |
- Exceptions
-
◆ SetField()
static void BogaNet.Helper.ObjectHelper.SetField |
( |
object | obj, |
|
|
string | name, |
|
|
object | value, |
|
|
BindingFlags | flags = BindingFlags::NonPublic | BindingFlags::Instance ) |
|
static |
Sets the value of a field in an object.
- Parameters
-
obj | Object-instance |
name | Name of the field |
value | Value as object |
flags | Binding flags for the property (optional, default: NonPublic/Instance) |
- Exceptions
-
◆ SetProperty()
static void BogaNet.Helper.ObjectHelper.SetProperty |
( |
object | obj, |
|
|
string | name, |
|
|
object | value, |
|
|
BindingFlags | flags = BindingFlags::NonPublic | BindingFlags::Instance ) |
|
static |
Sets the value of a property in an object.
- Parameters
-
obj | Object-instance |
name | Name of the property |
value | Value as object |
flags | Binding flags for the property (optional, default: NonPublic/Instance) |
- Exceptions
-
The documentation for this class was generated from the following file:
- /Users/stefanlaubenberger/Projects/CSharp/BogaNet/BogaNet.Common/Helper/ObjectHelper.cs