RuleSequence

[DebuggerDisplay("{Notation}")] public sealed class RuleSequence : IRule
Represents a rule that tests for a sequence (or series) of integers.

Constructors

RuleSequence

#
public RuleSequence(IEnumerable<int> sequence, int limit)
Create a new sequence rule.
sequence (IEnumerable<int>)Numbers defining the sequence.
limit (int)Limit of sequence, use int.MaxValue to indicate no limit.

Properties

Notation

#
public string Notation { get; }
Gets the string notation/representation for this type.
Notation

Methods

Apply

#
public bool Apply(int number)
Applies this type to an integer.
number (int)Integer to match.
True if the integer passes the type test.
Apply