Exemplo n.º 1
0
        /// <summary>
        /// Uses HTTP Protocol and accepts HTTP connections with Twino MVC Architecture
        /// </summary>
        public static ITwinoServer UseMvc(this ITwinoServer server, TwinoMvc mvc, HttpOptions options)
        {
            MvcConnectionHandler handler  = new MvcConnectionHandler(mvc, mvc.AppBuilder);
            TwinoHttpProtocol    protocol = new TwinoHttpProtocol(server, handler, options);

            server.UseProtocol(protocol);
            return(server);
        }
Exemplo n.º 2
0
 public MvcConnectionHandler(TwinoMvc mvc, MvcAppBuilder app)
 {
     Mvc = mvc;
     App = app;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Uses HTTP Protocol and accepts HTTP connections with Twino MVC Architecture
 /// </summary>
 public static ITwinoServer UseMvc(this ITwinoServer server, TwinoMvc mvc)
 {
     return(UseMvc(server, mvc, HttpOptions.CreateDefault()));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Uses HTTP Protocol and accepts HTTP connections with Twino MVC Architecture
 /// </summary>
 public static ITwinoServer UseMvc(this ITwinoServer server, TwinoMvc mvc, string optionsFilename)
 {
     return(UseMvc(server, mvc, HttpOptions.Load(optionsFilename)));
 }