示例#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);
        }
示例#2
0
 public MvcConnectionHandler(TwinoMvc mvc, MvcAppBuilder app)
 {
     Mvc = mvc;
     App = app;
 }
示例#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()));
 }
示例#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)));
 }