예제 #1
0
        public void TestReceive()
        {
            IotApi api = new IotApi()
                         .RegisterPersistModule(new Dictionary <string, object>())
                         .RegisterModule(getDefaultModule(true));

            api.Open(new System.Collections.Generic.Dictionary <string, object>());

            var msg = api.ReceiveAsync().Result;
        }
예제 #2
0
        public void TestReceive()
        {
            IotApi api = new IotApi()
                         .RegisterPersist(new Dictionary <string, object>())
                         .RegisterModule(getDefaultModule(true));

            api.Open(new System.Collections.Generic.Dictionary <string, object>());

            api.ReceiveAsync(
                (msgs) =>
            {
            },
                (msgs, err) =>
            {
            }).Wait();
        }