示例#1
0
 static void Main(string[] args)
 {
     ZeroApplication.CheckOption();
     ZeroApplication.Discove(typeof(Program).Assembly);
     ZeroApplication.Initialize();
     ZeroApplication.RunAwaite();
 }
示例#2
0
        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;

            Agebull.Common.Configuration.ConfigurationManager.SetConfiguration(configuration);
            ZeroApplication.CheckOption();
        }
示例#3
0
 public Startup(IConfiguration configuration)
 {
     Configuration = configuration;
     ZeroApplication.CheckOption();
     RouteOption.ConfigFileName = Path.Combine(ZeroApplication.Config.ConfigFolder, "route_config.json");
     RouteOption.CheckOption();
 }
示例#4
0
 static async Task Main(string[] args)
 {
     IocHelper.AddTransient <IMessageConsumer, KafkaConsumer>();
     ZeroApplication.CheckOption();
     ZeroApplication.Discove(typeof(Program).Assembly);
     MessageProducer.Initialize();
     ZeroApplication.Initialize();
     MessageProducer.Publish("test1", "api/test", "{}");
     await ZeroApplication.RunAwaiteAsync();
 }
示例#5
0
 public App()
 {
     WorkContext.SynchronousContext = new DispatcherSynchronousContext
     {
         Dispatcher = Dispatcher
     };
     Trace.Listeners.Add(new MessageTraceListener());
     ConfigurationManager.BasePath = Path.GetDirectoryName(typeof(App).Assembly.Location);
     ZeroApplication.CheckOption();
     ZeroApplication.Initialize();
 }
示例#6
0
 private static void Main(string[] args)
 {
     ZeroApplication.CheckOption();
     ZeroApplication.Initialize();
     ZeroApplication.RunAwaite();
 }