Добавлены сервисы CalculationService, PrimitiveService, Common-сборка с типами
Необходимо реализовать в дальнейшем GetInnerPoints в PrimitiveService
This commit is contained in:
22
App.xaml.cs
22
App.xaml.cs
@@ -1,4 +1,7 @@
|
||||
using System.Windows;
|
||||
using Autofac;
|
||||
using StructureHelper.Services;
|
||||
using StructureHelper.Windows.MainWindow;
|
||||
|
||||
namespace StructureHelper
|
||||
{
|
||||
@@ -7,5 +10,24 @@ namespace StructureHelper
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
public static IContainer Container { get; private set; }
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
var builder = new ContainerBuilder();
|
||||
builder.RegisterType<PrimitiveRepository>().As<IPrimitiveRepository>();
|
||||
builder.RegisterType<PrimitiveService>().As<IPrimitiveService>();
|
||||
builder.RegisterType<MainModel>().AsSelf();
|
||||
builder.RegisterType<MainViewModel>().AsSelf();
|
||||
|
||||
builder.RegisterType<MainView>().AsSelf();
|
||||
|
||||
Container = builder.Build();
|
||||
|
||||
using (var scope = Container.BeginLifetimeScope())
|
||||
{
|
||||
var window = scope.Resolve<MainView>();
|
||||
window.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user