static void Main(string[] args) { var host = new HttpHost("http://localhost:8080"); host.Add(new CommandBind(new VerySimpleCommand(), HttpMethod.Get, new UriTemplate("*"))); host.Open(); Console.WriteLine("Server is running, press any key to continue..."); Console.ReadKey(); host.Close(); }
static void Main(string[] args) { var host = new HttpHost("http://localhost:8080"); host.Add(DefaultMethodBasedCommandFactory.GetCommandsFor(typeof(Controller))); host.Open(); Console.WriteLine("Server is running, press any key to continue..."); Console.ReadKey(); host.Close(); }
static void Main(string[] args) { var host = new HttpHost("http://localhost:8080"); host.Add(DefaultMethodBasedCommandFactory.GetCommandsFor(typeof(ToDoController))); host.Open(); Console.WriteLine("Server is running, press any key to continue..."); Console.ReadKey(); host.Close(); }
public Task <ISendTransport> CreateSendTransport(Uri address, ReceiveEndpointContext receiveEndpointContext) { var clientContextSupervisor = new HttpClientContextSupervisor(receiveEndpointContext.ReceivePipe); var sendSettings = address.GetSendSettings(); var transport = new HttpSendTransport(clientContextSupervisor, sendSettings, receiveEndpointContext); _host.Add(transport); return(Task.FromResult <ISendTransport>(transport)); }
public IntegrationTests() { _host = new HttpHost("http://localhost:8080"); _host.Add(DefaultMethodBasedCommandFactory.GetCommandsFor(typeof(Controller))); _host.Open(); }