示例#1
0
        static void Main(string[] args)
        {
            var builder = new RestfulApplicationBuilder();



            builder.Build().StartAsync();

            Console.Read();
        }
示例#2
0
        static void Main(string[] args)
        {
            var builder = new RestfulApplicationBuilder();



            var app = builder.ConfigServer(serverConfig =>
            {
                serverConfig.Port = 10336;
            }).ConfigServiceProvider(serviceProvider =>
            {
                serviceProvider.AddSigleton(typeof(Test), new Test("robot-001"));
            }).ConfigRestfulService(manager =>
            {
                manager.Scan(Assembly.GetExecutingAssembly());
            }).Build();


            app.StartAsync();

            Console.Read();
        }