/// <summary> /// Adds a <see cref="SearchCondition"/> to the collection to represent a "one of" search condition (https://developer.m-files.com/APIs/COM-API/Searching/SearchConditions/#executing-a-one-of-search). /// </summary> /// <param name="searchBuilder">The <see cref="MFSearchBuilder"/> to add the condition to.</param> /// <param name="propertyDef">The ID of the property to search by.</param> /// <param name="lookups">The items to search for (the object must have the property set to one of these).</param> /// <param name="parentChildBehavior">Whether to accept matches to parent/child values as well (defaults to <see cref="MFParentChildBehavior.MFParentChildBehaviorNone"/>).</param> /// <param name="indirectionLevels">The indirection levels (from the search object) to access the property to match.</param> /// <returns>The <paramref name="searchBuilder"/> provided, for chaining.</returns> public static MFSearchBuilder PropertyOneOf ( this MFSearchBuilder searchBuilder, int propertyDef, Lookups lookups, MFParentChildBehavior parentChildBehavior = MFParentChildBehavior.MFParentChildBehaviorNone, PropertyDefOrObjectTypes indirectionLevels = null ) { // Use the other overload. return(searchBuilder?.PropertyOneOf ( propertyDef, lookups? .Cast <Lookup>()? .Where(l => l != null)? .Select(lookup => lookup.Item), parentChildBehavior, indirectionLevels )); }