Interface IArgumentState
- Namespace
- PolyType.Abstractions
- Assembly
- PolyType.dll
Declares list of arguments to be passed to a parameterized constructor or method.
public interface IArgumentState
Properties
AreRequiredArgumentsSet
Gets a value indicating whether all required arguments have been set.
bool AreRequiredArgumentsSet { get; }
Property Value
Count
Gets the total number of arguments expected by the constructor.
int Count { get; }
Property Value
Methods
IsArgumentSet(int)
Checks if the argument at the specified index is set.
bool IsArgumentSet(int index)
Parameters
indexintThe index of the argument to check.
Returns
- bool
True if the argument is set; otherwise, false.
Return()
Returns this argument state to its implementation for reuse.
void Return()
Remarks
Call this method exactly once after the state will no longer be accessed, including when construction or invocation throws. Accessing a state after returning it is undefined behavior. Implementations that do not pool states treat this as a no-op.