Commit Graph

5 Commits

Author SHA1 Message Date
agrath@gmail.com
a32e8894cd Added support for calling non standard extension method style helpers within a .Where
Intended as a future extensibility point, provides a way for the parser to redirect into a static method library of helpers
Currently, only one method is available - ContainsAny
Functions like string.Contains but uses needles from a List<string>

var values = new Dictionary<string,object>();
var keywords = new List<string>();
keywords.Add("Five");
keywords.Add("Four");
values.Add("keywords",keywords);
var items = @Model.Children.Where("Name.ContainsAny(keywords)", values);
2011-02-26 11:12:06 -13:00
agrath@gmail.com
6d615e6762 Work on DynamicQueryable to support .Where("bodyText.Contains(\"string\")")
Chaining works too: .Where("Name.SubString(1,3).Contains(\"v\")");
2011-02-25 16:58:17 -13:00
agrath@gmail.com
b1ff0db8fe Work on DynamicQueryable to support .Where("shouldBeVisible && Level < 4") rather than .Where("shouldBeVisible == true && Level < 4")
Confirmed other test cases of .Where still work
2011-02-25 12:16:03 -13:00
agrath@gmail.com
9b45a81f22 Rewrote implementation of HandleDynamicNodeLambdas in DynamicQueryable.cs to be easier to read and handle unboxing and type conversion when the output type of the lambda is convertable between the left and right side.
Allows this syntax to work now:
@Model.Children.Where("updateDate < DateTime.Now.AddDays(-2)")
This didn't work previously in 4.7beta because updateDate was still boxed as an object and object < DateTime can't be implicitly converted

@Model.Children.Where("bodyText.Contains('ipsum')") still doesn't work because the parser doesn't know how to invoke .Contains on a LambdaExpression (yet)
2011-02-25 00:39:53 -13:00
agrath@gmail.com
603a12c5a0 Split umbraco.MacroEngines.Juno into two subfolders (namespaces remain the same)
RazorCore contains all the core razor engine implementation
RazorDynamicNode contains all the DynamicNode functionality and associated support files
2011-02-24 16:05:54 -13:00