Exemplo n.º 1
0
 private static void BindRequestToProcessors()
 {
     RestServiceProcessor.Configure(x =>
     {
         x.Bind <Order, OrderServiceProcessor>();
         x.Bind <GetOrderById, OrderServiceProcessor>();
         x.Bind <DeleteOrderById, OrderServiceProcessor>();
         x.Bind <UpdateOrder, OrderServiceProcessor>();
     });
 }
Exemplo n.º 2
0
        private static void Main()
        {
            RestServiceProcessor.Configure(x =>
            {
                x.Bind <PresentRequest, PresentRequestProcessor>();
                x.Bind <PresentRequestQuery, PresentRequestProcessor>();
                x.Bind <UpdatePresentRequestStatus, PresentRequestProcessor>();
                x.Bind <DeletePresentRequestsByStatus, PresentRequestProcessor>();
            });

            using (var serviceHost = new WebServiceHost(typeof(JsonServicePerCall)))
            {
                serviceHost.Open();

                Console.WriteLine("Santa Clause Service has started");
                Console.ReadKey();

                serviceHost.Close();
            }
        }