PeanutButter
|
Represents a property or a field on an object. More...
Public Member Functions | |
object | GetValue (object host) |
Gets the value of the property or field for the provided host. | |
bool | TryGetValue (object host, out object value, out Exception exception) |
Attempts to get the value of the property. | |
void | SetValue (object host, object value) |
Sets the value of the property or field on the provided host. | |
void | SetValue< T > (ref T host, object value) |
Sets the value for the field or property as found on the provided host. | |
void | SetValueAt (object host, object value, object index) |
Sets the value in a collection at that index, if possible. | |
object | GetValueAt (object host, object index) |
Get the value at the provided index into a collection. |
Properties | |
string | Name [get] |
Name of the property or field. | |
Type | Type [get] |
Type of the property or field. | |
bool | CanWrite [get] |
Write access to property or field. | |
bool | CanRead [get] |
Read access to property or field. | |
Type | DeclaringType [get] |
The type on which this property or field is declared. | |
Type | HostingType [get] |
The type from which this property or field is read. | |
int | AncestralDistance [get] |
Returns the ancestral distance between the DeclaringType and the HostingType (0 if they are the same type) |
Represents a property or a field on an object.
object PeanutButter.Utils.IPropertyOrField.GetValue | ( | object | host | ) |
Gets the value of the property or field for the provided host.
host |
Implemented in PeanutButter.Utils.PropertyOrField.
object PeanutButter.Utils.IPropertyOrField.GetValueAt | ( | object | host, |
object | index ) |
Get the value at the provided index into a collection.
host | |
index |
Implemented in PeanutButter.Utils.PropertyOrField.
void PeanutButter.Utils.IPropertyOrField.SetValue | ( | object | host, |
object | value ) |
Sets the value of the property or field on the provided host.
host | |
value |
Implemented in PeanutButter.Utils.PropertyOrField.
void PeanutButter.Utils.IPropertyOrField.SetValue< T > | ( | ref T | host, |
object | value ) |
Sets the value for the field or property as found on the provided host.
host | |
value |
T |
Implemented in PeanutButter.Utils.PropertyOrField.
void PeanutButter.Utils.IPropertyOrField.SetValueAt | ( | object | host, |
object | value, | ||
object | index ) |
Sets the value in a collection at that index, if possible.
host | |
value | |
index |
Implemented in PeanutButter.Utils.PropertyOrField.
bool PeanutButter.Utils.IPropertyOrField.TryGetValue | ( | object | host, |
out object | value, | ||
out Exception | exception ) |
Attempts to get the value of the property.
host | |
value | |
exception |
Implemented in PeanutButter.Utils.PropertyOrField.
|
get |
Returns the ancestral distance between the DeclaringType and the HostingType (0 if they are the same type)
Implemented in PeanutButter.Utils.PropertyOrField.
|
get |
Read access to property or field.
Implemented in PeanutButter.Utils.PropertyOrField.
|
get |
Write access to property or field.
Implemented in PeanutButter.Utils.PropertyOrField.
|
get |
The type on which this property or field is declared.
Implemented in PeanutButter.Utils.PropertyOrField.
|
get |
The type from which this property or field is read.
Implemented in PeanutButter.Utils.PropertyOrField.
|
get |
Name of the property or field.
Implemented in PeanutButter.Utils.PropertyOrField.
|
get |
Type of the property or field.
Implemented in PeanutButter.Utils.PropertyOrField.