Show / Hide Table of Contents

Interface IPropertyExporter<T>

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

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

Exceptions
Type Condition
System.ArgumentNullException

Thrown if name is null.

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 true, the parameter was returned succesfully.

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 name is value.

Extension Methods

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