Or(element, selector, comparer) Or(selector, comparer, elements) Or(selector, comparer, elements) ThenExpect<>(expectation, selector, exceptionGenerator) ThenExpect<>(expectation, selector, exceptionGenerator)
Legend Class Struct Enum Interface Delegate | Constructor Method Property Event Field |
| Method: Generex<T, TCombined> ThenExpect<TOther, TCombined>(Generex<T, TOther>, Func<TResult, GenerexMatch<T, TOther>, TCombined>, Func<GenerexMatch<T, TResult>, Exception>)- Declared in: RT.Generexes.Generex<T, TResult>
Declarationpublic Generex<T, TCombined> ThenExpect<TOther, TCombined>(
Generex<T, TOther> expectation,
Func<TResult, GenerexMatch<T, TOther>, TCombined> selector,
Func<GenerexMatch<T, TResult>, 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; otherwise, a
result object is generated from the current result object and the second match. Generic type parametersTOther |
Type of the result object of the expectation. | TCombined |
Type of the result object for the resulting regular expression. |
ParametersGenerex<T, TOther> | expectation |
The regular expression that is expected to match after the current one. | Func<TResult, GenerexMatch<T, TOther>, TCombined> | selector |
A selector which, in case of a match, generates the new result given the current result object and the match
of the expectation. | Func<GenerexMatch<T, TResult>, 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>>). |