Class Documentation
A helper class that helps listing documentation at runtime.
Inheritance
Inherited Members
Namespace: SpiceSharp.Reflection
Assembly: SpiceSharp.dll
Syntax
public static class Documentation
Methods
AsString<T>(IReadOnlyDictionary<MemberDescription, T>)
Creates a (long) string of NAME=VALUE segments separated by a space. The first name of each parameter is used.
Declaration
public static string AsString<T>(this IReadOnlyDictionary<MemberDescription, T> parameterValues)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IReadOnlyDictionary<MemberDescription, T> | parameterValues | The parameter values. |
Returns
| Type | Description |
|---|---|
| System.String | The string representation for all parameters and their values. |
Type Parameters
| Name | Description |
|---|---|
| T | The base value type. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if |
GetMembers(Type)
Gets all the members that are defined on a type.
Declaration
public static IEnumerable<MemberDescription> GetMembers(Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | type | The type. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<MemberDescription> | All the members on a type. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if |
Parameters(IParameterSet)
Enumerates all the named parameters and properties of an IParameterSet.
Declaration
public static IEnumerable<MemberDescription> Parameters(this IParameterSet parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| IParameterSet | parameters | The parameter set. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<MemberDescription> | All the named parameters. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if |
Parameters(IParameterSetCollection)
Enumerates all the named members.
Declaration
public static IEnumerable<MemberDescription> Parameters(this IParameterSetCollection parameterized)
Parameters
| Type | Name | Description |
|---|---|---|
| IParameterSetCollection | parameterized | The parameterized object. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<MemberDescription> | The named parameters. |
Parameters(Type)
Enumerates all the named members (all parameters and properties with the ParameterNameAttribute attribute) on a type.
Declaration
public static IEnumerable<MemberDescription> Parameters(Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | type | The type containing the parameters. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<MemberDescription> | The named parameters. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if |
ParameterValues<T>(IParameterSet, Boolean)
Creates a dictionary of all properties and their values on a parameter set.
Declaration
public static IReadOnlyDictionary<MemberDescription, T> ParameterValues<T>(this IParameterSet parameterSet, bool givenOnly = true)
Parameters
| Type | Name | Description |
|---|---|---|
| IParameterSet | parameterSet | The parameter set. |
| System.Boolean | givenOnly | If |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IReadOnlyDictionary<MemberDescription, T> | A read-only dictionary for all members and their values. |
Type Parameters
| Name | Description |
|---|---|
| T | The parameter value type. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if |
ParameterValues<T>(IParameterSetCollection, Boolean)
Creates a dictionary of all properties and their values on a parameter set.
Declaration
public static IReadOnlyDictionary<MemberDescription, T> ParameterValues<T>(this IParameterSetCollection parameterSetCollection, bool givenOnly = true)
Parameters
| Type | Name | Description |
|---|---|---|
| IParameterSetCollection | parameterSetCollection | The parameter set. |
| System.Boolean | givenOnly | If |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IReadOnlyDictionary<MemberDescription, T> | A read-only dictionary for all members and their values. |
Type Parameters
| Name | Description |
|---|---|
| T | The parameter value type. |
Pins(IComponent)
Enumerates all pins of a component type.
Declaration
public static IEnumerable<string> Pins(this IComponent component)
Parameters
| Type | Name | Description |
|---|---|---|
| IComponent | component | The component. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<System.String> | The pin names. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if |
Pins(Type)
Enumerates all pins of a component type.
Declaration
public static IEnumerable<string> Pins(Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | type | The component type. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<System.String> | The pin names. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if |