Skip to content
DocsTry Aspire
DocsTry

InteractionInputCollection Methods

ClassMethods8 members
A collection of interaction inputs that supports both indexed and name-based access.
ContainsName(string)Section titled ContainsName(string)bool
Determines whether the collection contains an input with the specified name.
public sealed class InteractionInputCollection
{
public bool ContainsName(
string name)
{
// ...
}
}
namestringThe name to locate in the collection.
booltrue if the collection contains an input with the specified name; otherwise, false.
GetBoolean(string)Section titled GetBoolean(string)bool
Gets the value of the input with the specified name as a Boolean.
public sealed class InteractionInputCollection
{
public bool GetBoolean(
string name)
{
// ...
}
}
namestringThe name of the input.
boolThe value of the input parsed as a Boolean.
InvalidOperationExceptionThrown when the input has no value.
FormatExceptionThrown when the input value is not a valid Boolean.
GetDouble(string)Section titled GetDouble(string)double
Gets the value of the input with the specified name as a Double.
public sealed class InteractionInputCollection
{
public double GetDouble(
string name)
{
// ...
}
}
namestringThe name of the input.
doubleThe value of the input parsed as a Double.
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()
{
// ...
}
}
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)
{
// ...
}
}
namestringThe name of the input.
intThe value of the input parsed as a Int32.
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.
InputType.Number accepts floating point values. Use InteractionInputCollection.GetDouble for decimal values, or validate that the input is an integer before calling this method.
GetString(string)Section titled GetString(string)nullablestring?
Gets the value of the input with the specified name as a string.
public sealed class InteractionInputCollection
{
public string? GetString(
string name)
{
// ...
}
}
namestringThe name of the input.
string?The value of the input, or null when the input has no value.
ToArraySection titled ToArrayInteractionInput[]
Gets all inputs in declaration order.
public sealed class InteractionInputCollection
{
public InteractionInput[] ToArray()
{
// ...
}
}
InteractionInput[]A copy of the inputs in declaration order.
TryGetByName(string, InteractionInput?)Section titled TryGetByName(string, InteractionInput?)bool
Tries to get an input by its name.
public sealed class InteractionInputCollection
{
public bool TryGetByName(
string name,
out InteractionInput? input)
{
// ...
}
}
namestringThe name of the input.
inputInteractionInput?When this method returns, contains the input with the specified name, if found; otherwise, null.
booltrue if an input with the specified name was found; otherwise, false.