/// <summary>
 /// 
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <returns></returns>
 public override bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject)
 {
     if (parameterObject == null)
     {
         return true;
     }
     else
     {
         string propertyName = ((BaseTag)tag).Property;
         object value = null;
         if (propertyName != null && propertyName.Length>0)
         {
             value = ObjectProbe.GetMemberValue(parameterObject, propertyName, this.AccessorFactory);
         }
         else
         {
             value = parameterObject;
         }
         if (value is ICollection)
         {
             return ((value == null) || (((ICollection) value).Count< 1));
         }
         else if (value != null && typeof(Array).IsAssignableFrom(value.GetType())) //value.GetType().IsArray
         {
             return ((Array) value).GetLength(0) == 0;
         }
         else
         {
             return ((value == null) || (System.Convert.ToString(value).Equals("")));
         }
     }
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <returns></returns>
 public override int DoStartFragment(SqlTagContext ctx, SqlTag tag, Object parameterObject)
 {
     ctx.FirstNonDynamicTagWithPrepend = null ;
     if (tag.IsPrependAvailable)
     {
         ctx.IsOverridePrepend = true;
     }
     return BaseTagHandler.INCLUDE_BODY;
 }
 /// <summary>
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <returns></returns>
 public override bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject)
 {
     if (parameterObject == null)
     {
         return false;
     }
     else
     {
         return ObjectProbe.HasReadableProperty(parameterObject, ((BaseTag)tag).Property);
     }
 }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="ctx"></param>
        /// <param name="tag"></param>
        /// <param name="parameterObject"></param>
        /// <param name="bodyContent"></param>
        /// <returns></returns>
        public override int DoEndFragment(SqlTagContext ctx, SqlTag tag, 
            object parameterObject, StringBuilder bodyContent)
        {
            IterateContext iterate = (IterateContext) ctx.GetAttribute(tag);

            if (iterate.MoveNext())
            {
                string propertyName = ((BaseTag)tag).Property;
                if (propertyName == null)
                {
                    propertyName = "";
                }

                string find = propertyName + "[]";
                string replace = propertyName + "[" + iterate.Index + "]";//Parameter-index-Dynamic
                Replace(bodyContent, find, replace);

                if (iterate.IsFirst)
                {
                    string open = ((Iterate)tag).Open;
                    if (open != null)
                    {
                        bodyContent.Insert(0,open);
                        bodyContent.Insert(0,' ');
                    }
                }
                if (!iterate.IsLast)
                {
                    string conjunction = ((Iterate)tag).Conjunction;
                    if (conjunction != null)
                    {
                        bodyContent.Append(conjunction);
                        bodyContent.Append(' ');
                    }
                }
                if (iterate.IsLast)
                {
                    string close = ((Iterate)tag).Close;
                    if (close != null)
                    {
                        bodyContent.Append(close);
                    }
                }

                return BaseTagHandler.REPEAT_BODY;
            }
            else
            {
                return BaseTagHandler.INCLUDE_BODY;
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="ctx"></param>
        /// <param name="tag"></param>
        /// <param name="parameterObject"></param>
        /// <param name="bodyContent"></param>
        /// <returns></returns>
        public override int DoEndFragment(SqlTagContext ctx, SqlTag tag,
                                          object parameterObject, StringBuilder bodyContent)
        {
            IterateContext iterate = (IterateContext)ctx.GetAttribute(tag);

            if (iterate.MoveNext())
            {
                string propertyName = ((BaseTag)tag).Property;
                if (propertyName == null)
                {
                    propertyName = "";
                }

                string find    = propertyName + "[]";
                string replace = propertyName + "[" + iterate.Index + "]";                //Parameter-index-Dynamic
                Replace(bodyContent, find, replace);

                if (iterate.IsFirst)
                {
                    string open = ((Iterate)tag).Open;
                    if (open != null)
                    {
                        bodyContent.Insert(0, open);
                        bodyContent.Insert(0, ' ');
                    }
                }
                if (!iterate.IsLast)
                {
                    string conjunction = ((Iterate)tag).Conjunction;
                    if (conjunction != null)
                    {
                        bodyContent.Append(conjunction);
                        bodyContent.Append(' ');
                    }
                }
                if (iterate.IsLast)
                {
                    string close = ((Iterate)tag).Close;
                    if (close != null)
                    {
                        bodyContent.Append(close);
                    }
                }

                return(BaseTagHandler.REPEAT_BODY);
            }
            else
            {
                return(BaseTagHandler.INCLUDE_BODY);
            }
        }
Beispiel #6
0
        public override int DoEndFragment(SqlTagContext ctx, SqlTag tag, object parameterObject, StringBuilder bodyContent)
        {
            IterateContext attribute = (IterateContext)ctx.GetAttribute(tag);

            if (!attribute.MoveNext())
            {
                return(1);
            }
            string property = ((BaseTag)tag).Property;

            if (property == null)
            {
                property = "";
            }
            string find    = property + "[]";
            string replace = string.Concat(new object[] { property, "[", attribute.Index, "]" });

            Replace(bodyContent, find, replace);
            if (attribute.IsFirst)
            {
                string open = ((Iterate)tag).Open;
                if (open != null)
                {
                    bodyContent.Insert(0, open);
                    bodyContent.Insert(0, ' ');
                }
            }
            if (!attribute.IsLast)
            {
                string conjunction = ((Iterate)tag).Conjunction;
                if (conjunction != null)
                {
                    bodyContent.Append(conjunction);
                    bodyContent.Append(' ');
                }
            }
            if (attribute.IsLast)
            {
                string close = ((Iterate)tag).Close;
                if (close != null)
                {
                    bodyContent.Append(close);
                }
            }
            return(2);
        }
        public override bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject)
        {
            object obj2;

            if (parameterObject == null)
            {
                return(true);
            }
            string property = ((BaseTag)tag).Property;

            if ((property != null) && (property.Length > 0))
            {
                obj2 = ObjectProbe.GetMemberValue(parameterObject, property, base.AccessorFactory);
            }
            else
            {
                obj2 = parameterObject;
            }
            return(obj2 == null);
        }
Beispiel #8
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="ctx"></param>
        /// <param name="sqlTag"></param>
        /// <param name="parameterObject"></param>
        /// <returns></returns>
        protected long Compare(SqlTagContext ctx, SqlTag sqlTag, object parameterObject)
        {
            Conditional tag                 = (Conditional)sqlTag;
            string      propertyName        = tag.Property;
            string      comparePropertyName = tag.CompareProperty;
            string      compareValue        = tag.CompareValue;

            object value1 = null;
            Type   type   = null;

            if (propertyName != null && propertyName.Length > 0)
            {
                value1 = ObjectProbe.GetMemberValue(parameterObject, propertyName, this.AccessorFactory);
                type   = value1.GetType();
            }
            else
            {
                value1 = parameterObject;
                if (value1 != null)
                {
                    type = parameterObject.GetType();
                }
                else
                {
                    type = typeof(object);
                }
            }
            if (comparePropertyName != null && comparePropertyName.Length > 0)
            {
                object value2 = ObjectProbe.GetMemberValue(parameterObject, comparePropertyName, this.AccessorFactory);
                return(CompareValues(type, value1, value2));
            }
            else if (compareValue != null && compareValue != "")
            {
                return(CompareValues(type, value1, compareValue));
            }
            else
            {
                throw new DataMapperException("Error comparing in conditional fragment.  Uknown 'compare to' values.");
            }
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <returns></returns>
 public override bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject)
 {
     if (parameterObject == null)
     {
         return(true);
     }
     else
     {
         string propertyName = ((BaseTag)tag).Property;
         object value;
         if (propertyName != null && propertyName.Length > 0)
         {
             value = ObjectProbe.GetMemberValue(parameterObject, propertyName, this.AccessorFactory);
         }
         else
         {
             value = parameterObject;
         }
         return(value == null);
     }
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <returns></returns>
 public override bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject)
 {
     if (parameterObject == null)
     {
         return true;
     }
     else
     {
         string propertyName = ((BaseTag)tag).Property;
         object value;
         if (propertyName != null && propertyName.Length>0 )
         {
             value = ObjectProbe.GetMemberValue(parameterObject, propertyName, this.AccessorFactory);
         }
         else
         {
             value = parameterObject;
         }
         return (value == null);
     }
 }
Beispiel #11
0
 public virtual void DoPrepend(SqlTagContext ctx, SqlTag tag, object parameterObject, StringBuilder bodyContent)
 {
     if (tag.IsPrependAvailable)
     {
         if (bodyContent.ToString().Trim().Length > 0)
         {
             if (ctx.IsOverridePrepend && (tag == ctx.FirstNonDynamicTagWithPrepend))
             {
                 ctx.IsOverridePrepend = false;
             }
             else
             {
                 bodyContent.Insert(0, tag.Prepend);
             }
         }
         else if (ctx.FirstNonDynamicTagWithPrepend != null)
         {
             ctx.FirstNonDynamicTagWithPrepend = null;
             ctx.IsOverridePrepend             = true;
         }
     }
 }
        protected long Compare(SqlTagContext ctx, SqlTag sqlTag, object parameterObject)
        {
            Conditional conditional     = (Conditional)sqlTag;
            string      property        = conditional.Property;
            string      compareProperty = conditional.CompareProperty;
            string      compareValue    = conditional.CompareValue;
            object      obj2            = null;
            Type        type            = null;

            if ((property != null) && (property.Length > 0))
            {
                obj2 = ObjectProbe.GetMemberValue(parameterObject, property, base.AccessorFactory);
                type = obj2.GetType();
            }
            else
            {
                obj2 = parameterObject;
                if (obj2 != null)
                {
                    type = parameterObject.GetType();
                }
                else
                {
                    type = typeof(object);
                }
            }
            if ((compareProperty != null) && (compareProperty.Length > 0))
            {
                object obj3 = ObjectProbe.GetMemberValue(parameterObject, compareProperty, base.AccessorFactory);
                return(this.CompareValues(type, obj2, obj3));
            }
            switch (compareValue)
            {
            case null:
            case "":
                throw new DataMapperException("Error comparing in conditional fragment.  Uknown 'compare to' values.");
            }
            return(this.CompareValues(type, obj2, compareValue));
        }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <param name="bodyContent"></param>
 public virtual void DoPrepend(SqlTagContext ctx, SqlTag tag, object parameterObject, StringBuilder bodyContent)
 {
     if (tag.IsPrependAvailable)
     {
         if (bodyContent.ToString().Trim().Length > 0)
         {
             if (ctx.IsOverridePrepend && tag == ctx.FirstNonDynamicTagWithPrepend)
             {
                 ctx.IsOverridePrepend = false;
             }
             else
             {
                 bodyContent.Insert(0, tag.Prepend);
             }
         }
         else
         {
             if (ctx.FirstNonDynamicTagWithPrepend != null)
             {
                 ctx.FirstNonDynamicTagWithPrepend = null;
                 ctx.IsOverridePrepend =true;
             }
         }
     }
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <returns></returns>
 public override bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject)
 {
     return !base.IsCondition(ctx, tag, parameterObject);
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <returns></returns>
 public override int DoStartFragment(SqlTagContext ctx, SqlTag tag, Object parameterObject)
 {
     if (IsCondition(ctx, tag, parameterObject))
     {
         return BaseTagHandler.INCLUDE_BODY;
     }
     else
     {
         return BaseTagHandler.SKIP_BODY;
     }
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <param name="bodyContent"></param>
 /// <returns></returns>
 public override int DoEndFragment(SqlTagContext ctx, SqlTag tag, Object parameterObject, StringBuilder bodyContent)
 {
     return BaseTagHandler.INCLUDE_BODY;
 }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="ctx"></param>
        /// <param name="sqlTag"></param>
        /// <param name="parameterObject"></param>
        /// <returns></returns>
        protected long Compare(SqlTagContext ctx, SqlTag sqlTag, object parameterObject)
        {
            Conditional tag = (Conditional)sqlTag;
            string propertyName = tag.Property;
            string comparePropertyName = tag.CompareProperty;
            string compareValue = tag.CompareValue;

            object value1 = null;
            Type type = null;
            if (propertyName != null && propertyName.Length > 0)
            {
                value1 = ObjectProbe.GetMemberValue(parameterObject, propertyName, this.AccessorFactory);
                type = value1.GetType();
            }
            else
            {
                value1 = parameterObject;
                if (value1 != null)
                {
                    type = parameterObject.GetType();
                }
                else
                {
                    type = typeof(object);
                }
            }
            if (comparePropertyName != null && comparePropertyName.Length > 0)
            {
                object value2 = ObjectProbe.GetMemberValue(parameterObject, comparePropertyName, this.AccessorFactory);
                return CompareValues(type, value1, value2);
            }
            else if (compareValue != null && compareValue != "")
            {
                return CompareValues(type, value1, compareValue);
            }
            else
            {
                throw new DataMapperException("Error comparing in conditional fragment.  Uknown 'compare to' values.");
            }
        }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <returns></returns>
 public abstract bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject);
 /// <summary>
 /// 
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <returns></returns>
 public virtual int DoStartFragment(SqlTagContext ctx, SqlTag tag, object parameterObject)
 {
     return BaseTagHandler.INCLUDE_BODY;
 }
Beispiel #20
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <param name="bodyContent"></param>
 /// <returns></returns>
 public override int DoEndFragment(SqlTagContext ctx, SqlTag tag, Object parameterObject, StringBuilder bodyContent)
 {
     return(BaseTagHandler.INCLUDE_BODY);
 }
Beispiel #21
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="request"></param>
        /// <param name="parameterObject"></param>
        /// <returns></returns>
        private string Process(RequestScope request, object parameterObject)
        {
            SqlTagContext ctx = new SqlTagContext();
            IList localChildren = _children;

            ProcessBodyChildren(request, ctx, parameterObject, localChildren);

            // Builds a 'dynamic' ParameterMap
            ParameterMap map = new ParameterMap(request.DataExchangeFactory);
            map.Id = _statement.Id + "-InlineParameterMap";
            map.Initialize(_usePositionalParameters, request);
            map.Class = _statement.ParameterClass;

            // Adds 'dynamic' ParameterProperty
            IList parameters = ctx.GetParameterMappings();
            int count = parameters.Count;
            for(int i=0;i<count;i++)
            {
                map.AddParameterProperty( (ParameterProperty)parameters[i] );
            }
            request.ParameterMap = map;

            string dynSql = ctx.BodyText;

            // Processes $substitutions$ after DynamicSql
            if ( SimpleDynamicSql.IsSimpleDynamicSql(dynSql) )
            {
                dynSql = new SimpleDynamicSql(request, dynSql, _statement).GetSql(parameterObject);
            }
            return dynSql;
        }
Beispiel #22
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <returns></returns>
 public virtual int DoStartFragment(SqlTagContext ctx, SqlTag tag, object parameterObject)
 {
     return(BaseTagHandler.INCLUDE_BODY);
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <returns></returns>
 public override int DoStartFragment(SqlTagContext ctx, SqlTag tag, object parameterObject)
 {
     IterateContext iterate = (IterateContext) ctx.GetAttribute(tag);
     if (iterate == null)
     {
         string propertyName = ((BaseTag)tag).Property;
         object collection;
         if (propertyName != null && propertyName.Length>0)
         {
             collection = ObjectProbe.GetMemberValue(parameterObject, propertyName, this.AccessorFactory);
         }
         else
         {
             collection = parameterObject;
         }
         iterate = new IterateContext(collection);
         ctx.AddAttribute(tag, iterate);
     }
     if (iterate != null && iterate.HasNext)
     {
         return BaseTagHandler.INCLUDE_BODY;
     }
     else
     {
         return BaseTagHandler.SKIP_BODY;
     }
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <param name="bodyContent"></param>
 public override void DoPrepend(SqlTagContext ctx, SqlTag tag, object parameterObject, StringBuilder bodyContent)
 {
     IterateContext iterate = (IterateContext) ctx.GetAttribute(tag);
     if (iterate.IsFirst)
     {
         base.DoPrepend(ctx, tag, parameterObject, bodyContent);
     }
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <returns></returns>
 public override bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject)
 {
     return (parameterObject != null);
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <returns></returns>
 public override bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject)
 {
     long x = this.Compare(ctx, tag, parameterObject);
     return ((x <= 0) && (x != ConditionalTagHandler.NOT_COMPARABLE));
 }
Beispiel #27
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="request"></param>
        /// <param name="ctx"></param>
        /// <param name="parameterObject"></param>
        /// <param name="localChildren"></param>
        /// <param name="buffer"></param>
        private void ProcessBodyChildren(RequestScope request, SqlTagContext ctx, 
            object parameterObject, IEnumerator localChildren, StringBuilder buffer)
        {
            while (localChildren.MoveNext())
            {
                ISqlChild child = (ISqlChild) localChildren.Current;

                if (child is SqlText)
                {
                    SqlText sqlText = (SqlText) child;
                    string sqlStatement = sqlText.Text;
                    if (sqlText.IsWhiteSpace)
                    {
                        buffer.Append(sqlStatement);
                    }
                    else
                    {
            //						if (SimpleDynamicSql.IsSimpleDynamicSql(sqlStatement))
            //						{
            //							sqlStatement = new SimpleDynamicSql(sqlStatement, _statement).GetSql(parameterObject);
            //							SqlText newSqlText = _paramParser.ParseInlineParameterMap( null, sqlStatement );
            //							sqlStatement = newSqlText.Text;
            //							ParameterProperty[] mappings = newSqlText.Parameters;
            //							if (mappings != null)
            //							{
            //								for (int i = 0; i < mappings.Length; i++)
            //								{
            //									ctx.AddParameterMapping(mappings[i]);
            //								}
            //							}
            //						}
                        // BODY OUT
                        buffer.Append(" ");
                        buffer.Append(sqlStatement);

                        ParameterProperty[] parameters = sqlText.Parameters;
                        if (parameters != null)
                        {
                            int length = parameters.Length;
                            for (int i = 0; i< length; i++)
                            {
                                ctx.AddParameterMapping(parameters[i]);
                            }
                        }
                    }
                }
                else if (child is SqlTag)
                {
                    SqlTag tag = (SqlTag) child;
                    ISqlTagHandler handler = tag.Handler;
                    int response = BaseTagHandler.INCLUDE_BODY;

                    do
                    {
                        StringBuilder body = new StringBuilder();

                        response = handler.DoStartFragment(ctx, tag, parameterObject);
                        if (response != BaseTagHandler.SKIP_BODY)
                        {
                            if (ctx.IsOverridePrepend
                                && ctx.FirstNonDynamicTagWithPrepend == null
                                && tag.IsPrependAvailable
                                && !(tag.Handler is DynamicTagHandler))
                            {
                                ctx.FirstNonDynamicTagWithPrepend = tag;
                            }

                            ProcessBodyChildren(request, ctx, parameterObject, tag.GetChildrenEnumerator(), body);

                            response = handler.DoEndFragment(ctx, tag, parameterObject, body);
                            handler.DoPrepend(ctx, tag, parameterObject, body);
                            if (response != BaseTagHandler.SKIP_BODY)
                            {
                                if (body.Length > 0)
                                {
                                    // BODY OUT

                                    if (handler.IsPostParseRequired)
                                    {
                                        SqlText sqlText = _paramParser.ParseInlineParameterMap(request, null, body.ToString() );
                                        buffer.Append(sqlText.Text);
                                        ParameterProperty[] mappings = sqlText.Parameters;
                                        if (mappings != null)
                                        {
                                            int length = mappings.Length;
                                            for (int i = 0; i< length; i++)
                                            {
                                                ctx.AddParameterMapping(mappings[i]);
                                            }
                                        }
                                    }
                                    else
                                    {
                                        buffer.Append(" ");
                                        buffer.Append(body.ToString());
                                    }
                                    if (tag.IsPrependAvailable && tag == ctx.FirstNonDynamicTagWithPrepend)
                                    {
                                        ctx.IsOverridePrepend = false;
                                    }
                                }
                            }
                        }
                    }
                    while (response == BaseTagHandler.REPEAT_BODY);
                }
            }
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <returns></returns>
 public override bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject)
 {
     return(this.Compare(ctx, tag, parameterObject) == 0);
 }
 public override int DoEndFragment(SqlTagContext ctx, SqlTag tag, object parameterObject, StringBuilder bodyContent)
 {
     return(1);
 }
Beispiel #30
0
 public virtual int DoStartFragment(SqlTagContext ctx, SqlTag tag, object parameterObject)
 {
     return(1);
 }
 public override bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject)
 {
     return(parameterObject != null);
 }
Beispiel #32
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <returns></returns>
 public abstract bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject);
        public override bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject)
        {
            long num = base.Compare(ctx, tag, parameterObject);

            return((num >= 0L) && (num != -9223372036854775808L));
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="ctx"></param>
        /// <param name="tag"></param>
        /// <param name="parameterObject"></param>
        /// <returns></returns>
        public override bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject)
        {
            long x = this.Compare(ctx, tag, parameterObject);

            return((x >= 0) && (x != ConditionalTagHandler.NOT_COMPARABLE));
        }
Beispiel #35
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="request"></param>
 /// <param name="ctx"></param>
 /// <param name="parameterObject"></param>
 /// <param name="localChildren"></param>
 private void ProcessBodyChildren(RequestScope request, SqlTagContext ctx, 
     object parameterObject, IList localChildren)
 {
     StringBuilder buffer = ctx.GetWriter();
     ProcessBodyChildren(request, ctx, parameterObject, localChildren.GetEnumerator(), buffer);
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <returns></returns>
 public override bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject)
 {
     return(!base.IsCondition(ctx, tag, parameterObject));
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="ctx"></param>
 /// <param name="tag"></param>
 /// <param name="parameterObject"></param>
 /// <returns></returns>
 public override bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject)
 {
     return (this.Compare(ctx, tag, parameterObject) == 0);
 }