Commit Graph

5 Commits

Author SHA1 Message Date
agrath@gmail.com
93d65ced40 Add IsNull and HasValue methods to Dynamic* classes
**Breaking Change: DynamicNull.HasValue and DynamicNull.IsNull have been changed from properties to methods
Rename umbraco.MacroEngines.ExtensionMethods as umbraco.MacroEngines.PrivateExtensionMethods
Implement extension method invokes for DynamicNode
2011-03-22 18:02:32 -13:00
agrath@gmail.com
1716b94449 Added some extra properties/functions to DynamicNull to provide a way to check to see if a child doc type actually exists.
.HasProperty will check for a property existence but because the child types are returned as DynamicNull, you couldn't check for null equality.
Use DynamicNull's .IsNull (true) or .HasValue (false) or .Count() (0) or a typeof check
2011-03-09 07:52:05 -13:00
agrath@gmail.com
150d4648c1 Added support for chaining properties if a previous property access returns DynamicNull 2011-03-08 19:00:04 -13:00
agrath@gmail.com
aaa90bea14 More graceful handling of missing properties in .Where - TryGetMember now returns DynamicNull
Only return DynamicNull if property truely doesn't exist - if it does exist and has no value, still return null
2011-02-27 22:55:50 -13:00
agrath@gmail.com
60c18bdff9 More graceful handling of missing properties in .Where - TryGetMember now returns DynamicNull (IEnumerable with fake .Where and .OrderBy) when the property/child type doesn't exist.
Expression Tree in DynamicQueryable explictly checks for this type and forces that portion of the predicate/expression tree to return true, bypassing the missing property
Handy when you are checking e.g. a boolean property in a .Where and that boolean doesn't exist on all nodes.
2011-02-27 21:53:45 -13:00