ComponentParameters

References
[IoId("00000000-1193-48a8-aaee-b330e55149a0")] public sealed class ComponentParameters : IEnumerable<IParameter>, IStorable
Implementation of IComponentParameters.

Constructors

ComponentParameters

#
Create a new instance of the ComponentParameters.
public ComponentParameters(
component
Component which owns this instance.
)

Properties

Count

#
Gets the total number of parameters.
public int Count { get; }

InputCount

#
Gets the total number of input parameters.
public int InputCount { get; }

Inputs

#
Enumerate over all inputs.
public IEnumerable<IParameter> Inputs { get; }

MetaMixingBehaviour

#
Gets or sets how meta data is inherited by outputs from inputs.
public MixingBehaviour MetaMixingBehaviour { get; set; }

MetaMixingRecipe

#
Gets or sets the inheritance map for meta data on this component. Leave blank to use default inheritance logic. Setting this property will not expire the component or cause a new solution to be computed, those steps are the responsibility of the caller.
public MixingRecipe MetaMixingRecipe { get; set; }

MetaMixingTable

#
Gets the meta data inheritance map resolved to valid indices. This is an array of length OutputCount where each entry lists all the input parameter indices that act as inheritance parents for each output.
public int[][] MetaMixingTable { get; }

OutputCount

#
Gets the total number of output parameters.
public int OutputCount { get; }

Outputs

#
Enumerate over all outputs.
public IEnumerable<IParameter> Outputs { get; }

Methods

AddInput

#
Add an input parameter to the bottom of the list.
public void AddInput(
parameter,
Parameter to add.
undo
Optional list of undo actions to populate.
)

AddInput

#
Insert an input parameter into the list.
public void AddInput(
parameter,
Parameter to insert.
index,
Insertion index.
undo
Optional list of undo actions to populate.
)

AddInput

#
Insert an input parameter into the list.
public void AddInput(
parameter,
Parameter to insert.
index
Insertion index.
)
obsoleteUse the overload which records undo actions.

AddInput

#
Add an input parameter to the bottom of the list.
public void AddInput(
parameter
Parameter to add.
)
obsoleteUse the overload which records undo actions.

AddOutput

#
Add an output parameter to the bottom of the list.
public void AddOutput(
parameter,
Parameter to add.
undo
Optional list of undo actions to populate.
)

AddOutput

#
Insert an output parameter into the list.
public void AddOutput(
parameter,
Parameter to insert.
index,
Insertion index.
undo
Optional list of undo actions to populate.
)

AddOutput

#
Insert an output parameter into the list.
public void AddOutput(
parameter,
Parameter to insert.
index
Insertion index.
)
obsoleteUse the overload which records undo actions.

AddOutput

#
Add an output parameter to the bottom of the list.
public void AddOutput(
parameter
Parameter to add.
)
obsoleteUse the overload which records undo actions.

AutoInputMaintenance

#
A utility method for processing all input parameters from within a Component.VariableParameterMaintenance() method.
public void AutoInputMaintenance(
nameFormat,
String format for the nomen name. May contain '{index}', '{number}', and '{ordinal}' patterns.
infoFormat,
String format for the nomen info. May contain '{index}', '{number}', and '{ordinal}' patterns.
userFormat,
String format for the user name. May contain '{index}' pattern.
indexMap,
Function for converting zero-based parameter indices into usage indices. May be null.
requirement
Requirement to assign to each parameter.
)

AutoOutputMaintenance

#
A utility method for processing all output parameters from within a Component.VariableParameterMaintenance() method.
public void AutoOutputMaintenance(
nameFormat,
String format for the nomen name. May contain '{index}', '{number}', and '{ordinal}' patterns.
infoFormat,
String format for the nomen info. May contain '{index}', '{number}', and '{ordinal}' patterns.
userFormat,
String format for the user name. May contain '{index}' pattern.
indexMap
Function for converting zero-based parameter indices into usage indices. May be null.
)

CreateUniqueInputName

#
Create an input user name which isn't yet used in this instance.
public string CreateUniqueInputName(
format = "{0}",
Name format.
symbols = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Symbols to pick from.
)
Unique name.

CreateUniqueOutputName

#
Create an output user name which isn't yet used in this instance.
public string CreateUniqueOutputName(
format = "{0}",
Name format.
symbols = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Symbols to pick from.
)
Unique name.

GetEnumerator

#
Returns an enumerator that iterates through the collection.
public IEnumerator<IParameter> GetEnumerator()
An enumerator that can be used to iterate through the collection.

GetInputStates

#
Get arrays describing the current input state.
[EditorBrowsable(EditorBrowsableState.Never)] public void GetInputStates(
out IParameter[]
inputs,
Input parameters.
out Access[]
access
Access level for all inputs.
)

GetOutputStates

#
Gets arrays describing the current output state.
[EditorBrowsable(EditorBrowsableState.Never)] public void GetOutputStates(
out IParameter[]
outputs,
Output parameters.
out Access[]
access
Access level for all outputs.
)

GetPinStates

#
Get arrays describing the current pinned states.
[EditorBrowsable(EditorBrowsableState.Never)] public void GetPinStates(
out IParameter[]
pins
Pinned parameters.
)
Explicit

IStorable.Store

#
void IStorable.Store(
writer
)
Store

IndexOfFirstInputOfType

#
Gets the index of the first input parameter whose type is compatible with the provided type.
public int IndexOfFirstInputOfType(
parameterType,
Type filter.
fallback = -1
Index to return in case of no match.
)
Index of first parameter of type, or -1.

IndexOfFirstOutputOfType

