Example #1
0
        public void TestAdd(int a, int b, int expected)
        {
            var helloworld = new Helloworld();
            var result     = helloworld.Add(a, b);

            Assert.Equal(expected, result);
        }
Example #2
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    Helloworld gen_ret = new Helloworld();
                    translator.Push(L, gen_ret);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to Helloworld constructor!"));
        }
Example #3
0
        static int _m_DOTest(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Helloworld gen_to_be_invoked = (Helloworld)translator.FastGetCSObj(L, 1);



                {
                    gen_to_be_invoked.DOTest(  );



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Example #4
0
        protected void Application_Start(object sender, EventArgs e)
        {
            var startupProperties = SimpleOwinAspNetHandler.GetStartupProperties();

            RouteTable.Routes.Add(new Route("helloworld", new SimpleOwinAspNetRouteHandler(Helloworld.OwinApp())));

            //RouteTable.Routes.Add(new Route("middlewareapps", new SimpleOwinAspNetRouteHandler(MiddlewareApps.OwinApp())));
            // SimpleOwinAspNetRouteHandler is capable of auto handling IEnumerable<Func<AppFunc,AppFunc>>
            RouteTable.Routes.Add(new Route("middlewareapps", new SimpleOwinAspNetRouteHandler(MiddlewareApps.OwinApps())));

#if !MONO
            RouteTable.Routes.Add(new Route("SimpleOwinApp/{*pathInfo}", new SimpleOwinAspNetRouteHandler(SimpleOwinApp.OwinApp(), "SimpleOwinApp")));

            RouteTable.Routes.Add(new Route("websocket/helloworld", new SimpleOwinAspNetRouteHandler(HelloWorldWebSocket.OwinApp())));
            RouteTable.Routes.Add(new Route("websocket/helloworld/autodetect", new SimpleOwinAspNetRouteHandler(HelloWorldWebSocketAutodetect.OwinApp())));
#endif
        }
Example #5
0
        public void TestMockWebPost()
        {
            var helloworld = new Helloworld();

            Assert.Equal("MockMessage1", helloworld.WebPost(mockWebHelper));
        }
Example #6
0
        public void TestWebPost()
        {
            var helloworld = new Helloworld();

            Assert.Equal("Impl", helloworld.WebPost(webHelper));
        }