示例#1
0
        static void Main(string[] args)
        {
            var config = new HttpServiceBusConfiguration(SecretCredentials.ServiceBusAddress)
            {
                IssuerName   = "owner",
                IssuerSecret = SecretCredentials.Secret
            };

            config.Routes.MapHttpRoute("default", "{controller}/{id}", new { id = RouteParameter.Optional });
            var server = new HttpServiceBusServer(config);

            server.OpenAsync().Wait();
            Console.WriteLine("Server is opened at {0}", config.Address);
            Console.ReadKey();
            server.CloseAsync().Wait();
        }
 public void TearDown()
 {
     _server.CloseAsync().Wait();
 }