agrath
b5dddc5e7c
Bypassed a dictionary lookup if the datatype is Guid.Empty
2011-09-06 10:27:20 -12:00
agrath
e2a60d55ff
Changed the return type of Pluck when the list was empty from DynamicNull to List<Object>[0]
2011-09-01 08:46:18 -12:00
agrath
c097b0f250
Prevented OrderBy from throwing an error when presented with an empty list
2011-09-01 08:45:43 -12:00
agrath
265fc0b3ca
Improved the handling of DynamicNull when using OrderBy
2011-08-29 11:19:34 -12:00
agrath
4d3c145be9
Added support to DynamicQueryable to support property accesses via reflection on DynamicNode properties, e.g. list.GroupBy(uBlogsyPostDate.Date)
2011-08-18 14:30:42 -12:00
agrath
c657236f7c
Fixed DynamicBackingItem autodetection of Media used in NodeById, now you can use NodeById to get Media or Content nodes
2011-08-17 21:27:09 -12:00
agrath
b023455068
Added an overload to NodesById and DynamicBackingItem/DynamicNode to signify you want a List<int> to be treated as media, not content
2011-08-15 10:18:15 -12:00
agrath
f361e20482
Traced exception message out on DynamicNode
2011-08-11 15:36:54 -12:00
agrath
860a33d9b3
Changed return type of Library.StripHtml to be HtmlString to facilitate partial strips feature still returning HTML and not wanting to encode the result
2011-08-07 14:07:09 -12:00
agrath
e2e0186174
Added TryGetIndex to DynamicNodeList to allow [] indexing
2011-08-01 11:11:00 -12:00
agrath
7d3cfa4151
Added .Except, .Intersect, .Union and .Distinct to DynamicNodeList
2011-07-31 17:05:44 -12:00
agrath
adc3a36ac2
Changed the decimal parsing in ConvertPropertyValueByDataType so it only tries to do this if the string contains the current decimal seperator character to prevent CSV strings from converting to decimals in cultures where , is used as the decimal seperator
2011-07-31 16:34:58 -12:00
agrath
9d996aaf43
More @Library.Truncate parser fixes
2011-07-31 16:27:43 -12:00
agrath
13e5e5a8df
Fixed a bug in @Library.Truncate regarding attempting to close tags which were not open when the truncation occurred before any tags had been opened.
2011-07-31 11:16:45 -12:00
agrath
2ea3c4b624
Got rid of InternalHtmlString as it wasn't being used and was throwing off some of the RazorLibraryCore overloads
2011-07-31 10:10:01 -12:00
agrath
d022b4a52a
Added the datatype GUID to the DateTime parsing code for the Date picker without time
2011-07-28 11:51:04 -12:00
agrath
3a7609cba0
Another fix for Catch FileNotFound exceptions in ExamineBackedMedia which are thrown by Examine currently (bug?) on a LoadBalanced file store after a publish occurs. When caught, ExamineBackedMedia will fall back to GetMedia as if the media item wasn't in the examine index
2011-07-28 09:44:23 -12:00
agrath
e72bd130e3
Further changes to fix bug with 'incorrect number of lambda paramters' issue with .Where when using && and ||
2011-07-26 14:02:25 -12:00
agrath
ae3357de0d
Fixed a bug with .Where && and || throwing invalid number of parameters for lambda when both left & right were not lambdas, e.g. Visible && NodeTypeAlias != umbNewsArticleItem
2011-07-24 13:55:36 -12:00
agrath@gmail.com
31169380f8
Changed the return type of RTE to a different HtmlString (internal) so that it can be implicitly convertible for string for If comparisons. Added an extension method for string.HasValue so that .Where can invoke it to improve readibility when comparing RTE to empty string based on feedback from @cultiv. Cleaned up an empty if in DynamicQuerable
2011-07-21 20:19:54 -12:00
agrath@gmail.com
3737a8cf28
Catch FileNotFound exceptions in ExamineBackedMedia which are thrown by Examine currently (bug?) on a LoadBalanced file store after a publish occurs. When caught, ExamineBackedMedia will fall back to GetMedia as if the media item wasn't in the examine index
2011-07-21 13:15:20 -12:00
agrath@gmail.com
ba965a95e9
Made ConvertPropertyValueByDataType return DynamicNull instead of empty string when the datatype is a Date/Time and the TryParse fails. Only applied DateTime parsing to datatype Date/Time rather than always trying it
2011-07-21 12:18:58 -12:00
agrath@gmail.com
80e6187436
Made DynamicNull implictly convertable to DateTime (.MinValue) to support next change
2011-07-21 12:17:55 -12:00
agrath@gmail.com
6dcf1fcd8e
Slight optimisation in ExtensionMethodFinder. Previous commits fixed #30346
2011-07-21 11:42:34 -12:00
agrath@gmail.com
f6ab67ea78
Added support to ExtensionMethodFinder to do overload type resolution to locate the correct extension method based on types when there are multiple overloads available
2011-07-21 11:27:34 -12:00
agrath@gmail.com
e8a941fc1f
Added support for invoking extension methods on native properties on DynamicNode where the native property type is string (e.g. NodeTypeAlias, Name). Half fixes ContainsAny support
2011-07-21 11:25:15 -12:00
sgay
f20931cfa4
Refactored Razor DynamicNode.XPath() to returns an empty list when no nodes are found, instead of throwing [ #30361 ]
2011-07-14 06:47:40 -02:00
agrath@gmail.com
a66847587c
Added pluck aggregates Sum/Average/Min/Max to DynamicNodeList
2011-07-11 12:20:02 -12:00
agrath@gmail.com
d9dc90090b
Changed @Library.MediaById(.) to return a DynamicMedia again so that specific media functionality can be added. DynamicMedia is just an empty subclass of DynamicNode currently
2011-07-11 11:27:31 -12:00
agrath@gmail.com
892a382eca
Added HasValue overloads that function like If/Where shorthands for writing out a value if a property has a value, e.g. Class Name
2011-07-11 11:24:00 -12:00
agrath@gmail.com
17f6ee1c91
Made PropertyResult IHtmlString so if you @Model.GetProperty(propName) then you get the value but it's still a PropertyResult/IProperty
2011-07-11 11:20:31 -12:00
agrath@gmail.com
48c11f6b45
Added TryInvoke and TryGetIndex methods to DynamicNull to prevent crashes on missing properties
2011-07-11 11:13:31 -12:00
agrath@gmail.com
d5e3ceecec
Made IsHelper methods on DynamicNode and DynamicXml return HtmlString instead of string
2011-07-03 22:41:33 -12:00
agrath@gmail.com
d81aed3dc5
Fixed ExamineBackedMedia.NodeTypeAlias - was using the wrong Values key
2011-07-03 21:02:35 -12:00
agrath@gmail.com
cfcae904ba
Added implicit conversion between DynamicNull and bool (false) which allows you to go @if(@Model.dynamicNullProperty)
2011-07-03 19:25:16 -12:00
agrath@gmail.com
8ab1c11bd1
Made @Library.NodeById and @Library.MediaById DynamicNull safe, will return DynamicNull instead of 'Cannot instantiate a DynamicNode without an id'
2011-07-03 18:31:47 -12:00
agrath@gmail.com
41d3c9f3d9
Formatting in Linq Foreach of IRazorDataTypeModel cache build code
2011-07-03 10:14:04 -12:00
agrath@gmail.com
1164ea3ab1
Fixed a bug where if the ContentType (DocumentType) tree was a different tree to the Content or Media (Node) tree then the datatype lookup could fail when retrieving a property recursively.
...
If GetProperty recursively walked up the content tree to the first node that defined the property and eventutally found it, and the NodeType[Alias] of the node it was found on was not a parent of the original content's node type, then the lookup would fail.
Changed DynamicBackingItem.GetProperty (and PropertyResult class) to return the Node/Context where the property is being returned from and used this context's NodeTypeAlias as the in the data type lookup.
2011-07-03 09:32:29 -12:00
agrath@gmail.com
75d15cdc31
Made GetProperty break earlier if context/parent is null (prevents NRE) and slightly changed behaviour so that empty strings will go recursively to the parent. Added prefix to property access (_) which will cause the property to be looked up recursively. This syntax is used when you want to get the value recursively, but you want to still apply the IRazorDataTypeModel (as @Model.GetPropertyValue won't do that). Syntax is: @Model._propertyName - had to be a _ as that is legal c#
2011-07-02 17:29:47 -12:00
agrath@gmail.com
49a0c8a11a
Changed return type of @Library.If to IHtmlString so that you can return HTML with it
2011-07-02 17:27:27 -12:00
agrath@gmail.com
8435067e98
Added overload to @Library.If for trueValue only
2011-06-30 11:56:16 -12:00
agrath@gmail.com
eff692249d
Made the int.TryParse and decimal.TryParse in DynamicNode culture aware so that , and . as numeric/decimal seperators are handled properly
2011-06-30 11:00:15 -12:00
agrath@gmail.com
0589d34abd
Changed the implementation of IRazorDataTypeModel to allow for immutable types to be returned such as string, int. Thanks @zpqrtbnk
2011-06-30 10:32:50 -12:00
agrath@gmail.com
9b4a08950c
Added support for attribute first child fallback in DynamicXml
2011-06-30 10:16:30 -12:00
agrath@gmail.com
5988ff5da8
Added a try/catch to GetPropertyInternal to catch a potential MissingMethodException when trying to locate a property that didn't exist
2011-06-29 17:45:08 -12:00
agrath@gmail.com
cce3cdc18b
fixed some potential crashes in datatype lookups and a keyalreadyexists exception in datatype lookup
2011-06-29 17:36:37 -12:00
agrath@gmail.com
0475b48a8c
Fixed an issue with new DynamicNode() and DynamicNode.XPath using the wrong overload, thanks @cultiv
2011-06-29 17:18:10 -12:00
agrath@gmail.com
56e9cdb045
Added overloads to @Library.Truncate and @Library.StripHtml for DynamicNull to prevent errors when properties may not exist
2011-06-27 16:52:04 -12:00
agrath@gmail.com
ba8d8f8787
Changed @Library methods which return Dynamic* types to return type dynamic as methods on DynamicNodeList etc wouldn't work due to the type not being dynamic. Because @Model.NodeById got moved to @Library.NodeById and @Model is dynamic, this problem didn't exist before
2011-06-27 12:45:17 -12:00
agrath@gmail.com
0b47da8d41
Added @Library.Truncate to simulate string.left but not error when string is < length and be html tag aware. Optionally adds elipsis to end of strings
2011-06-26 11:26:02 -12:00