Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        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();
        }
Exemplo n.º 5
0
        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));
        }
Exemplo n.º 6
0
 public IntegrationTests()
 {
     _host = new HttpHost("http://localhost:8080");
     _host.Add(DefaultMethodBasedCommandFactory.GetCommandsFor(typeof(Controller)));
     _host.Open();
 }
Exemplo n.º 7
0
 public IntegrationTests()
 {
     _host = new HttpHost("http://localhost:8080");
     _host.Add(DefaultMethodBasedCommandFactory.GetCommandsFor(typeof(Controller)));
     _host.Open();
 }