#
Gets the index of the first output parameter whose type is compatible with the provided type.
public int IndexOfFirstOutputOfType(
parameterType,
Type filter.
fallback = -1
Index to return in case of no match.
)
Index of first parameter of type, or -1.

IndexOfInput

#
Gets the index of the given parameter.
public int IndexOfInput(
id
Parameter instanceId to search for.
)
Index or -1 if parameter is not an input.

IndexOfInput

#
Gets the index of the given parameter.
public int IndexOfInput(
parameter
Parameter to search for.
)
Index or -1 if parameter is not an input.

IndexOfOutput

#
Gets the index of the given parameter.
public int IndexOfOutput(
id
Parameter instanceId to search for.
)
Index or -1 if parameter is not an output.

IndexOfOutput

#
Gets the index of the given parameter.
public int IndexOfOutput(
parameter
Parameter to search for.
)
Index or -1 if parameter is not an output.

Input

#
Gets the input parameter with the specified id.
public IParameter Input(
id
Parameter instanceId.
)
Parameter with specified id.

Input

#
Gets the input parameter at the specified index.
public IParameter Input(
index
Index of parameter to retrieve.
)
Parameter at index.

IsInput

#
Test whether a specific parameter is defined as an input.
public bool IsInput(
id
Parameter instanceId to test for.
)
True if parameter is indeed an input.

IsInput

#
Test whether a specific parameter is defined as an input.
public bool IsInput(
parameter
Parameter to test for.
)
True if parameter is indeed an input.

IsOutput

#
Test whether a specific parameter is defined as an output.
public bool IsOutput(
id
Parameter instanceId to test for.
)
True if parameter is indeed an output.

IsOutput

#
Test whether a specific parameter is defined as an output.
public bool IsOutput(
parameter
Parameter to test for.
)
True if parameter is indeed an output.

Output

#
Gets the output parameter with the specified id.
public IParameter Output(
id
Parameter instanceId.
)
Parameter with specified id.

Output

#
Gets the output parameter at the specified index.
public IParameter Output(
index
Index of parameter to retrieve.
)
Parameter at index.

RemoveInput

#
Remove the input parameter at the specified index.
public void RemoveInput(
index,
Index of parameter to remove.
undo
Optional list of undo actions to populate.
)

RemoveInput

#
Remove the input parameter at the specified index.
public void RemoveInput(
index
Index of parameter to remove.
)
obsoleteUse the overload which records undo actions.

RemoveInput

#
Remove the specified input parameter.
public void RemoveInput(
parameter,
Parameter to remove.
undo
Optional list of undo actions to populate.
)

RemoveInput

#
Remove the specified input parameter.
public void RemoveInput(
parameter
Parameter to remove.
)
obsoleteUse the overload which records undo actions.

RemoveOutput

#
Remove the output parameter at the specified index.
public void RemoveOutput(
index,
Index of parameter to remove.
undo
Optional list of undo actions to populate.
)

RemoveOutput

#
Remove the output parameter at the specified index.
public void RemoveOutput(
index
Index of parameter to remove.
)
obsoleteUse the overload which records undo actions.

RemoveOutput

#
Remove the specified output parameter.
public void RemoveOutput(
parameter,
Parameter to remove.
undo
Optional list of undo actions to populate.
)

RemoveOutput

#
Remove the specified output parameter.
public void RemoveOutput(
parameter
Parameter to remove.
)
obsoleteUse the overload which records undo actions.

Requirement

#
Gets the parameter requirement for a given input id.
public Requirement Requirement(
id
Parameter instanceId.
)
Requirement.

Requirement

#
Gets the parameter requirement for a given input index.
public Requirement Requirement(
index
Index of input parameter.
)
Requirement.

Restore

#
public void Restore(
reader
)

SortInputs

#
Sort the input parameters based on keys. This method fails silently.
public void SortInputs(
keys
)

SortInputs

#
Sort the input parameters based on keys. This method fails silently.
public void SortInputs(
int[]
keys
)

SortOutputs

#
Sort the output parameters based on keys. This method fails silently.
public void SortOutputs(
keys
)

SortOutputs

#
Sort the output parameters based on keys. This method fails silently.
public void SortOutputs(
int[]
keys
)
Explicit

IEnumerable.GetEnumerator

#
Returns an enumerator that iterates through a collection.
IEnumerator IEnumerable.GetEnumerator()
An IEnumerator object that can be used to iterate through the collection.

Events

ParameterAdded

#
This event is raised when a parameter is added to this component.
public event EventHandler<ParameterEventArgs> ParameterAdded

ParameterDisplayChanged

#
This event is raised when a parameter is either shown or hidden.
public event EventHandler<ParameterEventArgs> ParameterDisplayChanged

ParameterEnabledChanged

#
This event is raised when a parameter is either enabled or disabled.
public event EventHandler<ParameterEventArgs> ParameterEnabledChanged

ParameterExpired

#
This event is raised when a parameter solution expires.
public event EventHandler<ParameterEventArgs> ParameterExpired

ParameterLayoutChanged

#
This event is raised when a parameter layout has been changed.
public event EventHandler<ParameterEventArgs> ParameterLayoutChanged

ParameterMaintenanceRequired

#
This event is raised whenever a significant change to the parameter topology has been made. For example when parameters get added, removed or deserialized. Making sure parameter access, nicknames, mutability, etc. are correctly set up is best done by handling this event.
public event EventHandler<ParametersEventArgs> ParameterMaintenanceRequired

ParameterRemoved

#
This event is raised when a parameter is removed from this component.
public event EventHandler<ParameterEventArgs> ParameterRemoved

ParameterRenamed

#
This event is raised when a parameter user name changes.
public event EventHandler<ParameterEventArgs> ParameterRenamed