InteractionInputCollection Methods
ClassMethods8 members
A collection of interaction inputs that supports both indexed and name-based access.
Determines whether the collection contains an input with the specified name.
public sealed class InteractionInputCollection{ public bool ContainsName( string name) { // ... }}Parameters
namestringThe name to locate in the collection.Returns
booltrue if the collection contains an input with the specified name; otherwise, false. Gets the value of the input with the specified name as a
Boolean. public sealed class InteractionInputCollection{ public bool GetBoolean( string name) { // ... }}Parameters
namestringThe name of the input.Returns
boolThe value of the input parsed as a Boolean.Exceptions
InvalidOperationExceptionThrown when the input has no value.FormatExceptionThrown when the input value is not a valid Boolean. Gets the value of the input with the specified name as a
Double. public sealed class InteractionInputCollection{ public double GetDouble( string name) { // ... }}Parameters
namestringThe name of the input.Returns
doubleThe value of the input parsed as a Double.Exceptions
InvalidOperationExceptionThrown when the input has no value.FormatExceptionThrown when the input value is not a valid Double.OverflowExceptionThrown when the input value is outside the range of a Double. Returns an enumerator that iterates through the collection.
public sealed class InteractionInputCollection{ public IEnumerator<InteractionInput> GetEnumerator() { // ... }}Returns
IEnumerator<InteractionInput>An enumerator that can be used to iterate through the collection. Gets the value of the input with the specified name as a
Int32. public sealed class InteractionInputCollection{ public int GetInt32( string name) { // ... }}Parameters
namestringThe name of the input.Returns
intThe value of the input parsed as a Int32.Exceptions
InvalidOperationExceptionThrown when the input has no value.FormatExceptionThrown when the input value is not a valid Int32.OverflowExceptionThrown when the input value is outside the range of a Int32.Remarks
InputType.Number accepts floating point values. Use InteractionInputCollection.GetDouble for decimal values, or validate that the input is an integer before calling this method. Gets the value of the input with the specified name as a string.
public sealed class InteractionInputCollection{ public string? GetString( string name) { // ... }}Parameters
namestringThe name of the input.Returns
string?The value of the input, or null when the input has no value. Gets all inputs in declaration order.
public sealed class InteractionInputCollection{ public InteractionInput[] ToArray() { // ... }}Returns
InteractionInput[]A copy of the inputs in declaration order. Tries to get an input by its name.
public sealed class InteractionInputCollection{ public bool TryGetByName( string name, out InteractionInput? input) { // ... }}Parameters
namestringThe name of the input.inputInteractionInput?When this method returns, contains the input with the specified name, if found; otherwise, null.Returns
booltrue if an input with the specified name was found; otherwise, false.