Пример #1
0
        private static void EventSink_FeederStatesRequested()
        {
            var task = Task.Run(async() =>
            {
                var result = await FeederManager.GetFeederStates();
                var json   = JsonConvert.SerializeObject(result);

                ScriptRunner.Run(ScriptAction.ListFeederStatesReply, Utility.HtmlEncode(json));
            });
        }
Пример #2
0
        private static void EventSink_FeedersRequested()
        {
            var task = Task.Run(async() =>
            {
                using (SmdppEntities context = new SmdppEntities())
                {
                    var result = await FeederManager.GetFeederSlots();
                    var json   = JsonConvert.SerializeObject(result);

                    ScriptRunner.Run(ScriptAction.ListFeedersReply, Utility.HtmlEncode(json));
                }
            });
        }