Table of Contents

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

bool

Count

Gets the total number of arguments expected by the constructor.

int Count { get; }

Property Value

int

Methods

IsArgumentSet(int)

Checks if the argument at the specified index is set.

bool IsArgumentSet(int index)

Parameters

index int

The 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.