mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-18 17:48:01 +08:00
RU
This commit is contained in:
@@ -9,12 +9,13 @@
|
||||
// File: AuthenService.cs
|
||||
// ***********************************************************************
|
||||
|
||||
using OpenAuth.Domain.Interface;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenAuth.Domain;
|
||||
using OpenAuth.Domain.Interface;
|
||||
|
||||
namespace OpenAuth.Domain.Service
|
||||
namespace OpenAuth.App
|
||||
{
|
||||
/// <summary>
|
||||
/// 领域服务
|
||||
|
@@ -3,7 +3,6 @@ using Infrastructure;
|
||||
using OpenAuth.App.ViewModel;
|
||||
using OpenAuth.Domain;
|
||||
using OpenAuth.Domain.Interface;
|
||||
using OpenAuth.Domain.Service;
|
||||
|
||||
namespace OpenAuth.App
|
||||
{
|
||||
|
@@ -1,7 +1,6 @@
|
||||
using OpenAuth.Domain;
|
||||
using System.Collections.Generic;
|
||||
using OpenAuth.Domain.Interface;
|
||||
using OpenAuth.Domain.Service;
|
||||
|
||||
namespace OpenAuth.App
|
||||
{
|
||||
|
@@ -9,12 +9,10 @@
|
||||
// File: AuthenService.cs
|
||||
// ***********************************************************************
|
||||
|
||||
using OpenAuth.Domain.Interface;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenAuth.Domain;
|
||||
|
||||
namespace OpenAuth.Domain.Service
|
||||
namespace OpenAuth.App
|
||||
{
|
||||
/// <summary>
|
||||
/// 领域服务
|
||||
|
@@ -8,7 +8,6 @@ using OpenAuth.App;
|
||||
using OpenAuth.App.SSO;
|
||||
using OpenAuth.App.ViewModel;
|
||||
using OpenAuth.Domain;
|
||||
using OpenAuth.Domain.Service;
|
||||
using OpenAuth.Mvc.Controllers;
|
||||
|
||||
namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
|
@@ -1,11 +1,9 @@
|
||||
using System.Reflection;
|
||||
using System.Web.Mvc;
|
||||
using Autofac;
|
||||
using Autofac.Configuration;
|
||||
using Autofac.Integration.Mvc;
|
||||
using OpenAuth.App;
|
||||
using OpenAuth.Domain.Interface;
|
||||
using OpenAuth.Domain.Service;
|
||||
using OpenAuth.Repository;
|
||||
|
||||
namespace OpenAuth.UnitTest
|
||||
|
@@ -1,11 +1,8 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using Infrastructure;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using OpenAuth.App;
|
||||
using OpenAuth.Domain.Service;
|
||||
using OpenAuth.Repository;
|
||||
|
||||
namespace OpenAuth.UnitTest
|
||||
{
|
||||
|
@@ -19,7 +19,6 @@ using Autofac.Configuration;
|
||||
using Autofac.Integration.Mvc;
|
||||
using OpenAuth.App;
|
||||
using OpenAuth.Domain.Interface;
|
||||
using OpenAuth.Domain.Service;
|
||||
using OpenAuth.Repository;
|
||||
|
||||
namespace OpenAuth.WebApi
|
||||
@@ -31,18 +30,12 @@ namespace OpenAuth.WebApi
|
||||
var builder = new ContainerBuilder();
|
||||
|
||||
//注册数据库基础操作和工作单元
|
||||
builder.RegisterGeneric(typeof(BaseRepository<>)).As(typeof(IRepository<>));
|
||||
builder.RegisterType(typeof (UnitWork)).As(typeof (IUnitWork));
|
||||
|
||||
//注册WebConfig中的配置
|
||||
builder.RegisterModule(new ConfigurationSettingsReader("autofac"));
|
||||
builder.RegisterGeneric(typeof(BaseRepository<>)).As(typeof(IRepository<>)).PropertiesAutowired();
|
||||
builder.RegisterType(typeof (UnitWork)).As(typeof (IUnitWork)).PropertiesAutowired();
|
||||
|
||||
//注册app层
|
||||
builder.RegisterAssemblyTypes(Assembly.GetAssembly(typeof (AuthorizeApp)));
|
||||
builder.RegisterAssemblyTypes(Assembly.GetAssembly(typeof (AuthorizeApp))).PropertiesAutowired();
|
||||
|
||||
//注册领域服务
|
||||
builder.RegisterAssemblyTypes(Assembly.GetAssembly(typeof(AuthoriseService)))
|
||||
.Where(u =>u.Namespace== "OpenAuth.Domain.Service");
|
||||
|
||||
// OPTIONAL: Register model binders that require DI.
|
||||
builder.RegisterModelBinders(Assembly.GetExecutingAssembly());
|
||||
|
Reference in New Issue
Block a user