public static FilterPredicate Translate(Expression <Func <bool> > expression) { if (expression == null) { throw new ArgumentNullException(nameof(expression)); } try { return(TranslateFilterPredicate(FilterNormalizer.Normalize(expression.Body))); } catch (TpmException exception) { throw new NotSupportedException($"Cannot translate FilterPredicate \"{expression}\" because {exception.Message}", exception); } }
public static FilterPredicate Translate(Expression <Func <bool> > expression) { try { return(TranslateFilterPredicate(FilterNormalizer.Normalize(expression.Body))); } catch (TpmException exception) { throw new NotSupportedException( string.Format( "Cannot translate FilterPredicate \"{0}\" because {1}", expression, exception.Message), exception); } }