Добавлены сервисы CalculationService, PrimitiveService, Common-сборка с типами

Необходимо реализовать в дальнейшем GetInnerPoints в PrimitiveService
This commit is contained in:
NickAppLab
2022-07-26 03:53:57 +05:00
parent 47dc9617c3
commit d9cb4fe3b8
41 changed files with 426 additions and 89 deletions

View File

@@ -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();
}
}
}
}