| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- using System;
- using Abp;
- using Abp.Castle.Logging.Log4Net;
- using Abp.Collections.Extensions;
- using Abp.Dependency;
- using Castle.Facilities.Logging;
- namespace WePlatform
- {
- public class Program
- {
- private static bool _skipConnVerification = true;
- public static void Main(string[] args)
- {
- ParseArgs(args);
- using (var bootstrapper = AbpBootstrapper.Create<WePlatformMigratorModule>())
- {
- bootstrapper.IocManager.IocContainer
- .AddFacility<LoggingFacility>(f => f.UseAbpLog4Net()
- .WithConfig("log4net.config")
- );
- bootstrapper.Initialize();
- using (var migrateExecuter = bootstrapper.IocManager.ResolveAsDisposable<MultiTenantMigrateExecuter>())
- {
- migrateExecuter.Object.Run(_skipConnVerification);
- }
- Console.WriteLine("Press ENTER to exit...");
- Console.ReadLine();
- }
- }
- private static void ParseArgs(string[] args)
- {
- if (args.IsNullOrEmpty())
- {
- return;
- }
- for (int i = 0; i < args.Length; i++)
- {
- var arg = args[i];
- switch (arg)
- {
- case "-s":
- _skipConnVerification = true;
- break;
- }
- }
- }
- }
- }
|