Example #1
0
        /// <summary>
        /// Uses HTTP Protocol and accepts HTTP connections with Horse MVC Architecture
        /// </summary>
        public static IHorseServer UseMvc(this IHorseServer server, HorseMvc mvc, HttpOptions options)
        {
            MvcConnectionHandler handler  = new MvcConnectionHandler(mvc, mvc.AppBuilder);
            HorseHttpProtocol    protocol = new HorseHttpProtocol(server, handler, options);

            server.UseProtocol(protocol);
            return(server);
        }
 public MvcConnectionHandler(HorseMvc mvc, MvcAppBuilder app)
 {
     Mvc = mvc;
     App = app;
 }
Example #3
0
 /// <summary>
 /// Uses HTTP Protocol and accepts HTTP connections with Horse MVC Architecture
 /// </summary>
 public static IHorseServer UseMvc(this IHorseServer server, HorseMvc mvc)
 {
     return(UseMvc(server, mvc, HttpOptions.CreateDefault()));
 }
Example #4
0
 /// <summary>
 /// Uses HTTP Protocol and accepts HTTP connections with Horse MVC Architecture
 /// </summary>
 public static IHorseServer UseMvc(this IHorseServer server, HorseMvc mvc, string optionsFilename)
 {
     return(UseMvc(server, mvc, HttpOptions.Load(optionsFilename)));
 }