Interface IPropertyExporter<T>
An interface that describes a type that can export parameters of a specific type.
Namespace: SpiceSharp.Reflection
Assembly: SpiceSharp.dll
Syntax
public interface IPropertyExporter<out T> : IMemberMap
Type Parameters
| Name | Description |
|---|---|
| T | The base valye type. |
Methods
CreateGetter(Object, String)
Creates a getter for parameter with the specified name.
Declaration
Func<T> CreateGetter(object source, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | source | The source object. |
| System.String | name | The name of the parameter. |
Returns
| Type | Description |
|---|---|
| System.Func<T> | The function that returns the parameter; or |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if |
TryGet(Object, String, out Boolean)
Tries getting the value of a parameter.
Declaration
T TryGet(object source, string name, out bool isValid)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | source | The source object. |
| System.String | name | The name. |
| System.Boolean | isValid | If set to |
Returns
| Type | Description |
|---|---|
| T | The parameter value. |
Remarks
This method does not follow the regular TryGet convention due to the interface being covariant.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if |