Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Method: TCombinedGenerex and<TOtherResult, TOtherGenerex, TOtherGenerexMatch, TCombinedResult, TCombinedGenerex, TCombinedGenerexMatch>(Func<T[], TOtherGenerexMatch>, Func<TResult, TOtherGenerexMatch, TCombinedResult>)

Declaration

protected TCombinedGenerex and<TOtherResult, TOtherGenerex, TOtherGenerexMatch, TCombinedResult, TCombinedGenerex, TCombinedGenerexMatch>(
    Func<T[], TOtherGenerexMatch> innerMatch,
    Func<TResult, TOtherGenerexMatch, TCombinedResult> selector
)

Summary

Returns a regular expression that only matches if the subarray matched by this regular expression also matches the specified matching function, and if so, combines the first match’s result object with the second match using a specified selector.

Generic type parameters

TOtherResult The type of the result object associated with each match returned by innerMatch.
TOtherGenerex
  • Must derive from: RT.Generexes.GenerexWithResultBase<T, TOtherResult, TOtherGenerex, TOtherGenerexMatch>.
The type of the other regular expression. (This is either Generex<T, TResult> or Stringerex<TResult>, but with TOtherResult in place of TResult.)
TOtherGenerexMatch
  • Must derive from: RT.Generexes.GenerexMatch<T, TOtherResult>.
The type of the match object for the other regular expression. (This is either GenerexMatch<T, TResult> or StringerexMatch<TResult>, but with TOtherResult in place of TResult.)
TCombinedResult The type of the combined result object returned by selector.
TCombinedGenerex
  • Must derive from: RT.Generexes.GenerexWithResultBase<T, TCombinedResult, TCombinedGenerex, TCombinedGenerexMatch>.
The type of the new regular expression to be returned. (This is either Generex<T, TResult> or Stringerex<TResult>, but with TCombinedResult in place of TResult.)
TCombinedGenerexMatch
  • Must derive from: RT.Generexes.GenerexMatch<T, TCombinedResult>.
The type of the match object for the regular expression to be returned. (This is either GenerexMatch<T, TResult> or StringerexMatch<TResult>, but with TCombinedResult in place of TResult.)

Parameters

Func<T[], TOtherGenerexMatch>innerMatch A function that runs on the subarray matched by this regular expression and returns either a match or null.
Func<TResult, TOtherGenerexMatch, TCombinedResult>selector A selector function that combines the result object associated with the match of this regular expression, and the match returned by innerMatch, into a new result object.

Remarks

The match object passed into selector is the same that innerMatch returned. Therefore, its GenerexMatch<T>.Index property refers to the index within the subarray, not the original input sequence.