private void SendWindow(EPServiceProvider epService, string col0, long col1, string col2)
        {
            var theEvent = new LinkedHashMap <string, Object>();

            theEvent.Put("col0", col0);
            theEvent.Put("col1", col1);
            theEvent.Put("col2", col2);
            if (EventRepresentationChoiceExtensions.GetEngineDefault(epService).IsObjectArrayEvent())
            {
                epService.EPRuntime.SendEvent(theEvent.Values.ToArray(), "WindowSchema");
            }
            else
            {
                epService.EPRuntime.SendEvent(theEvent, "WindowSchema");
            }
        }
        private void SendEvent(EPServiceProvider epService, string e0, int e1, string e2)
        {
            var theEvent = new LinkedHashMap <string, Object>();

            theEvent.Put("e0", e0);
            theEvent.Put("e1", e1);
            theEvent.Put("e2", e2);
            if (EventRepresentationChoiceExtensions.GetEngineDefault(epService).IsObjectArrayEvent())
            {
                epService.EPRuntime.SendEvent(theEvent.Values.ToArray(), "EventSchema");
            }
            else
            {
                epService.EPRuntime.SendEvent(theEvent, "EventSchema");
            }
        }
Beispiel #3
0
        private void SendSchemaEvent(Object prop, String key)
        {
            IDictionary <String, Object> theEvent = new Dictionary <String, Object>();

            theEvent["prop"] = prop;
            theEvent["key"]  = key;

            if (EventRepresentationChoiceExtensions.GetEngineDefault(_epService).IsObjectArrayEvent())
            {
                _epService.EPRuntime.SendEvent(theEvent, "MySchema");
            }
            else
            {
                _epService.EPRuntime.SendEvent(theEvent, "MySchema");
            }
        }
        private void CreateSendEvent(EPServiceProvider engine, string typeName, string company, double value, double total)
        {
            var map = new LinkedHashMap <string, Object>();

            map.Put("company", company);
            map.Put("value", value);
            map.Put("total", total);
            if (EventRepresentationChoiceExtensions.GetEngineDefault(engine).IsObjectArrayEvent())
            {
                engine.EPRuntime.SendEvent(map.Values.ToArray(), typeName);
            }
            else
            {
                engine.EPRuntime.SendEvent(map, typeName);
            }
        }
Beispiel #5
0
        private void SendSchemaEvent(EPServiceProvider epService, object prop, string key)
        {
            var theEvent = new Dictionary <string, object>();

            theEvent.Put("prop", prop);
            theEvent.Put("key", key);

            if (EventRepresentationChoiceExtensions.GetEngineDefault(epService).IsObjectArrayEvent())
            {
                epService.EPRuntime.SendEvent(theEvent, "MyDynoPropSchema");
            }
            else
            {
                epService.EPRuntime.SendEvent(theEvent, "MyDynoPropSchema");
            }
        }
 private static void SendEvent(
     RegressionEnvironment env,
     string e0,
     int e1,
     string e2)
 {
     IDictionary<string, object> theEvent = new LinkedHashMap<string, object>();
     theEvent.Put("e0", e0);
     theEvent.Put("e1", e1);
     theEvent.Put("e2", e2);
     if (EventRepresentationChoiceExtensions.GetEngineDefault(env.Configuration).IsObjectArrayEvent()) {
         env.SendEventObjectArray(theEvent.Values.ToArray(), "EventSchema");
     }
     else {
         env.SendEventMap(theEvent, "EventSchema");
     }
 }
Beispiel #7
0
        private void SendEvent(String e0, int e1, String e2)
        {
            var theEvent = new LinkedHashMap <String, Object>();

            theEvent["e0"] = e0;
            theEvent["e1"] = e1;
            theEvent["e2"] = e2;

            if (EventRepresentationChoiceExtensions.GetEngineDefault(_epService).IsObjectArrayEvent())
            {
                _epService.EPRuntime.SendEvent(theEvent.Values.ToArray(), "EventSchema");
            }
            else
            {
                _epService.EPRuntime.SendEvent(theEvent, "EventSchema");
            }
        }
Beispiel #8
0
 private static void CreateSendEvent(
     RegressionEnvironment env,
     string typeName,
     string company,
     double value,
     double total)
 {
     IDictionary<string, object> map = new LinkedHashMap<string, object>();
     map.Put("company", company);
     map.Put("value", value);
     map.Put("total", total);
     if (EventRepresentationChoiceExtensions.GetEngineDefault(env.Configuration).IsObjectArrayEvent()) {
         env.SendEventObjectArray(map.Values.ToArray(), typeName);
     }
     else {
         env.SendEventMap(map, typeName);
     }
 }
 private static void SendWindow(
     RegressionEnvironment env,
     string col0,
     long col1,
     string col2)
 {
     var theEvent = new Dictionary<string, object>();
     theEvent.Put("col0", col0);
     theEvent.Put("col1", col1);
     theEvent.Put("col2", col2);
     if (EventRepresentationChoiceExtensions.GetEngineDefault(env.Configuration).IsObjectArrayEvent())
     {
         env.SendEventObjectArray(theEvent.Values.ToArray(), "WindowSchema");
     }
     else
     {
         env.SendEventMap(theEvent, "WindowSchema");
     }
 }
Beispiel #10
0
            public void Run(RegressionEnvironment env)
            {
                var compiled = env.CompileWBusPublicType("create schema OrderEvent(Price double)");
                env.Deploy(compiled);
                var path = new RegressionPath();
                path.Add(compiled);

                var epl = "@Name('All-Order-Events') @Audit('stream,property') select Price from OrderEvent";
                env.CompileDeploy(epl, path).AddListener("All-Order-Events");

                if (EventRepresentationChoiceExtensions.GetEngineDefault(env.Configuration).IsObjectArrayEvent()) {
                    env.SendEventObjectArray(new object[] {100d}, "OrderEvent");
                }
                else {
                    env.SendEventMap(Collections.SingletonDataMap("Price", 100d), "OrderEvent");
                }

                env.UndeployAll();
            }
Beispiel #11
0
        private void RunAssertionDocSample(EPServiceProvider epService)
        {
            EPStatement stmt = epService.EPAdministrator.CreateEPL("create schema OrderEvent(price double)");

            string epl      = "@Name('All-Order-Events') @Audit('stream,property') select price from OrderEvent";
            var    listener = new SupportUpdateListener();

            epService.EPAdministrator.CreateEPL(epl).Events += listener.Update;

            if (EventRepresentationChoiceExtensions.GetEngineDefault(epService).IsObjectArrayEvent())
            {
                epService.EPRuntime.SendEvent(new object[] { 100d }, "OrderEvent");
            }
            else
            {
                epService.EPRuntime.SendEvent(Collections.SingletonDataMap("price", 100d), "OrderEvent");
            }

            stmt.Dispose();
        }
Beispiel #12
0
        public void TestDocSample()
        {
            try {
                _epService.EPAdministrator.CreateEPL("create schema OrderEvent(price double)");

                var epl = "@Name('All-Order-Events') @Audit('stream,property') select price from OrderEvent";
                _epService.EPAdministrator.CreateEPL(epl).Events += _listener.Update;

                if (EventRepresentationChoiceExtensions.GetEngineDefault(_epService).IsObjectArrayEvent())
                {
                    _epService.EPRuntime.SendEvent(new Object[] { 100d }, "OrderEvent");
                }
                else
                {
                    _epService.EPRuntime.SendEvent(Collections.SingletonDataMap("price", 100d), "OrderEvent");
                }
            } catch (Exception e) {
                Console.WriteLine("Exception caught: {0}", e.GetType());
                throw;
            }
        }