Interface IParameterImporter<T>
An interface that describes a type that can import parameters of a specific type.
Namespace: SpiceSharp.Reflection
Assembly: SpiceSharp.dll
Syntax
public interface IParameterImporter<in T> : IMemberMap
Type Parameters
| Name | Description |
|---|---|
| T | The base value type. |
Methods
CreateSetter(Object, String)
Creates a setter for the parameter with the specified name.
Declaration
Action<T> CreateSetter(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.Action<T> | The action that sets the parameter; or |
TrySet(Object, String, T)
Tries setting a parameter value.
Declaration
bool TrySet(object source, string name, T value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | source | The source object. |
| System.String | name | The parameter name. |
| T | value | The parameter value. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if |
| System.ArgumentException | Thrown if the value is invalid for the parameter. |