/// <summary> /// Create a not mapped parameter /// </summary> /// <param name="documentSearch">Document search engine</param> /// <param name="conditional">Conditional to add parameter</param> /// <param name="name">Name of parameter</param> /// <param name="value">Value of parameter</param> /// <returns>Document search engine</returns> public static DocumentSearch <TDocument> AnyIf <TDocument>(this DocumentSearch <TDocument> documentSearch, Func <bool> conditional, string name, string value) where TDocument : Document { Checker.IsNull(conditional); if (conditional.Invoke()) { documentSearch.Any(name, value); } return(documentSearch); }