Esempio 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();
 }
Esempio 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();
 }
Esempio 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();
        }
Esempio 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();
        }
Esempio n. 5
0
        /// <summary>
        /// This Operation is called, when the module shall initialize itself.
        /// </summary>
        /// <param name="typeRegistry">The type registry for service requests or registrations.</param>
        /// <inheritdoc/>
        public void Initialize(ITypeRegistry typeRegistry)
        {
            // initialize mapping
            var mappingService = typeRegistry.GetObject <IODataMappingService>();

            mappingService.InitializeMapping();

            // create and start host
            var config = WebApiInitializer.Configure(mappingService.GetODataRepository(), new ConsoleLogger());
            var host   = new HttpHost(config);

            typeRegistry.RegisterInstance <IHttpHost>(host);

            host.Open("http://local.facton.local");
        }
Esempio n. 6
0
 public IntegrationTests()
 {
     _host = new HttpHost("http://localhost:8080");
     _host.Add(DefaultMethodBasedCommandFactory.GetCommandsFor(typeof(Controller)));
     _host.Open();
 }
Esempio n. 7
0
 public IntegrationTests()
 {
     _host = new HttpHost("http://localhost:8080");
     _host.Add(DefaultMethodBasedCommandFactory.GetCommandsFor(typeof(Controller)));
     _host.Open();
 }