[mapguide-commits] r9114 - trunk/Tools/Maestro/Maestro.Editors/Common/Expression
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Jan 11 06:05:30 PST 2017
Author: jng
Date: 2017-01-11 06:05:30 -0800 (Wed, 11 Jan 2017)
New Revision: 9114
Modified:
trunk/Tools/Maestro/Maestro.Editors/Common/Expression/FdoExpressionValidator.cs
Log:
Exclude stylization function names from FDO expression function validation
Fixes #2568
Modified: trunk/Tools/Maestro/Maestro.Editors/Common/Expression/FdoExpressionValidator.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Common/Expression/FdoExpressionValidator.cs 2017-01-11 13:55:47 UTC (rev 9113)
+++ trunk/Tools/Maestro/Maestro.Editors/Common/Expression/FdoExpressionValidator.cs 2017-01-11 14:05:30 UTC (rev 9114)
@@ -51,6 +51,11 @@
public class FdoExpressionValidator
{
+ private bool IsStylizationFunc(string name)
+ {
+ return OSGeo.MapGuide.MaestroAPI.Utility.GetStylizationFunctions().Any(func => func.Name.ToUpper() == name.ToUpper());
+ }
+
public void ValidateExpression(FdoExpression expr, ClassDefinition cls, IFdoProviderCapabilities caps)
{
switch (expr.ExpressionType)
@@ -77,7 +82,7 @@
{
var func = ((FdoFunction)expr);
string name = func.Identifier.Name;
- if (!caps.Expression.SupportedFunctions.Any(f => f.Name.ToUpper() == name.ToUpper()))
+ if (!IsStylizationFunc(name) && !caps.Expression.SupportedFunctions.Any(f => f.Name.ToUpper() == name.ToUpper()))
throw new FdoExpressionValidationException(string.Format(Strings.InvalidExpressionUnsupportedFunction, name), name);
foreach (var arg in func.Arguments)
More information about the mapguide-commits
mailing list