Class PropertyAccessor<T>
Member Accessor implementation specialized on accessing properties (using set and get).
Inheritance
Implements
Inherited Members
Namespace: Fusee.Xirkit
Assembly: Fusee.Xirkit.dll
Syntax
public class PropertyAccessor<T> : IMemberAccessor<T>
Type Parameters
Name | Description |
---|---|
T | The type of the pin. |
Constructors
PropertyAccessor(PropertyInfo)
Initializes a new instance of the PropertyAccessor<T> class.
Declaration
public PropertyAccessor(PropertyInfo propertyInfo)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | propertyInfo | The property information. |
Methods
Get(Object)
Retrieves the value currently stored in the object o. his instance holds information about which property of o the value should be retrieved from and how to perform this retrieval.
Declaration
public T Get(object o)
Parameters
Type | Name | Description |
---|---|---|
System.Object | o | The object from which the property identified with this instance's property accessor the value is to be retrieved from. |
Returns
Type | Description |
---|---|
T | The value currently stored in o's property. |
Set(Object, T)
Sets the specified value to the given object. This instance holds information about which property is to be filled with the value and how to perform this assignment.
Declaration
public void Set(object o, T val)
Parameters
Type | Name | Description |
---|---|---|
System.Object | o | The object on which the property identified with this instance's property accessor the given value is to be assigned to. |
T | val | The value that should be assigned. |