Skip to content
This repository was archived by the owner on Mar 2, 2023. It is now read-only.

Commit 225e981

Browse files
authored
Merge pull request #5 from axelgenus/master
Refactoring
2 parents 4a411cb + be1e84f commit 225e981

9 files changed

+44
-23
lines changed

src/App_Start/UnityMvcActivator.cs.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Linq;
22
using System.Web.Mvc;
33

4-
using Unity.Mvc;
4+
using Unity.AspNet.Mvc;
55

66
[assembly: WebActivatorEx.PreApplicationStartMethod(typeof($rootnamespace$.UnityMvcActivator), nameof($rootnamespace$.UnityMvcActivator.Start))]
77
[assembly: WebActivatorEx.ApplicationShutdownMethod(typeof($rootnamespace$.UnityMvcActivator), nameof($rootnamespace$.UnityMvcActivator.Shutdown))]

src/PerRequestLifetimeManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
22

33
using System;
4+
45
using Unity.Lifetime;
56

6-
namespace Unity.Mvc
7+
namespace Unity.AspNet.Mvc
78
{
89
/// <summary>
910
/// A <see cref="LifetimeManager"/> that holds onto the instance given to it during

src/Unity.Mvc.csproj

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<Description>Unity MVC</Description>
5-
<Version>5.0.1</Version>
6-
<AssemblyVersion>5.0.1.0</AssemblyVersion>
7-
<FileVersion>5.0.1.0</FileVersion>
4+
<Description>Unity for ASP.NET MVC</Description>
5+
<Version>5.0.2</Version>
6+
<AssemblyVersion>5.0.2.0</AssemblyVersion>
7+
<FileVersion>5.0.2.0</FileVersion>
88
<Copyright>Copyright © Microsoft 2008</Copyright>
9-
<PackageProjectUrl>https://github.com/unitycontainer/unity</PackageProjectUrl>
9+
<PackageProjectUrl>https://github.com/unitycontainer/aspnet-mvc</PackageProjectUrl>
1010
<RepositoryUrl>https://github.com/unitycontainer/unity</RepositoryUrl>
1111
<PackageLicenseUrl>https://github.com/unitycontainer/unity/blob/master/LICENSE</PackageLicenseUrl>
1212
<PackageIconUrl>https://avatars1.githubusercontent.com/u/12849707</PackageIconUrl>
1313
<RepositoryType>git</RepositoryType>
14-
<PackageReleaseNotes>This package is compatible with .NET 4.5, and 4.7 frameworks.</PackageReleaseNotes>
14+
<PackageReleaseNotes>This package is compatible with .NET 4.5 and 4.7 frameworks.</PackageReleaseNotes>
1515
<PackageId>Unity.Mvc</PackageId>
1616
<Authors>Microsoft.Practices.Unity</Authors>
1717
<Company>Microsoft.Practices.Unity</Company>
@@ -32,15 +32,14 @@
3232
<DelaySign>false</DelaySign>
3333
</PropertyGroup>
3434

35-
3635
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
3736
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
38-
<TargetFrameworks>net47;net45</TargetFrameworks>
37+
<TargetFrameworks>net45;net47</TargetFrameworks>
3938
</PropertyGroup>
4039

4140
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
4241
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
43-
<TargetFrameworks>net47;net45</TargetFrameworks>
42+
<TargetFrameworks>net45;net47</TargetFrameworks>
4443
<DebugType>Full</DebugType>
4544
</PropertyGroup>
4645

@@ -49,8 +48,21 @@
4948
<PackageReference Include="WebActivatorEx" Version="2.2.0" />
5049
</ItemGroup>
5150

51+
<PropertyGroup>
52+
<RootNamespace>Unity.AspNet.Mvc</RootNamespace>
53+
</PropertyGroup>
54+
5255
<PropertyGroup>
5356
<UnityAbstractions>..\..\Abstractions\src\Unity.Abstractions.csproj</UnityAbstractions>
57+
<UnityContainer>..\..\Container\src\Unity.Container.csproj</UnityContainer>
58+
</PropertyGroup>
59+
60+
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net45|AnyCPU'">
61+
<DocumentationFile>bin\Release\net45\Unity.Mvc.xml</DocumentationFile>
62+
</PropertyGroup>
63+
64+
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net47|AnyCPU'">
65+
<DocumentationFile>bin\Release\net47\Unity.Mvc.xml</DocumentationFile>
5466
</PropertyGroup>
5567

5668
<ItemGroup Condition="Exists('$(UnityAbstractions)')">
@@ -61,4 +73,12 @@
6173
<PackageReference Include="Unity.Abstractions" Version="2.0.2" />
6274
</ItemGroup>
6375

76+
<ItemGroup Condition="Exists('$(UnityContainer)')">
77+
<ProjectReference Include="$(UnityContainer)" />
78+
</ItemGroup>
79+
80+
<ItemGroup Condition="!Exists('$(UnityContainer)')">
81+
<PackageReference Include="Unity.Container" Version="5.0.1" />
82+
</ItemGroup>
83+
6484
</Project>

src/UnityDependencyResolver.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
using System;
44
using System.Collections.Generic;
55
using System.Web.Mvc;
6+
67
using Unity.Exceptions;
78

8-
namespace Unity.Mvc
9+
namespace Unity.AspNet.Mvc
910
{
1011
/// <summary>
1112
/// An implementation of <see cref="IDependencyResolver"/> that wraps a Unity container.

src/UnityFilterAttributeFilterProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
22

3-
using System.Web.Mvc;
43
using System.Collections.Generic;
4+
using System.Web.Mvc;
55

6-
namespace Unity.Mvc
6+
namespace Unity.AspNet.Mvc
77
{
88
/// <summary>
99
/// Defines a filter provider for filter attributes that support injection of Unity dependencies.

src/UnityPerRequestHttpModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Linq;
66
using System.Web;
77

8-
namespace Unity.Mvc
8+
namespace Unity.AspNet.Mvc
99
{
1010
/// <summary>
1111
/// Implementation of the <see cref="IHttpModule"/> interface that provides support for using the

tests/MVC.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>net47</TargetFramework>
55
<IsPackable>false</IsPackable>
6-
<RootNamespace>Unity.Interception.Tests</RootNamespace>
6+
<RootNamespace>Unity.AspNet.Mvc.Tests</RootNamespace>
77
</PropertyGroup>
88

99
<ItemGroup>

tests/MvcUnityDependencyResolverFixture.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
using System;
44
using System.Linq;
55
using System.Web.Mvc;
6+
67
using Microsoft.VisualStudio.TestTools.UnitTesting;
7-
using Unity;
8+
89
using Unity.Exceptions;
910
using Unity.Lifetime;
10-
using Unity.Mvc;
1111

12-
namespace Microsoft.Practices.Unity.WebIntegation.Tests
12+
namespace Unity.AspNet.Mvc.Tests
1313
{
1414
[TestClass]
1515
public class MvcUnityDependencyResolverFixture

tests/MvcUnityFilterAttributeFilterProviderFixture.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
22

3-
using System;
43
using System.Linq;
54
using System.Web.Mvc;
5+
66
using Microsoft.VisualStudio.TestTools.UnitTesting;
7-
using Unity;
7+
88
using Unity.Injection;
9-
using Unity.Mvc;
109

11-
namespace Microsoft.Practices.Unity.WebIntegation.Tests
10+
namespace Unity.AspNet.Mvc.Tests
1211
{
1312
[TestClass]
1413
public class MvcUnityFilterAttributeFilterProviderFixture

0 commit comments

Comments
 (0)