IndexerOperator
Operator used to test for the presence of a Indexer
on an object and optionally apply further tests to the
value of that indexer.
using System.Runtime.CompilerServices;
namespace NUnit.Framework.Constraints
{
[System.Runtime.CompilerServices.NullableContext(1)]
[System.Runtime.CompilerServices.Nullable(0)]
public class IndexerOperator : PrefixOperator
{
private readonly object[] _indexArguments;
public IndexerOperator(params object[] indexArgs)
{
_indexArguments = indexArgs;
left_precedence = (right_precedence = 1);
}
public override IConstraint ApplyPrefix(IConstraint constraint)
{
return new IndexerConstraint(_indexArguments, constraint);
}
}
}