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

Refactoring #5

Merged
merged 1 commit into from
Oct 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/App_Start/UnityMvcActivator.cs.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Linq;
using System.Web.Mvc;

using Unity.Mvc;
using Unity.AspNet.Mvc;

[assembly: WebActivatorEx.PreApplicationStartMethod(typeof($rootnamespace$.UnityMvcActivator), nameof($rootnamespace$.UnityMvcActivator.Start))]
[assembly: WebActivatorEx.ApplicationShutdownMethod(typeof($rootnamespace$.UnityMvcActivator), nameof($rootnamespace$.UnityMvcActivator.Shutdown))]
Expand Down
3 changes: 2 additions & 1 deletion src/PerRequestLifetimeManager.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.

using System;

using Unity.Lifetime;

namespace Unity.Mvc
namespace Unity.AspNet.Mvc
{
/// <summary>
/// A <see cref="LifetimeManager"/> that holds onto the instance given to it during
Expand Down
38 changes: 29 additions & 9 deletions src/Unity.Mvc.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>Unity MVC</Description>
<Version>5.0.1</Version>
<AssemblyVersion>5.0.1.0</AssemblyVersion>
<FileVersion>5.0.1.0</FileVersion>
<Description>Unity for ASP.NET MVC</Description>
<Version>5.0.2</Version>
<AssemblyVersion>5.0.2.0</AssemblyVersion>
<FileVersion>5.0.2.0</FileVersion>
<Copyright>Copyright © Microsoft 2008</Copyright>
<PackageProjectUrl>https://github.com/unitycontainer/unity</PackageProjectUrl>
<PackageProjectUrl>https://github.com/unitycontainer/aspnet-mvc</PackageProjectUrl>
<RepositoryUrl>https://github.com/unitycontainer/unity</RepositoryUrl>
<PackageLicenseUrl>https://github.com/unitycontainer/unity/blob/master/LICENSE</PackageLicenseUrl>
<PackageIconUrl>https://avatars1.githubusercontent.com/u/12849707</PackageIconUrl>
<RepositoryType>git</RepositoryType>
<PackageReleaseNotes>This package is compatible with .NET 4.5, and 4.7 frameworks.</PackageReleaseNotes>
<PackageReleaseNotes>This package is compatible with .NET 4.5 and 4.7 frameworks.</PackageReleaseNotes>
<PackageId>Unity.Mvc</PackageId>
<Authors>Microsoft.Practices.Unity</Authors>
<Company>Microsoft.Practices.Unity</Company>
Expand All @@ -32,15 +32,14 @@
<DelaySign>false</DelaySign>
</PropertyGroup>


<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<TargetFrameworks>net47;net45</TargetFrameworks>
<TargetFrameworks>net45;net47</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<TargetFrameworks>net47;net45</TargetFrameworks>
<TargetFrameworks>net45;net47</TargetFrameworks>
<DebugType>Full</DebugType>
</PropertyGroup>

Expand All @@ -49,8 +48,21 @@
<PackageReference Include="WebActivatorEx" Version="2.2.0" />
</ItemGroup>

<PropertyGroup>
<RootNamespace>Unity.AspNet.Mvc</RootNamespace>
</PropertyGroup>

<PropertyGroup>
<UnityAbstractions>..\..\Abstractions\src\Unity.Abstractions.csproj</UnityAbstractions>
<UnityContainer>..\..\Container\src\Unity.Container.csproj</UnityContainer>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net45|AnyCPU'">
<DocumentationFile>bin\Release\net45\Unity.Mvc.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net47|AnyCPU'">
<DocumentationFile>bin\Release\net47\Unity.Mvc.xml</DocumentationFile>
</PropertyGroup>

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

<ItemGroup Condition="Exists('$(UnityContainer)')">
<ProjectReference Include="$(UnityContainer)" />
</ItemGroup>

<ItemGroup Condition="!Exists('$(UnityContainer)')">
<PackageReference Include="Unity.Container" Version="5.0.1" />
</ItemGroup>

</Project>
3 changes: 2 additions & 1 deletion src/UnityDependencyResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
using System;
using System.Collections.Generic;
using System.Web.Mvc;

using Unity.Exceptions;

namespace Unity.Mvc
namespace Unity.AspNet.Mvc
{
/// <summary>
/// An implementation of <see cref="IDependencyResolver"/> that wraps a Unity container.
Expand Down
4 changes: 2 additions & 2 deletions src/UnityFilterAttributeFilterProvider.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.

using System.Web.Mvc;
using System.Collections.Generic;
using System.Web.Mvc;

namespace Unity.Mvc
namespace Unity.AspNet.Mvc
{
/// <summary>
/// Defines a filter provider for filter attributes that support injection of Unity dependencies.
Expand Down
2 changes: 1 addition & 1 deletion src/UnityPerRequestHttpModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Linq;
using System.Web;

namespace Unity.Mvc
namespace Unity.AspNet.Mvc
{
/// <summary>
/// Implementation of the <see cref="IHttpModule"/> interface that provides support for using the
Expand Down
2 changes: 1 addition & 1 deletion tests/MVC.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net47</TargetFramework>
<IsPackable>false</IsPackable>
<RootNamespace>Unity.Interception.Tests</RootNamespace>
<RootNamespace>Unity.AspNet.Mvc.Tests</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions tests/MvcUnityDependencyResolverFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
using System;
using System.Linq;
using System.Web.Mvc;

using Microsoft.VisualStudio.TestTools.UnitTesting;
using Unity;

using Unity.Exceptions;
using Unity.Lifetime;
using Unity.Mvc;

namespace Microsoft.Practices.Unity.WebIntegation.Tests
namespace Unity.AspNet.Mvc.Tests
{
[TestClass]
public class MvcUnityDependencyResolverFixture
Expand Down
7 changes: 3 additions & 4 deletions tests/MvcUnityFilterAttributeFilterProviderFixture.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.

using System;
using System.Linq;
using System.Web.Mvc;

using Microsoft.VisualStudio.TestTools.UnitTesting;
using Unity;

using Unity.Injection;
using Unity.Mvc;

namespace Microsoft.Practices.Unity.WebIntegation.Tests
namespace Unity.AspNet.Mvc.Tests
{
[TestClass]
public class MvcUnityFilterAttributeFilterProviderFixture
Expand Down