Example #1
0
        private String TryConstant(Object value)
        {
            StringWriter writer = new StringWriter();

            EPStatementObjectModelHelper.RenderEPL(writer, value);
            return(writer.ToString());
        }
 public override void ToPrecedenceFreeEPL(TextWriter writer)
 {
     if (!_isSatisfied)
     {
         ToPrecedenceFreeEPLUnsatisfied(writer);
     }
     else
     {
         EPStatementObjectModelHelper.RenderEPL(writer, _constant);
     }
 }
Example #3
0
        public override void ToPrecedenceFreeEPL(TextWriter writer)
        {
            var constant = Constant;

            if (constant is IDictionary <string, object> )
            {
                var map = (IDictionary <string, object>)constant;
                writer.Write("{");
                var delimiter = "";

                foreach (var entry in map)
                {
                    writer.Write(delimiter);
                    writer.Write(entry.Key);
                    writer.Write(": ");
                    DataFlowOperatorParameter.RenderValue(writer, entry.Value);
                    delimiter = ",";
                }
                writer.Write("}");
            }
            else if (constant is string)
            {
                EPStatementObjectModelHelper.RenderEPL(writer, constant);
            }
            else if (constant is IEnumerable)
            {
                var iterable = (IEnumerable)constant;
                writer.Write("[");
                var delimiter = "";

                foreach (var next in iterable)
                {
                    writer.Write(delimiter);
                    DataFlowOperatorParameter.RenderValue(writer, next);
                    delimiter = ",";
                }
                writer.Write("]");
            }
            else
            {
                EPStatementObjectModelHelper.RenderEPL(writer, constant);
            }
        }
Example #4
0
 public override void ToPrecedenceFreeEPL(TextWriter writer)
 {
     writer.Write(
         EPStatementObjectModelHelper.RenderValue(_constantValue));
 }