 | FunctionExistT Method |
Returns the value of the attribute if it exists in the index(es), otherwise returns the provided default value.
Namespace:
SphinxConnector.FluentApi
Assembly:
SphinxConnector (in SphinxConnector.dll) Version: 5.4.1
Syntaxpublic static T Exist<T>(
Expression<Func<T>> keySelector,
T defaultValue
)
Public Shared Function Exist(Of T) (
keySelector As Expression(Of Func(Of T)),
defaultValue As T
) As T
Parameters
- keySelector
- Type: System.Linq.ExpressionsExpressionFuncT
A function to extract the attribute from a document. - defaultValue
- Type: T
The value that is returned in case the attribute does not exist.
Type Parameters
- T
- The type of the attribute.
Return Value
Type:
TThe value of the attribute, or a default values if it does not exist.
See Also