Summary
Helper class for handling Reflection amd Expression tree related items.
- Namespace
- ReactiveUI
- Base Types
-
- object
graph BT
Type-->Base0["object"]
Type["Reflection"]
class Type type-node
Syntax
[SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1011:Closing square brackets should be spaced correctly", Justification = "nullable object array.")]
public static class Reflection
Attributes
Type | Description |
---|---|
Suppress |
Methods
Name | Value | Summary |
---|---|---|
Expression |
string |
Will convert a Expression which points towards a property
to a string containing the property names.
The sub-properties will be separated by the '.' character.
Index based values will include [] after the name.
static
|
Get |
Type |
Gets the appropriate EventArgs derived object for the specified event name for a Type.
static
|
Get |
Func |
Converts a MemberInfo into a Func which will fetch the value for the Member.
Handles either fields or properties.
static
|
Get |
Func |
Converts a MemberInfo into a Func which will fetch the value for the Member.
Handles either fields or properties.
If there is no field or property with the matching MemberInfo it'll throw
an ArgumentException.
static
|
Get |
Action |
Converts a MemberInfo into a Func which will set the value for the Member.
Handles either fields or properties.
If there is no field or property with the matching MemberInfo it'll throw
an ArgumentException.
static
|
Get |
Action |
Converts a MemberInfo into a Func which will set the value for the Member.
Handles either fields or properties.
If there is no field or property with the matching MemberInfo it'll throw
an ArgumentException.
static
|
IsStatic |
bool |
Determines if the specified property is static or not.
static
|
ReallyFindType |
Type? |
Gets a Type from the specified type name.
Uses a cache to avoid having to use Reflection every time.
static
|
Rewrite |
Expression |
Uses the expression re-writer to simplify the Expression down to it's simplest Expression.
static
|
Throw |
void |
Checks to make sure that the specified method names on the target object
are overriden.
static
|
Try |
bool |
Based on a list of Expressions get a IObservedChanged for the value
of the last property in the chain if possible.
The Expressions are property chains. Eg Property1.Property2.Property3
The method will make sure that each Expression can get a value along the way
and get each property until each expression is evaluated.
static
|
Try |
bool |
Based on a list of Expressions get the value of the last property in the chain if possible.
The Expressions are typically property chains. Eg Property1.Property2.Property3
The method will make sure that each Expression can get a value along the way
and get each property until each expression is evaluated.
static
|
Try |
bool |
Based on a list of Expressions set a value
of the last property in the chain if possible.
The Expressions are property chains. Eg Property1.Property2.Property3
The method will make sure that each Expression can use each value along the way
and set the last value.
static
|
Extension Methods
Name | Value | Summary |
---|---|---|
Invoke |
object |
This is a thing I lifted from Prism.
|