Skip to content
Docs Try Aspire
Docs Try

InteractionInputCollection Methods

Class Methods 8 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)
{
// ...
}
}
name string The name to locate in the collection.
bool true 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)
{
// ...
}
}
name string The name of the input.
bool The value of the input parsed as a Boolean.
InvalidOperationException Thrown when the input has no value.
FormatException Thrown 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)
{
// ...
}
}
name string The name of the input.
double The value of the input parsed as a Double.
InvalidOperationException Thrown when the input has no value.
FormatException Thrown when the input value is not a valid Double.
OverflowException Thrown 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)
{
// ...
}
}
name string The name of the input.
int The value of the input parsed as a Int32.
InvalidOperationException Thrown when the input has no value.
FormatException Thrown when the input value is not a valid Int32.
OverflowException Thrown 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) nullable string?
Gets the value of the input with the specified name as a string.
public sealed class InteractionInputCollection
{
public string? GetString(
string name)
{
// ...
}
}
name string The name of the input.
string? The value of the input, or null when the input has no value.
ToArray Section titled ToArray InteractionInput[]
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)
{
// ...
}
}
name string The name of the input.
input InteractionInput? When this method returns, contains the input with the specified name, if found; otherwise, null.
bool true if an input with the specified name was found; otherwise, false.