Show / Hide Table of Contents

Interface IParameterImporter<T>

An interface that describes a type that can import parameters of a specific type.

Inherited Members
IMemberMap.Add(MemberDescription)
IMemberMap.Comparer
IMemberMap.Members
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 null if the parameter does not exist.

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

true if the parameter was set succesfully; otherwise false.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if name is null.

System.ArgumentException

Thrown if the value is invalid for the parameter.

Extension Methods

Utility.ThrowIfNull<T>(T, String)
Back to top Generated by DocFX