mirror of https://github.com/abpframework/abp.git
9 changed files with 108 additions and 50 deletions
@ -1,23 +1,24 @@ |
|||||
using System; |
using System; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
namespace Volo.Abp.BackgroundJobs.DemoApp.RabbitMq; |
namespace Volo.Abp.BackgroundJobs.DemoApp.RabbitMq; |
||||
|
|
||||
class Program |
class Program |
||||
{ |
{ |
||||
static void Main(string[] args) |
async static Task Main(string[] args) |
||||
{ |
{ |
||||
using (var application = AbpApplicationFactory.Create<DemoAppRabbitMqModule>(options => |
using (var application = await AbpApplicationFactory.CreateAsync<DemoAppRabbitMqModule>(options => |
||||
{ |
{ |
||||
options.UseAutofac(); |
options.UseAutofac(); |
||||
})) |
})) |
||||
{ |
{ |
||||
application.Initialize(); |
await application.InitializeAsync(); |
||||
|
|
||||
Console.WriteLine("Started: " + typeof(Program).Namespace); |
Console.WriteLine("Started: " + typeof(Program).Namespace); |
||||
Console.WriteLine("Press ENTER to stop the application..!"); |
Console.WriteLine("Press ENTER to stop the application..!"); |
||||
Console.ReadLine(); |
Console.ReadLine(); |
||||
|
|
||||
application.Shutdown(); |
await application.ShutdownAsync(); |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,23 +1,23 @@ |
|||||
using System; |
using System; |
||||
|
using System.Threading.Tasks; |
||||
namespace Volo.Abp.BackgroundJobs.DemoApp; |
namespace Volo.Abp.BackgroundJobs.DemoApp; |
||||
|
|
||||
class Program |
class Program |
||||
{ |
{ |
||||
static void Main(string[] args) |
async static Task Main(string[] args) |
||||
{ |
{ |
||||
using (var application = AbpApplicationFactory.Create<DemoAppModule>(options => |
using (var application = await AbpApplicationFactory.CreateAsync<DemoAppModule>(options => |
||||
{ |
{ |
||||
options.UseAutofac(); |
options.UseAutofac(); |
||||
})) |
})) |
||||
{ |
{ |
||||
application.Initialize(); |
await application.InitializeAsync(); |
||||
|
|
||||
Console.WriteLine("Started: " + typeof(Program).Namespace); |
Console.WriteLine("Started: " + typeof(Program).Namespace); |
||||
Console.WriteLine("Press ENTER to stop the application..!"); |
Console.WriteLine("Press ENTER to stop the application..!"); |
||||
Console.ReadLine(); |
Console.ReadLine(); |
||||
|
|
||||
application.Shutdown(); |
await application.ShutdownAsync(); |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue