Enumerable ExtensionsInT(IEnumerableT, String) Method
Returns true if enumerable contains a value that is equal to any elements in the user variable.
Definition
Namespace: SphinxConnector.FluentApi.Util
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 6.1.0
true if the enumerable contains a value that is equal to any of the other arguments, otherwise false.
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 6.1.0
C#
public static bool In<T>(
this IEnumerable<T> enumerable,
string userVariable
)
VB
<ExtensionAttribute>
Public Shared Function In(Of T) (
enumerable As IEnumerable(Of T),
userVariable As String
) As BooleanParameters
- enumerable IEnumerableT
- The values to check for equality.
- userVariable String
- The user variable.
Type Parameters
- T
- The type of the elements of enumerable.
Return Value
Booleantrue if the enumerable contains a value that is equal to any of the other arguments, otherwise false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Example
C#
using (IFulltextSession fulltextSession = fulltextStore.StartSession())
{
var results = fulltextSession.Query<Product>().
Where(p => p.Categories.In("@my_user_var")).
ToList();
}