Single is the operation that returns single object from the sequence or throws an exception if the sequence contains more or less elements.
SingleStage syntax
First
: 'single' '(' LambdaExpression? ')'
;
Related tokens
Single examples
- Find a table cell with the text 'Alex'. Throws when not found or more than one record returns.
csharpselect(tableCells) // PdfTableCell ->single((item) => item.Text() == 'Alex') // PdfTableCell