Legend Class Struct Enum Interface Delegate | Constructor Method Property Event Field |
| Method: TOtherGenerex ThenExpect<TOtherGenerex, TOtherGenerexMatch, TOtherResult>(GenerexWithResultBase<T, TOtherResult, TOtherGenerex, TOtherGenerexMatch>, Func<TGenerexMatch, Exception>)Declarationpublic TOtherGenerex ThenExpect<TOtherGenerex, TOtherGenerexMatch, TOtherResult>(
GenerexWithResultBase<T, TOtherResult, TOtherGenerex, TOtherGenerexMatch> expectation,
Func<TGenerexMatch, Exception> exceptionGenerator
) Summary
Returns a regular expression that matches this regular expression, then attempts to match the specified other
regular expression and throws an exception if the second regular expression fails to match. Generic type parametersTOtherGenerex |
The type of expectation. (This is either Generex<T, TResult> or Stringerex<TResult>.) | TOtherGenerexMatch |
The type of the match object expectation. (This is either GenerexMatch<T, TResult> or StringerexMatch<TResult>.) | TOtherResult |
The type of the result object associated with each match of expectation. |
ParametersGenerexWithResultBase<T, TOtherResult, TOtherGenerex, TOtherGenerexMatch> | expectation |
The regular expression that is expected to match after the current one. | Func<TGenerexMatch, Exception> | exceptionGenerator |
A selector which, in case of no match, generates the exception object to be thrown. |
Returns
The resulting regular expression. Remarks
Regular expressions created by this method cannot match backwards. The full set of affected methods is listed
at GenerexBase<T, TMatch, TGenerex, TGenerexMatch>.Then<TOtherGenerex, TOtherMatch, TOtherGenerexMatch>(Func<TGenerexMatch, GenerexBase<T, TOtherMatch, TOtherGenerex, TOtherGenerexMatch>>). |