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