Commit Graph

153 Commits

Author SHA1 Message Date
hartvig
6070e1494b Work items: 30782 2012-04-24 06:56:24 -02:00
agrath
980c2d4a7f Fix DynamicXml eating - inside CData sections 2012-01-17 14:27:22 -13:00
agrath
7b157c5083 Added IntegerDataTypeModel and HtmlStringDataTypeModel to the core and removed the internal integer upcasting code. Model will automatically apply for 'Numeric' data type. use umbraco.MacroEngines.RazorDataTypeModels.IntegerDataTypeModel to apply a staticMapping in umbracoSettings for a given datatype or alias as per previous commit 2012-01-09 12:58:15 -13:00
agrath
e6f0c2a17c added umbracoSettings.scripting.razor.dataTypeModelStaticMappings to allow RazorDataTypeModels to be specified in the umbracoSettings.config file. These static mappings override the dynamic mappings provided by the RazorDataTypeModel attribute, including priority (from previous commit). You can use this feature to force a particular data type [optionally on a specific document type and/or property] to use a specific model, or exclude the data type guid and just use the aliases. This feature is inteded to be used when you want to force a particular type to return as Integer. See next commit for detail about the Type Names to use. 2012-01-09 12:38:22 -13:00
agrath
9f15137832 Made RazorDataTypeModel attribute multiple instance (meaning you can apply the same model to multiple data types without seperate copies of the model). Added a priority with a default of 100 to the model binder attribute. 2012-01-09 08:26:39 -13:00
agrath
e731fb5b03 Fixed an issue with && in DynamicNodeList.Where causing False&&False to be true 2011-12-19 13:51:11 -13:00
agrath
3b0f2804fd Fixed IsHelpers on IGrouping (DynamicNode.GroupBy) 2011-12-04 15:07:58 -13:00
agrath
ad0c67365f Missed one of the if statements 2011-10-16 09:25:20 -13:00
agrath
79f4925faf Fixed a null in @Library.Wrap check that wasn't short circuiting as intended 2011-10-16 09:24:14 -13:00
agrath
3baaa9173e Changed the behaviour of Library.NodeById and Library.MediaById with invalid ids to return DynamicNull and checked for this in DynamicNode's obsolete methods to maintain backwards compatibility 2011-10-09 07:06:52 -13:00
agrath
49877c4874 Made @Library.NodeById and @Library.MediaById return DynamicNull when the node was not found, rather than an empty DynamicNode instance with Id == 0 (Which is what NodeFactory returns). To support backwards compatibility, DynamicNull supports .Id == 0 and .Name == " 2011-10-09 06:43:37 -13:00
agrath
c7e1350abd Added .Name [string.Empty] and .Id [0] to DynamicNull and added implicit casts to int and string - backwards compat support for next commit 2011-10-09 06:36:56 -13:00
agrath
0851c04646 Made the new @Library.StripHtml (HtmlAgilityPack based) handle strings which don't contain HTML 2011-10-09 06:24:06 -13:00
agrath
407f78c84b Made OrderBy(Name) and OrderBy(name) work the same as OrderBy(nodeName) 2011-10-09 06:16:24 -13:00
agrath
5d0a9e63e2 Rewrote @Library.StripHtml to use HtmlAgilityPack rather than a forward only string walker 2011-10-04 08:34:34 -13:00
agrath
b7caa18309 Added a fake getter method to .Items on DynamicNodeList that was tripping up the latest uBlogsy beta. Could be a backwards compatibility issue 2011-09-22 13:10:01 -12:00
agrath
10529d9a9a Fixed another issue where CSV strings were swallowed by DynamicNode trying to interpret them as integers. This upcast will now only happen if you are using the datatype Integer/Number 2011-09-22 11:56:07 -12:00
agrath
84628a991e Fixed an issue where custom properties (e.g. not the defaults that are in examine) on media items would come back as XML representations when they were empty strings.
For example, a property, caption would come back as <caption></caption> if empty.
The processing code assumed that because the .Value was empty, the property contained XML but didn't check to see if it had children or attributes before returning the XML representation.
2011-09-22 11:20:09 -12:00
agrath
a7d8d3c6c2 Fixed a StackOverflow when using .Descendants on Media 2011-09-21 22:31:18 -12:00
agrath
4221d8a53f Added missing constructor overloads back onto DynamicMedia 2011-09-21 21:29:52 -12:00
agrath
0c9edb5fbc Fixed an issue with HasValue recursive overloads not passing the recursive flag down to GetProperty 2011-09-21 21:20:08 -12:00
agrath
9760ad29c8 Added a cached fallback for custom properties for media when that media item was loaded from examine as the examine fields collection doesn't contain them 2011-09-06 10:28:43 -12:00
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