Class Documentation
A helper class that helps listing documentation at runtime.
Inherited Members
Namespace: SpiceSharp.Documentation
Assembly: SpiceSharp.dll
Syntax
public static class Documentation
Methods
AsString<T>(IReadOnlyDictionary<MemberDocumentation, 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<MemberDocumentation, T> parameterValues)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyDictionary<MemberDocumentation, T> | parameterValues | The parameter values. |
Returns
Type | Description |
---|---|
string | The string representation for all parameters and their values. |
Type Parameters
Name | Description |
---|---|
T | The base value type. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
GetMembers(Type)
Gets all the members that are defined on a type.
Declaration
public static IEnumerable<MemberDocumentation> GetMembers(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type. |
Returns
Type | Description |
---|---|
IEnumerable<MemberDocumentation> | All the members on a type. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
ParameterValues<T>(IParameterSet, bool)
Creates a dictionary of all properties and their values on a parameter set.
Declaration
public static IReadOnlyDictionary<MemberDocumentation, T> ParameterValues<T>(this IParameterSet parameterSet, bool givenOnly = true)
Parameters
Type | Name | Description |
---|---|---|
IParameterSet | parameterSet | The parameter set. |
bool | givenOnly | If |
Returns
Type | Description |
---|---|
IReadOnlyDictionary<MemberDocumentation, T> | A read-only dictionary for all members and their values. |
Type Parameters
Name | Description |
---|---|
T | The parameter value type. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
ParameterValues<T>(IParameterSetCollection, bool)
Creates a dictionary of all properties and their values on a parameter set.
Declaration
public static IReadOnlyDictionary<MemberDocumentation, T> ParameterValues<T>(this IParameterSetCollection parameterSetCollection, bool givenOnly = true)
Parameters
Type | Name | Description |
---|---|---|
IParameterSetCollection | parameterSetCollection | The parameter set. |
bool | givenOnly | If |
Returns
Type | Description |
---|---|
IReadOnlyDictionary<MemberDocumentation, T> | A read-only dictionary for all members and their values. |
Type Parameters
Name | Description |
---|---|
T | The parameter value type. |
Parameters(IParameterSet)
Enumerates all the named parameters and properties of an IParameterSet.
Declaration
public static IEnumerable<MemberDocumentation> Parameters(this IParameterSet parameters)
Parameters
Type | Name | Description |
---|---|---|
IParameterSet | parameters | The parameter set. |
Returns
Type | Description |
---|---|
IEnumerable<MemberDocumentation> | All the named parameters. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
Parameters(IParameterSetCollection)
Enumerates all the named members.
Declaration
public static IEnumerable<MemberDocumentation> Parameters(this IParameterSetCollection parameterized)
Parameters
Type | Name | Description |
---|---|---|
IParameterSetCollection | parameterized | The parameterized object. |
Returns
Type | Description |
---|---|
IEnumerable<MemberDocumentation> | The named parameters. |
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 |
---|---|
IEnumerable<string> | The pin names. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
Pins(Type)
Enumerates all pins of a component type.
Declaration
public static IReadOnlyList<string> Pins(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The component type. |
Returns
Type | Description |
---|---|
IReadOnlyList<string> | The pin names. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |