mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-08-23 13:06:48 +08:00
统一注入代码
This commit is contained in:
parent
38cb16d9e7
commit
89d646bb04
@ -12,15 +12,17 @@
|
|||||||
// <summary>IOC扩展</summary>
|
// <summary>IOC扩展</summary>
|
||||||
// ***********************************************************************
|
// ***********************************************************************
|
||||||
|
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Web.Http;
|
||||||
|
using System.Web.Mvc;
|
||||||
using Autofac;
|
using Autofac;
|
||||||
using Autofac.Integration.Mvc;
|
using Autofac.Integration.Mvc;
|
||||||
using OpenAuth.App;
|
using Autofac.Integration.WebApi;
|
||||||
using System.Reflection;
|
|
||||||
using System.Web.Mvc;
|
|
||||||
using OpenAuth.Repository;
|
using OpenAuth.Repository;
|
||||||
using OpenAuth.Repository.Interface;
|
using OpenAuth.Repository.Interface;
|
||||||
|
using IContainer = Autofac.IContainer;
|
||||||
|
|
||||||
namespace OpenAuth.Mvc
|
namespace OpenAuth.App
|
||||||
{
|
{
|
||||||
public static class AutofacExt
|
public static class AutofacExt
|
||||||
{
|
{
|
||||||
@ -35,12 +37,15 @@ namespace OpenAuth.Mvc
|
|||||||
builder.RegisterType(typeof(UnitWork)).As(typeof(IUnitWork)).PropertiesAutowired();
|
builder.RegisterType(typeof(UnitWork)).As(typeof(IUnitWork)).PropertiesAutowired();
|
||||||
|
|
||||||
//注册app层
|
//注册app层
|
||||||
builder.RegisterAssemblyTypes(Assembly.GetAssembly(typeof (UserManagerApp))).PropertiesAutowired();
|
builder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly()).PropertiesAutowired();
|
||||||
|
|
||||||
// 注册controller,使用属性注入
|
// 注册controller,使用属性注入
|
||||||
builder.RegisterControllers(Assembly.GetExecutingAssembly()).PropertiesAutowired();
|
builder.RegisterControllers(Assembly.GetCallingAssembly()).PropertiesAutowired();
|
||||||
|
|
||||||
builder.RegisterModelBinders(Assembly.GetExecutingAssembly());
|
//注册所有的ApiControllers
|
||||||
|
builder.RegisterApiControllers(Assembly.GetCallingAssembly()).PropertiesAutowired();
|
||||||
|
|
||||||
|
builder.RegisterModelBinders(Assembly.GetCallingAssembly());
|
||||||
builder.RegisterModelBinderProvider();
|
builder.RegisterModelBinderProvider();
|
||||||
|
|
||||||
// OPTIONAL: Register web abstractions like HttpContextBase.
|
// OPTIONAL: Register web abstractions like HttpContextBase.
|
||||||
@ -54,7 +59,12 @@ namespace OpenAuth.Mvc
|
|||||||
|
|
||||||
// Set the dependency resolver to be Autofac.
|
// Set the dependency resolver to be Autofac.
|
||||||
_container = builder.Build();
|
_container = builder.Build();
|
||||||
|
|
||||||
|
//Set the MVC DependencyResolver
|
||||||
DependencyResolver.SetResolver(new AutofacDependencyResolver(_container));
|
DependencyResolver.SetResolver(new AutofacDependencyResolver(_container));
|
||||||
|
|
||||||
|
//Set the WebApi DependencyResolver
|
||||||
|
GlobalConfiguration.Configuration.DependencyResolver = new AutofacWebApiDependencyResolver((IContainer)_container);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
@ -33,6 +33,18 @@
|
|||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Autofac.Integration.Mvc, Version=3.3.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Autofac.Mvc5.3.3.4\lib\net45\Autofac.Integration.Mvc.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Autofac.Integration.WebApi, Version=3.4.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Autofac.WebApi2.3.4.0\lib\net45\Autofac.Integration.WebApi.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
@ -41,18 +53,27 @@
|
|||||||
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="OptimaJet.Workflow.Core, Version=1.5.5.0, Culture=neutral, PublicKeyToken=3d29392dccd464d7, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\WorkflowEngine.NET-Core.1.5.5.2\lib\net45\OptimaJet.Workflow.Core.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Web.Http.WebHost, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
@ -81,6 +102,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AuthoriseService.cs" />
|
<Compile Include="AuthoriseService.cs" />
|
||||||
|
<Compile Include="AutofacExt.cs" />
|
||||||
<Compile Include="BaseApp.cs" />
|
<Compile Include="BaseApp.cs" />
|
||||||
<Compile Include="AuthorizeApp.cs" />
|
<Compile Include="AuthorizeApp.cs" />
|
||||||
<Compile Include="CategoryApp.cs" />
|
<Compile Include="CategoryApp.cs" />
|
||||||
@ -111,7 +133,6 @@
|
|||||||
<Compile Include="UserManagerApp.cs" />
|
<Compile Include="UserManagerApp.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="OrgManagerApp.cs" />
|
<Compile Include="OrgManagerApp.cs" />
|
||||||
<Compile Include="Response\CommandModel.cs" />
|
|
||||||
<Compile Include="Response\UserWithAccessedCtrls.cs" />
|
<Compile Include="Response\UserWithAccessedCtrls.cs" />
|
||||||
<Compile Include="Response\ModuleElementVM.cs" />
|
<Compile Include="Response\ModuleElementVM.cs" />
|
||||||
<Compile Include="Response\ModuleView.cs" />
|
<Compile Include="Response\ModuleView.cs" />
|
||||||
|
@ -7,39 +7,41 @@ using OpenAuth.Repository.Interface;
|
|||||||
|
|
||||||
namespace OpenAuth.App
|
namespace OpenAuth.App
|
||||||
{
|
{
|
||||||
public class OrgManagerApp
|
public class OrgManagerApp : BaseApp<Org>
|
||||||
{
|
{
|
||||||
public IUnitWork _unitWork { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 添加部门
|
/// 添加部门
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="org">The org.</param>
|
/// <param name="org">The org.</param>
|
||||||
/// <returns>System.Int32.</returns>
|
/// <returns>System.Int32.</returns>
|
||||||
/// <exception cref="System.Exception">未能找到该组织的父节点信息</exception>
|
/// <exception cref="System.Exception">未能找到该组织的父节点信息</exception>
|
||||||
public string AddOrUpdate(Org org)
|
public string Add(Org org)
|
||||||
{
|
{
|
||||||
ChangeModuleCascade(org);
|
ChangeModuleCascade(org);
|
||||||
if (org.Id == string.Empty)
|
|
||||||
{
|
|
||||||
_unitWork.Add(org);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//获取旧的的CascadeId
|
|
||||||
var CascadeId = _unitWork.FindSingle<Org>(o => o.Id == org.Id).CascadeId;
|
|
||||||
//根据CascadeId查询子部门
|
|
||||||
var orgs = _unitWork.Find<Org>(u => u.CascadeId.Contains(CascadeId) && u.Id != org.Id).OrderBy(u => u.CascadeId).ToList();
|
|
||||||
|
|
||||||
//更新操作
|
Repository.Add(org);
|
||||||
_unitWork.Update(org);
|
|
||||||
|
|
||||||
//更新子部门的CascadeId
|
return org.Id;
|
||||||
foreach (var a in orgs)
|
}
|
||||||
{
|
|
||||||
ChangeModuleCascade(a);
|
public string Update(Org org)
|
||||||
_unitWork.Update(a);
|
{
|
||||||
}
|
ChangeModuleCascade(org);
|
||||||
|
|
||||||
|
//获取旧的的CascadeId
|
||||||
|
var cascadeId = Repository.FindSingle(o => o.Id == org.Id).CascadeId;
|
||||||
|
//根据CascadeId查询子部门
|
||||||
|
var orgs = Repository.Find(u => u.CascadeId.Contains(cascadeId) && u.Id != org.Id)
|
||||||
|
.OrderBy(u => u.CascadeId).ToList();
|
||||||
|
|
||||||
|
//更新操作
|
||||||
|
UnitWork.Update(org);
|
||||||
|
|
||||||
|
//更新子部门的CascadeId
|
||||||
|
foreach (var a in orgs)
|
||||||
|
{
|
||||||
|
ChangeModuleCascade(a);
|
||||||
|
UnitWork.Update(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
return org.Id;
|
return org.Id;
|
||||||
@ -50,10 +52,10 @@ namespace OpenAuth.App
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void DelOrg(string[] ids)
|
public void DelOrg(string[] ids)
|
||||||
{
|
{
|
||||||
var delOrg = _unitWork.Find<Org>(u => ids.Contains(u.Id)).ToList();
|
var delOrg = Repository.Find(u => ids.Contains(u.Id)).ToList();
|
||||||
foreach (var org in delOrg)
|
foreach (var org in delOrg)
|
||||||
{
|
{
|
||||||
_unitWork.Delete<Org>(u => u.CascadeId.Contains(org.CascadeId));
|
Repository.Delete(u => u.CascadeId.Contains(org.CascadeId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,17 +69,17 @@ namespace OpenAuth.App
|
|||||||
{
|
{
|
||||||
//用户角色
|
//用户角色
|
||||||
var userRoleIds =
|
var userRoleIds =
|
||||||
_unitWork.Find<Relevance>(u => u.FirstId == userId && u.Key == "UserRole").Select(u => u.SecondId).ToList();
|
UnitWork.Find<Relevance>(u => u.FirstId == userId && u.Key == "UserRole").Select(u => u.SecondId).ToList();
|
||||||
|
|
||||||
//用户角色与自己分配到的角色ID
|
//用户角色与自己分配到的角色ID
|
||||||
var moduleIds =
|
var moduleIds =
|
||||||
_unitWork.Find<Relevance>(
|
UnitWork.Find<Relevance>(
|
||||||
u =>
|
u =>
|
||||||
(u.FirstId == userId && u.Key == "UserOrg") ||
|
(u.FirstId == userId && u.Key == "UserOrg") ||
|
||||||
(u.Key == "RoleOrg" && userRoleIds.Contains(u.FirstId))).Select(u => u.SecondId).ToList();
|
(u.Key == "RoleOrg" && userRoleIds.Contains(u.FirstId))).Select(u => u.SecondId).ToList();
|
||||||
|
|
||||||
if (!moduleIds.Any()) return new List<Org>();
|
if (!moduleIds.Any()) return new List<Org>();
|
||||||
return _unitWork.Find<Org>(u => moduleIds.Contains(u.Id)).ToList();
|
return UnitWork.Find<Org>(u => moduleIds.Contains(u.Id)).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -87,11 +89,11 @@ namespace OpenAuth.App
|
|||||||
public List<Org> LoadForRole(string roleId)
|
public List<Org> LoadForRole(string roleId)
|
||||||
{
|
{
|
||||||
var moduleIds =
|
var moduleIds =
|
||||||
_unitWork.Find<Relevance>(u => u.FirstId == roleId && u.Key == "RoleOrg")
|
UnitWork.Find<Relevance>(u => u.FirstId == roleId && u.Key == "RoleOrg")
|
||||||
.Select(u => u.SecondId)
|
.Select(u => u.SecondId)
|
||||||
.ToList();
|
.ToList();
|
||||||
if (!moduleIds.Any()) return new List<Org>();
|
if (!moduleIds.Any()) return new List<Org>();
|
||||||
return _unitWork.Find<Org>(u => moduleIds.Contains(u.Id)).ToList();
|
return UnitWork.Find<Org>(u => moduleIds.Contains(u.Id)).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -114,13 +116,13 @@ namespace OpenAuth.App
|
|||||||
string cascadeId = "0.";
|
string cascadeId = "0.";
|
||||||
if (!string.IsNullOrEmpty(orgId))
|
if (!string.IsNullOrEmpty(orgId))
|
||||||
{
|
{
|
||||||
var org = _unitWork.FindSingle<Org>(u => u.Id == orgId);
|
var org = UnitWork.FindSingle<Org>(u => u.Id == orgId);
|
||||||
if (org == null)
|
if (org == null)
|
||||||
throw new Exception("未能找到指定对象信息");
|
throw new Exception("未能找到指定对象信息");
|
||||||
cascadeId = org.CascadeId;
|
cascadeId = org.CascadeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _unitWork.Find<Org>(u => u.CascadeId.Contains(cascadeId));
|
return UnitWork.Find<Org>(u => u.CascadeId.Contains(cascadeId));
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 私有方法
|
#region 私有方法
|
||||||
@ -130,19 +132,19 @@ namespace OpenAuth.App
|
|||||||
{
|
{
|
||||||
string cascadeId;
|
string cascadeId;
|
||||||
int currentCascadeId = 1; //当前结点的级联节点最后一位
|
int currentCascadeId = 1; //当前结点的级联节点最后一位
|
||||||
var sameLevels = _unitWork.Find<Org>(o => o.ParentId == org.ParentId && o.Id != org.Id);
|
var sameLevels = UnitWork.Find<Org>(o => o.ParentId == org.ParentId && o.Id != org.Id);
|
||||||
foreach (var obj in sameLevels)
|
foreach (var obj in sameLevels)
|
||||||
{
|
{
|
||||||
int objCascadeId = int.Parse(obj.CascadeId.TrimEnd('.').Split('.').Last());
|
int objCascadeId = int.Parse(obj.CascadeId.TrimEnd('.').Split('.').Last());
|
||||||
if (currentCascadeId <= objCascadeId) currentCascadeId = objCascadeId + 1;
|
if (currentCascadeId <= objCascadeId) currentCascadeId = objCascadeId + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (org.ParentId != null && org.ParentId != string.Empty)
|
if (!string.IsNullOrEmpty(org.ParentId))
|
||||||
{
|
{
|
||||||
var parentOrg = _unitWork.FindSingle<Org>(o => o.Id == org.ParentId);
|
var parentOrg = UnitWork.FindSingle<Org>(o => o.Id == org.ParentId);
|
||||||
if (parentOrg != null)
|
if (parentOrg != null)
|
||||||
{
|
{
|
||||||
cascadeId = parentOrg.CascadeId + currentCascadeId+".";
|
cascadeId = parentOrg.CascadeId + currentCascadeId + ".";
|
||||||
org.ParentName = parentOrg.Name;
|
org.ParentName = parentOrg.Name;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -152,7 +154,7 @@ namespace OpenAuth.App
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cascadeId = ".0." + currentCascadeId+".";
|
cascadeId = ".0." + currentCascadeId + ".";
|
||||||
org.ParentName = "根节点";
|
org.ParentName = "根节点";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
// ***********************************************************************
|
|
||||||
// Assembly : OpenAuth.App
|
|
||||||
// Author : yubaolee
|
|
||||||
// Created : 09-05-2016
|
|
||||||
//
|
|
||||||
// Last Modified By : yubaolee
|
|
||||||
// Last Modified On : 09-05-2016
|
|
||||||
// Contact : Microsoft
|
|
||||||
// File: CommandModel.cs
|
|
||||||
// ***********************************************************************
|
|
||||||
|
|
||||||
using OptimaJet.Workflow.Core.Model;
|
|
||||||
|
|
||||||
namespace OpenAuth.App.Response
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// workflow命令
|
|
||||||
/// </summary>
|
|
||||||
public class CommandModel
|
|
||||||
{
|
|
||||||
public string Key { get; set; }
|
|
||||||
public string Value { get; set; }
|
|
||||||
public TransitionClassifier Classifier { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
|
<package id="Autofac" version="3.5.2" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
|
<package id="Autofac.Mvc5" version="3.3.4" targetFramework="net45" />
|
||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" />
|
<package id="Autofac.WebApi2" version="3.4.0" targetFramework="net45" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
|
||||||
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
|
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
|
||||||
<package id="WorkflowEngine.NET-Core" version="1.5.5.2" targetFramework="net45" />
|
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
||||||
|
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
@ -40,11 +40,11 @@ namespace OpenAuth.Mvc.Controllers
|
|||||||
|
|
||||||
//添加组织提交
|
//添加组织提交
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public string AddOrUpdate(Org org)
|
public string Add(Org org)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
OrgApp.AddOrUpdate(org);
|
OrgApp.Add(org);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@ -53,7 +53,23 @@ namespace OpenAuth.Mvc.Controllers
|
|||||||
}
|
}
|
||||||
return JsonHelper.Instance.Serialize(Result);
|
return JsonHelper.Instance.Serialize(Result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//编辑
|
||||||
|
[HttpPost]
|
||||||
|
public string Update(Org org)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
OrgApp.Update(org);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Result.Code = 500;
|
||||||
|
Result.Message = ex.Message;
|
||||||
|
}
|
||||||
|
return JsonHelper.Instance.Serialize(Result);
|
||||||
|
}
|
||||||
|
|
||||||
public string LoadChildren(string id)
|
public string LoadChildren(string id)
|
||||||
{
|
{
|
||||||
return JsonHelper.Instance.Serialize(OrgApp.LoadAllChildren(id));
|
return JsonHelper.Instance.Serialize(OrgApp.LoadAllChildren(id));
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
using System;
|
using System.Web;
|
||||||
using System.Web;
|
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using System.Web.Optimization;
|
using System.Web.Optimization;
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
using Infrastructure;
|
using Infrastructure;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using OpenAuth.Mvc.Controllers;
|
using OpenAuth.App;
|
||||||
using OpenAuth.Mvc.Models;
|
using OpenAuth.Mvc.Models;
|
||||||
|
|
||||||
namespace OpenAuth.Mvc
|
namespace OpenAuth.Mvc
|
||||||
|
@ -146,7 +146,6 @@
|
|||||||
<Compile Include="Areas\FlowManage\Controllers\FormDesignController.cs" />
|
<Compile Include="Areas\FlowManage\Controllers\FormDesignController.cs" />
|
||||||
<Compile Include="Areas\FlowManage\Controllers\FlowDesignController.cs" />
|
<Compile Include="Areas\FlowManage\Controllers\FlowDesignController.cs" />
|
||||||
<Compile Include="Areas\FlowManage\FlowManageAreaRegistration.cs" />
|
<Compile Include="Areas\FlowManage\FlowManageAreaRegistration.cs" />
|
||||||
<Compile Include="AutofacExt.cs" />
|
|
||||||
<Compile Include="Controllers\BaseController.cs" />
|
<Compile Include="Controllers\BaseController.cs" />
|
||||||
<Compile Include="Controllers\CategoriesController.cs" />
|
<Compile Include="Controllers\CategoriesController.cs" />
|
||||||
<Compile Include="Controllers\ErrorController.cs" />
|
<Compile Include="Controllers\ErrorController.cs" />
|
||||||
@ -373,7 +372,6 @@
|
|||||||
<Content Include="Views\Categories\Index.cshtml" />
|
<Content Include="Views\Categories\Index.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="App_Data\" />
|
|
||||||
<Folder Include="Areas\FlowManage\Models\" />
|
<Folder Include="Areas\FlowManage\Models\" />
|
||||||
<Folder Include="Areas\FlowManage\Views\Shared\" />
|
<Folder Include="Areas\FlowManage\Views\Shared\" />
|
||||||
<Folder Include="Views\Base\" />
|
<Folder Include="Views\Base\" />
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
<sessionState mode="InProc" timeout="60" />
|
<sessionState mode="InProc" timeout="60" />
|
||||||
</system.web>
|
</system.web>
|
||||||
<system.webServer>
|
<system.webServer>
|
||||||
<modules runAllManagedModulesForAllRequests="true" >
|
<modules runAllManagedModulesForAllRequests="true">
|
||||||
<remove name="FormsAuthenticationModule" />
|
<remove name="FormsAuthenticationModule" />
|
||||||
</modules>
|
</modules>
|
||||||
<handlers>
|
<handlers>
|
||||||
@ -103,6 +103,14 @@
|
|||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<entityFramework>
|
<entityFramework>
|
||||||
|
@ -72,6 +72,14 @@
|
|||||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
|
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
using System.Reflection;
|
|
||||||
using System.Web.Mvc;
|
|
||||||
using Autofac;
|
|
||||||
using Autofac.Integration.Mvc;
|
|
||||||
using OpenAuth.App;
|
|
||||||
using OpenAuth.Repository;
|
|
||||||
using OpenAuth.Repository.Interface;
|
|
||||||
|
|
||||||
namespace OpenAuth.UnitTest
|
|
||||||
{
|
|
||||||
public class AutofacExt
|
|
||||||
{
|
|
||||||
private static IContainer _container;
|
|
||||||
|
|
||||||
public static void InitDI()
|
|
||||||
{
|
|
||||||
var builder = new ContainerBuilder();
|
|
||||||
|
|
||||||
//注册数据库基础操作和工作单元
|
|
||||||
builder.RegisterGeneric(typeof(BaseRepository<>)).As(typeof(IRepository<>)).PropertiesAutowired();
|
|
||||||
builder.RegisterType(typeof(UnitWork)).As(typeof(IUnitWork)).PropertiesAutowired();
|
|
||||||
|
|
||||||
//注册app层
|
|
||||||
builder.RegisterAssemblyTypes(Assembly.GetAssembly(typeof(UserManagerApp))).PropertiesAutowired();
|
|
||||||
|
|
||||||
_container = builder.Build();
|
|
||||||
DependencyResolver.SetResolver(new AutofacDependencyResolver(_container));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static T GetFromFac<T>()
|
|
||||||
{
|
|
||||||
return _container.Resolve<T>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -118,7 +118,6 @@
|
|||||||
</Otherwise>
|
</Otherwise>
|
||||||
</Choose>
|
</Choose>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AutofacExt.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="TestBase.cs" />
|
<Compile Include="TestBase.cs" />
|
||||||
<Compile Include="TestFunction.cs" />
|
<Compile Include="TestFunction.cs" />
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
namespace OpenAuth.UnitTest
|
using OpenAuth.App;
|
||||||
|
|
||||||
|
namespace OpenAuth.UnitTest
|
||||||
{
|
{
|
||||||
public class TestBase
|
public class TestBase
|
||||||
{
|
{
|
||||||
public TestBase()
|
public TestBase()
|
||||||
{
|
{
|
||||||
AutofacExt.InitDI();
|
AutofacExt.InitAutofac();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -25,7 +25,7 @@ namespace OpenAuth.UnitTest
|
|||||||
{
|
{
|
||||||
var random = new Random();
|
var random = new Random();
|
||||||
int val = random.Next();
|
int val = random.Next();
|
||||||
_app.AddOrUpdate(new Org
|
_app.Add(new Org
|
||||||
{
|
{
|
||||||
Id = string.Empty,
|
Id = string.Empty,
|
||||||
Name = "test" + val,
|
Name = "test" + val,
|
||||||
|
@ -1,73 +0,0 @@
|
|||||||
// ***********************************************************************
|
|
||||||
// Assembly : OpenAuth.Mvc
|
|
||||||
// Author : yubaolee
|
|
||||||
// Created : 10-26-2015
|
|
||||||
//
|
|
||||||
// Last Modified By : yubaolee
|
|
||||||
// Last Modified On : 10-26-2015
|
|
||||||
// ***********************************************************************
|
|
||||||
// <copyright file="AutofacExt.cs" company="www.cnblogs.com/yubaolee">
|
|
||||||
// Copyright (c) www.cnblogs.com/yubaolee. All rights reserved.
|
|
||||||
// </copyright>
|
|
||||||
// <summary>IOC扩展</summary>
|
|
||||||
// ***********************************************************************
|
|
||||||
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Web.Http;
|
|
||||||
using System.Web.Mvc;
|
|
||||||
using Autofac;
|
|
||||||
using Autofac.Integration.Mvc;
|
|
||||||
using Autofac.Integration.WebApi;
|
|
||||||
using OpenAuth.App;
|
|
||||||
using OpenAuth.Repository;
|
|
||||||
using OpenAuth.Repository.Interface;
|
|
||||||
|
|
||||||
namespace OpenAuth.WebApi
|
|
||||||
{
|
|
||||||
internal static class AutofacExt
|
|
||||||
{
|
|
||||||
public static void InitAutofac()
|
|
||||||
{
|
|
||||||
var builder = new ContainerBuilder();
|
|
||||||
|
|
||||||
//注册数据库基础操作和工作单元
|
|
||||||
builder.RegisterGeneric(typeof(BaseRepository<>)).As(typeof(IRepository<>)).PropertiesAutowired();
|
|
||||||
builder.RegisterType(typeof (UnitWork)).As(typeof (IUnitWork)).PropertiesAutowired();
|
|
||||||
|
|
||||||
//注册app层
|
|
||||||
builder.RegisterAssemblyTypes(Assembly.GetAssembly(typeof (AuthorizeApp))).PropertiesAutowired();
|
|
||||||
|
|
||||||
|
|
||||||
// OPTIONAL: Register model binders that require DI.
|
|
||||||
builder.RegisterModelBinders(Assembly.GetExecutingAssembly());
|
|
||||||
builder.RegisterModelBinderProvider();
|
|
||||||
|
|
||||||
// OPTIONAL: Register web abstractions like HttpContextBase.
|
|
||||||
builder.RegisterModule<AutofacWebTypesModule>();
|
|
||||||
|
|
||||||
// OPTIONAL: Enable property injection in view pages.
|
|
||||||
builder.RegisterSource(new ViewRegistrationSource());
|
|
||||||
|
|
||||||
// OPTIONAL: Enable property injection into action filters.
|
|
||||||
builder.RegisterFilterProvider();
|
|
||||||
|
|
||||||
//注册所有的ApiControllers
|
|
||||||
builder.RegisterApiControllers(Assembly.GetExecutingAssembly()).PropertiesAutowired();
|
|
||||||
|
|
||||||
var container = builder.Build();
|
|
||||||
HttpConfiguration config = GlobalConfiguration.Configuration;
|
|
||||||
//注册api容器需要使用HttpConfiguration对象
|
|
||||||
config.DependencyResolver = new AutofacWebApiDependencyResolver(container);
|
|
||||||
DependencyResolver.SetResolver(new AutofacDependencyResolver(container));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 从容器中获取对象
|
|
||||||
/// </summary>
|
|
||||||
/// <typeparam name="T"></typeparam>
|
|
||||||
public static T GetFromFac<T>()
|
|
||||||
{
|
|
||||||
return (T)DependencyResolver.Current.GetService(typeof(T));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +1,7 @@
|
|||||||
using System;
|
using System.Web.Http;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Http;
|
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using System.Web.Optimization;
|
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
|
using OpenAuth.App;
|
||||||
|
|
||||||
namespace OpenAuth.WebApi
|
namespace OpenAuth.WebApi
|
||||||
{
|
{
|
||||||
|
@ -178,7 +178,6 @@
|
|||||||
<Compile Include="Areas\SSO\Controllers\LoginController.cs" />
|
<Compile Include="Areas\SSO\Controllers\LoginController.cs" />
|
||||||
<Compile Include="Areas\SSO\Controllers\CheckController.cs" />
|
<Compile Include="Areas\SSO\Controllers\CheckController.cs" />
|
||||||
<Compile Include="Areas\SSO\SSOAreaRegistration.cs" />
|
<Compile Include="Areas\SSO\SSOAreaRegistration.cs" />
|
||||||
<Compile Include="AutofacExt.cs" />
|
|
||||||
<Compile Include="Global.asax.cs">
|
<Compile Include="Global.asax.cs">
|
||||||
<DependentUpon>Global.asax</DependentUpon>
|
<DependentUpon>Global.asax</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -1,62 +1,74 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
有关如何配置 ASP.NET 应用程序的详细信息,请访问
|
有关如何配置 ASP.NET 应用程序的详细信息,请访问
|
||||||
http://go.microsoft.com/fwlink/?LinkId=301880
|
http://go.microsoft.com/fwlink/?LinkId=301880
|
||||||
-->
|
-->
|
||||||
<configuration>
|
<configuration>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="webpages:Version" value="3.0.0.0" />
|
<add key="webpages:Version" value="3.0.0.0" />
|
||||||
<add key="webpages:Enabled" value="false" />
|
<add key="webpages:Enabled" value="false" />
|
||||||
<add key="ClientValidationEnabled" value="true" />
|
<add key="ClientValidationEnabled" value="true" />
|
||||||
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
||||||
|
|
||||||
<!--SSO单点登录主域-->
|
<!--SSO单点登录主域-->
|
||||||
<!--<add key="SSOPassport" value="http://openauthapi.com" />-->
|
<!--<add key="SSOPassport" value="http://openauthapi.com" />-->
|
||||||
<add key="SSOPassport" value="http://localhost:52789" />
|
<add key="SSOPassport" value="http://localhost:52789" />
|
||||||
<!--AppKey唯一标识-->
|
<!--AppKey唯一标识-->
|
||||||
<add key="SSOAppKey" value="openauthtest" />
|
<add key="SSOAppKey" value="openauthtest" />
|
||||||
|
|
||||||
|
|
||||||
<!--<add key="OpenAuthURL" value="http://openauth.com" />-->
|
<!--<add key="OpenAuthURL" value="http://openauth.com" />-->
|
||||||
<add key="OpenAuthURL" value="http://localhost:56813" />
|
<add key="OpenAuthURL" value="http://localhost:56813" />
|
||||||
</appSettings>
|
</appSettings>
|
||||||
<system.web>
|
<system.web>
|
||||||
<compilation debug="true" targetFramework="4.5" />
|
<compilation debug="true" targetFramework="4.5" />
|
||||||
<httpRuntime targetFramework="4.5" />
|
<httpRuntime targetFramework="4.5" />
|
||||||
</system.web>
|
</system.web>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
|
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
|
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
|
||||||
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
|
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
|
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
|
||||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
||||||
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
|
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
<dependentAssembly>
|
||||||
</runtime>
|
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
|
||||||
<system.codedom>
|
<bindingRedirect oldVersion="0.0.0.0-3.5.0.0" newVersion="3.5.0.0" />
|
||||||
<compilers>
|
</dependentAssembly>
|
||||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
|
<dependentAssembly>
|
||||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
</compilers>
|
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||||
</system.codedom>
|
</dependentAssembly>
|
||||||
</configuration>
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
<system.codedom>
|
||||||
|
<compilers>
|
||||||
|
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
|
||||||
|
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||||
|
</compilers>
|
||||||
|
</system.codedom>
|
||||||
|
</configuration>
|
||||||
|
Loading…
Reference in New Issue
Block a user