From faa8251b70b4deac30cb519792a7ed8581aa7af2 Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Mon, 7 Apr 2014 16:06:49 -0700 Subject: [PATCH] Merging Mvc.Rendering and Mvc.Core --- WebFx.sln | 21 -- samples/MvcSample.Web/project.json | 3 +- .../IUrlHelper.cs | 0 .../Internal}/PropertyHelper.cs | 2 +- .../Internal/TypeHelper.cs | 23 ++ .../Properties/Resources.Designer.cs | 192 +++++++++++++ .../Rendering}/DisplayExtensions.cs | 0 .../Rendering}/DisplayForExtensions.cs | 0 .../Rendering}/DisplayForModelExtensions.cs | 0 .../Expressions/CachedExpressionCompiler.cs | 0 .../Expressions/ExpressionHelper.cs | 1 + .../Expressions/ExpressionMetadataProvider.cs | 1 + .../Expressions/TryGetValueDelegate.cs | 0 .../Expressions/TryGetValueProvider.cs | 0 .../Expressions/ViewDataEvaluator.cs | 0 .../Rendering}/Expressions/ViewDataInfo.cs | 0 .../Rendering}/FormMethod.cs | 0 .../Rendering}/Html/HtmlHelper.cs | 1 + .../Rendering}/Html/HtmlHelperOfT.cs | 6 +- .../Rendering}/Html/InputType.cs | 0 .../Rendering}/Html/TagBuilder.cs | 1 + .../Rendering}/Html/TagRenderMode.cs | 0 .../Rendering/Html}/TemplateBuilder.cs | 0 .../Rendering/Html}/TemplateRenderer.cs | 1 + .../Rendering/Html}/ValidationHelpers.cs | 1 + .../Rendering}/HtmlAttributePropertyHelper.cs | 0 .../Rendering}/HtmlHelperFormExtensions.cs | 0 .../Rendering}/HtmlHelperInputExtensions.cs | 0 .../Rendering}/HtmlHelperNameExtensions.cs | 0 .../Rendering}/HtmlHelperValueExtensions.cs | 0 .../Rendering}/HtmlString.cs | 0 .../Rendering}/IHtmlHelperOfT.cs | 0 .../Rendering}/MvcForm.cs | 0 .../Rendering}/PartialAsyncExtensions.cs | 0 .../RenderPartialAsyncExtensions.cs | 0 .../Rendering}/ValidationExtensions.cs | 0 .../Rendering}/View/DynamicViewData.cs | 1 + .../Rendering}/View/FormContext.cs | 0 .../Rendering/View}/ICanHasViewContext.cs | 0 .../Rendering}/View/IView.cs | 0 .../Rendering}/View/IViewEngine.cs | 0 .../Rendering}/View/TemplateInfo.cs | 0 .../Rendering}/View/ViewContext.cs | 0 .../Rendering}/View/ViewDataDictionary.cs | 1 + .../Rendering}/View/ViewDataDictionaryOfT.cs | 1 + .../Rendering}/View/ViewEngineResult.cs | 0 src/Microsoft.AspNet.Mvc.Core/Resources.resx | 36 +++ .../UrlHelperExtensions.cs | 0 .../DefaultViewComponentInvoker.cs | 1 - .../ViewComponents}/IViewComponentHelper.cs | 0 .../ViewComponents}/IViewComponentResult.cs | 0 .../ViewComponents}/ViewComponentContext.cs | 0 .../ViewComponentHelperExtensions.cs | 3 +- .../ViewComponentMethodSelector.cs | 3 +- src/Microsoft.AspNet.Mvc.Core/project.json | 7 +- .../HelperResult.cs | 2 +- src/Microsoft.AspNet.Mvc.Razor/project.json | 1 - .../Properties/AssemblyInfo.cs | 38 --- .../Properties/Resources.Designer.cs | 255 ------------------ .../Properties/Resources.resx | 159 ----------- .../TypeHelper.cs | 31 --- .../project.json | 36 --- src/Microsoft.AspNet.Mvc/project.json | 3 +- .../PropertyHelperTest.cs | 2 +- .../HtmlAttributePropertyHelperTest.cs | 0 .../Rendering}/ViewContextTests.cs | 0 .../Rendering}/ViewDataOfTTest.cs | 0 .../TypeHelperTest.cs | 2 +- .../project.json | 1 - .../project.json | 2 +- .../project.json | 26 -- 71 files changed, 281 insertions(+), 583 deletions(-) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core}/IUrlHelper.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Internal}/PropertyHelper.cs (99%) rename src/{Microsoft.AspNet.Mvc.Rendering/Html/TemplatedHelpers => Microsoft.AspNet.Mvc.Core/Rendering}/DisplayExtensions.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering/Html/TemplatedHelpers => Microsoft.AspNet.Mvc.Core/Rendering}/DisplayForExtensions.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering/Html/TemplatedHelpers => Microsoft.AspNet.Mvc.Core/Rendering}/DisplayForModelExtensions.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/Expressions/CachedExpressionCompiler.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/Expressions/ExpressionHelper.cs (99%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/Expressions/ExpressionMetadataProvider.cs (99%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/Expressions/TryGetValueDelegate.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/Expressions/TryGetValueProvider.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/Expressions/ViewDataEvaluator.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/Expressions/ViewDataInfo.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering/Html => Microsoft.AspNet.Mvc.Core/Rendering}/FormMethod.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/Html/HtmlHelper.cs (99%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/Html/HtmlHelperOfT.cs (94%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/Html/InputType.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/Html/TagBuilder.cs (99%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/Html/TagRenderMode.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering/Html/TemplatedHelpers => Microsoft.AspNet.Mvc.Core/Rendering/Html}/TemplateBuilder.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering/Html/TemplatedHelpers => Microsoft.AspNet.Mvc.Core/Rendering/Html}/TemplateRenderer.cs (99%) rename src/{Microsoft.AspNet.Mvc.Rendering/Html/Validation => Microsoft.AspNet.Mvc.Core/Rendering/Html}/ValidationHelpers.cs (98%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/HtmlAttributePropertyHelper.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/HtmlHelperFormExtensions.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/HtmlHelperInputExtensions.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/HtmlHelperNameExtensions.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/HtmlHelperValueExtensions.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering/Html => Microsoft.AspNet.Mvc.Core/Rendering}/HtmlString.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/IHtmlHelperOfT.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering/Html => Microsoft.AspNet.Mvc.Core/Rendering}/MvcForm.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering/Html/Partials => Microsoft.AspNet.Mvc.Core/Rendering}/PartialAsyncExtensions.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering/Html/Partials => Microsoft.AspNet.Mvc.Core/Rendering}/RenderPartialAsyncExtensions.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering/Html/Validation => Microsoft.AspNet.Mvc.Core/Rendering}/ValidationExtensions.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/View/DynamicViewData.cs (98%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/View/FormContext.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering/View}/ICanHasViewContext.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/View/IView.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/View/IViewEngine.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/View/TemplateInfo.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/View/ViewContext.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/View/ViewDataDictionary.cs (99%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/View/ViewDataDictionaryOfT.cs (98%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/Rendering}/View/ViewEngineResult.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core}/UrlHelperExtensions.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/ViewComponents}/IViewComponentHelper.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/ViewComponents}/IViewComponentResult.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/ViewComponents}/ViewComponentContext.cs (100%) rename src/{Microsoft.AspNet.Mvc.Rendering => Microsoft.AspNet.Mvc.Core/ViewComponents}/ViewComponentHelperExtensions.cs (93%) rename src/{Microsoft.AspNet.Mvc.Rendering/View => Microsoft.AspNet.Mvc.Razor}/HelperResult.cs (89%) delete mode 100644 src/Microsoft.AspNet.Mvc.Rendering/Properties/AssemblyInfo.cs delete mode 100644 src/Microsoft.AspNet.Mvc.Rendering/Properties/Resources.Designer.cs delete mode 100644 src/Microsoft.AspNet.Mvc.Rendering/Properties/Resources.resx delete mode 100644 src/Microsoft.AspNet.Mvc.Rendering/TypeHelper.cs delete mode 100644 src/Microsoft.AspNet.Mvc.Rendering/project.json rename test/{Microsoft.AspNet.Mvc.Rendering.Test => Microsoft.AspNet.Mvc.Core.Test}/PropertyHelperTest.cs (99%) rename test/{Microsoft.AspNet.Mvc.Rendering.Test => Microsoft.AspNet.Mvc.Core.Test/Rendering}/HtmlAttributePropertyHelperTest.cs (100%) rename test/{Microsoft.AspNet.Mvc.Rendering.Test => Microsoft.AspNet.Mvc.Core.Test/Rendering}/ViewContextTests.cs (100%) rename test/{Microsoft.AspNet.Mvc.Rendering.Test => Microsoft.AspNet.Mvc.Core.Test/Rendering}/ViewDataOfTTest.cs (100%) rename test/{Microsoft.AspNet.Mvc.Rendering.Test => Microsoft.AspNet.Mvc.Core.Test}/TypeHelperTest.cs (98%) delete mode 100644 test/Microsoft.AspNet.Mvc.Rendering.Test/project.json diff --git a/WebFx.sln b/WebFx.sln index 0786f43aac..499794f71e 100644 --- a/WebFx.sln +++ b/WebFx.sln @@ -15,10 +15,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.ModelB EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.ModelBinding.net45", "src\Microsoft.AspNet.Mvc.ModelBinding\Microsoft.AspNet.Mvc.ModelBinding.net45.csproj", "{28AA31B2-6504-432D-8599-1501FE0B100A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.Rendering.k10", "src\Microsoft.AspNet.Mvc.Rendering\Microsoft.AspNet.Mvc.Rendering.k10.csproj", "{DA65D56F-1C40-4D38-B1E0-BF9641A98C52}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.Rendering.net45", "src\Microsoft.AspNet.Mvc.Rendering\Microsoft.AspNet.Mvc.Rendering.net45.csproj", "{236CDB04-8FDA-4152-9A5B-7F98C19C663A}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "k10", "k10", "{4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "net45", "net45", "{6C2EDE5B-CA31-42DD-A352-84B10CC70C98}" @@ -45,8 +41,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.k10", "src\Common\Co EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.Razor.Test.net45", "test\Microsoft.AspNet.Mvc.Razor.Test\Microsoft.AspNet.Mvc.Razor.Test.net45.csproj", "{3EB2CFF9-6E67-4C03-9AC4-2DD169024938}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.Rendering.Test.net45", "test\Microsoft.AspNet.Mvc.Rendering.Test\Microsoft.AspNet.Mvc.Rendering.Test.net45.csproj", "{68FC3791-A9E4-4EDE-93A5-C7AC7DC0ED6E}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "k10", "k10", "{A4E25DA1-9BC1-4534-BDAA-4AEB7C089B0F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "net45", "net45", "{49EBEEDD-E117-4B91-B4BA-56FB80AF4F3C}" @@ -77,14 +71,6 @@ Global {28AA31B2-6504-432D-8599-1501FE0B100A}.Debug|Any CPU.Build.0 = Debug|Any CPU {28AA31B2-6504-432D-8599-1501FE0B100A}.Release|Any CPU.ActiveCfg = Release|Any CPU {28AA31B2-6504-432D-8599-1501FE0B100A}.Release|Any CPU.Build.0 = Release|Any CPU - {DA65D56F-1C40-4D38-B1E0-BF9641A98C52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DA65D56F-1C40-4D38-B1E0-BF9641A98C52}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DA65D56F-1C40-4D38-B1E0-BF9641A98C52}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DA65D56F-1C40-4D38-B1E0-BF9641A98C52}.Release|Any CPU.Build.0 = Release|Any CPU - {236CDB04-8FDA-4152-9A5B-7F98C19C663A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {236CDB04-8FDA-4152-9A5B-7F98C19C663A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {236CDB04-8FDA-4152-9A5B-7F98C19C663A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {236CDB04-8FDA-4152-9A5B-7F98C19C663A}.Release|Any CPU.Build.0 = Release|Any CPU {42195A56-42C0-4CFF-A982-B6E24EFC6356}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {42195A56-42C0-4CFF-A982-B6E24EFC6356}.Debug|Any CPU.Build.0 = Debug|Any CPU {42195A56-42C0-4CFF-A982-B6E24EFC6356}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -121,10 +107,6 @@ Global {3EB2CFF9-6E67-4C03-9AC4-2DD169024938}.Debug|Any CPU.Build.0 = Debug|Any CPU {3EB2CFF9-6E67-4C03-9AC4-2DD169024938}.Release|Any CPU.ActiveCfg = Release|Any CPU {3EB2CFF9-6E67-4C03-9AC4-2DD169024938}.Release|Any CPU.Build.0 = Release|Any CPU - {68FC3791-A9E4-4EDE-93A5-C7AC7DC0ED6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {68FC3791-A9E4-4EDE-93A5-C7AC7DC0ED6E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {68FC3791-A9E4-4EDE-93A5-C7AC7DC0ED6E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {68FC3791-A9E4-4EDE-93A5-C7AC7DC0ED6E}.Release|Any CPU.Build.0 = Release|Any CPU {5A219830-3C19-475D-901F-E580BA87DFF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5A219830-3C19-475D-901F-E580BA87DFF8}.Debug|Any CPU.Build.0 = Debug|Any CPU {5A219830-3C19-475D-901F-E580BA87DFF8}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -142,13 +124,11 @@ Global {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E} {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E} {28AA31B2-6504-432D-8599-1501FE0B100A} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} - {236CDB04-8FDA-4152-9A5B-7F98C19C663A} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} {365CA5C6-037D-4E6E-AF05-F5FA42E024EB} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} {792E181C-7645-4268-A04F-DB134411AD74} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} {64BD92BA-F313-496C-ACE6-B9C4C10C420E} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} {10142178-F784-4E17-A583-E9A37A80EFAA} = {6C2EDE5B-CA31-42DD-A352-84B10CC70C98} {24947215-86AB-4DD0-B94E-88B1EC4DC877} = {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} - {DA65D56F-1C40-4D38-B1E0-BF9641A98C52} = {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} {0D2C8C3D-AFC3-4E1F-A6D8-9F690EE5E063} = {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} {5E701B23-73E4-45D2-8521-1D7A94E152F1} = {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} {BA88E212-5889-48DC-823F-A3A67DDEF123} = {4EB70D0E-E27E-4C42-AB58-BC8B325EDFB3} @@ -157,7 +137,6 @@ Global {49EBEEDD-E117-4B91-B4BA-56FB80AF4F3C} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} {A4E25DA1-9BC1-4534-BDAA-4AEB7C089B0F} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} {3EB2CFF9-6E67-4C03-9AC4-2DD169024938} = {49EBEEDD-E117-4B91-B4BA-56FB80AF4F3C} - {68FC3791-A9E4-4EDE-93A5-C7AC7DC0ED6E} = {49EBEEDD-E117-4B91-B4BA-56FB80AF4F3C} {42195A56-42C0-4CFF-A982-B6E24EFC6356} = {49EBEEDD-E117-4B91-B4BA-56FB80AF4F3C} {998C5A2E-D043-465F-BE19-076D27444289} = {49EBEEDD-E117-4B91-B4BA-56FB80AF4F3C} {5A219830-3C19-475D-901F-E580BA87DFF8} = {A4E25DA1-9BC1-4534-BDAA-4AEB7C089B0F} diff --git a/samples/MvcSample.Web/project.json b/samples/MvcSample.Web/project.json index e39f2cd441..b754a34922 100644 --- a/samples/MvcSample.Web/project.json +++ b/samples/MvcSample.Web/project.json @@ -12,8 +12,7 @@ "Microsoft.AspNet.Mvc.ModelBinding": "", "Microsoft.AspNet.Mvc.Core": "", "Microsoft.AspNet.Mvc": "", - "Microsoft.AspNet.Mvc.Razor": "", - "Microsoft.AspNet.Mvc.Rendering": "" + "Microsoft.AspNet.Mvc.Razor": "" }, "commands": { "web": "Microsoft.AspNet.Hosting server.name=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:5001" }, "configurations": { diff --git a/src/Microsoft.AspNet.Mvc.Rendering/IUrlHelper.cs b/src/Microsoft.AspNet.Mvc.Core/IUrlHelper.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/IUrlHelper.cs rename to src/Microsoft.AspNet.Mvc.Core/IUrlHelper.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/PropertyHelper.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/PropertyHelper.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Rendering/PropertyHelper.cs rename to src/Microsoft.AspNet.Mvc.Core/Internal/PropertyHelper.cs index cfb6036154..5865b2ac02 100644 --- a/src/Microsoft.AspNet.Mvc.Rendering/PropertyHelper.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/PropertyHelper.cs @@ -5,7 +5,7 @@ using System.Diagnostics.Contracts; using System.Linq; using System.Reflection; -namespace Microsoft.AspNet.Mvc.Rendering +namespace Microsoft.AspNet.Mvc { internal class PropertyHelper { diff --git a/src/Microsoft.AspNet.Mvc.Core/Internal/TypeHelper.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/TypeHelper.cs index 72782fdb8f..16a93a5c9f 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Internal/TypeHelper.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/TypeHelper.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. using System; +using System.Collections.Generic; using System.Diagnostics.Contracts; using System.Reflection; using System.Threading.Tasks; @@ -26,5 +27,27 @@ namespace Microsoft.AspNet.Mvc return null; } + + /// + /// Given an object, adds each instance property with a public get method as a key and its + /// associated value to a dictionary. + /// + // + // The implementation of PropertyHelper will cache the property accessors per-type. This is + // faster when the the same type is used multiple times with ObjectToDictionary. + public static IDictionary ObjectToDictionary(object value) + { + var dictionary = new Dictionary(StringComparer.OrdinalIgnoreCase); + + if (value != null) + { + foreach (var helper in PropertyHelper.GetProperties(value)) + { + dictionary.Add(helper.Name, helper.GetValue(value)); + } + } + + return dictionary; + } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/Properties/Resources.Designer.cs b/src/Microsoft.AspNet.Mvc.Core/Properties/Resources.Designer.cs index 949dc94e52..1d6063cef4 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Properties/Resources.Designer.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Properties/Resources.Designer.cs @@ -298,6 +298,198 @@ namespace Microsoft.AspNet.Mvc.Core return GetString("ActionSelector_GetCandidateActionsIsAmbiguous"); } + /// + /// The argument must not be null or empty. + /// + internal static string ArgumentNullOrEmpty + { + get { return GetString("ArgumentNullOrEmpty"); } + } + + /// + /// The argument must not be null or empty. + /// + internal static string FormatArgumentNullOrEmpty() + { + return GetString("ArgumentNullOrEmpty"); + } + + /// + /// Property '{0}' is of type '{1}', but this method requires a value of type '{2}'. + /// + internal static string ArgumentPropertyUnexpectedType + { + get { return GetString("ArgumentPropertyUnexpectedType"); } + } + + /// + /// Property '{0}' is of type '{1}', but this method requires a value of type '{2}'. + /// + internal static string FormatArgumentPropertyUnexpectedType(object p0, object p1, object p2) + { + return string.Format(CultureInfo.CurrentCulture, GetString("ArgumentPropertyUnexpectedType"), p0, p1, p2); + } + + /// + /// The partial view '{0}' was not found or no view engine supports the searched locations. The following locations were searched:{1} + /// + internal static string Common_PartialViewNotFound + { + get { return GetString("Common_PartialViewNotFound"); } + } + + /// + /// The partial view '{0}' was not found or no view engine supports the searched locations. The following locations were searched:{1} + /// + internal static string FormatCommon_PartialViewNotFound(object p0, object p1) + { + return string.Format(CultureInfo.CurrentCulture, GetString("Common_PartialViewNotFound"), p0, p1); + } + + /// + /// The value '{0}' is invalid. + /// + internal static string Common_ValueNotValidForProperty + { + get { return GetString("Common_ValueNotValidForProperty"); } + } + + /// + /// The value '{0}' is invalid. + /// + internal static string FormatCommon_ValueNotValidForProperty(object p0) + { + return string.Format(CultureInfo.CurrentCulture, GetString("Common_ValueNotValidForProperty"), p0); + } + + /// + /// ViewData value must not be null. + /// + internal static string DynamicViewData_ViewDataNull + { + get { return GetString("DynamicViewData_ViewDataNull"); } + } + + /// + /// ViewData value must not be null. + /// + internal static string FormatDynamicViewData_ViewDataNull() + { + return GetString("DynamicViewData_ViewDataNull"); + } + + /// + /// The expression compiler was unable to evaluate the indexer expression '{0}' because it references the model parameter '{1}' which is unavailable. + /// + internal static string ExpressionHelper_InvalidIndexerExpression + { + get { return GetString("ExpressionHelper_InvalidIndexerExpression"); } + } + + /// + /// The expression compiler was unable to evaluate the indexer expression '{0}' because it references the model parameter '{1}' which is unavailable. + /// + internal static string FormatExpressionHelper_InvalidIndexerExpression(object p0, object p1) + { + return string.Format(CultureInfo.CurrentCulture, GetString("ExpressionHelper_InvalidIndexerExpression"), p0, p1); + } + + /// + /// The IModelMetadataProvider was unable to provide metadata for expression '{0}'. + /// + internal static string HtmlHelper_NullModelMetadata + { + get { return GetString("HtmlHelper_NullModelMetadata"); } + } + + /// + /// The IModelMetadataProvider was unable to provide metadata for expression '{0}'. + /// + internal static string FormatHtmlHelper_NullModelMetadata(object p0) + { + return string.Format(CultureInfo.CurrentCulture, GetString("HtmlHelper_NullModelMetadata"), p0); + } + + /// + /// Must call 'Contextualize' method before using this HtmlHelper instance. + /// + internal static string HtmlHelper_NotContextualized + { + get { return GetString("HtmlHelper_NotContextualized"); } + } + + /// + /// Must call 'Contextualize' method before using this HtmlHelper instance. + /// + internal static string FormatHtmlHelper_NotContextualized() + { + return GetString("HtmlHelper_NotContextualized"); + } + + /// + /// Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions. + /// + internal static string TemplateHelpers_TemplateLimitations + { + get { return GetString("TemplateHelpers_TemplateLimitations"); } + } + + /// + /// Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions. + /// + internal static string FormatTemplateHelpers_TemplateLimitations() + { + return GetString("TemplateHelpers_TemplateLimitations"); + } + + /// + /// Unable to locate an appropriate template for type {0}. + /// + internal static string TemplateHelpers_NoTemplate + { + get { return GetString("TemplateHelpers_NoTemplate"); } + } + + /// + /// Unable to locate an appropriate template for type {0}. + /// + internal static string FormatTemplateHelpers_NoTemplate(object p0) + { + return string.Format(CultureInfo.CurrentCulture, GetString("TemplateHelpers_NoTemplate"), p0); + } + + /// + /// The model item passed is null, but this ViewDataDictionary instance requires a non-null model item of type '{0}'. + /// + internal static string ViewData_ModelCannotBeNull + { + get { return GetString("ViewData_ModelCannotBeNull"); } + } + + /// + /// The model item passed is null, but this ViewDataDictionary instance requires a non-null model item of type '{0}'. + /// + internal static string FormatViewData_ModelCannotBeNull(object p0) + { + return string.Format(CultureInfo.CurrentCulture, GetString("ViewData_ModelCannotBeNull"), p0); + } + + /// + /// The model item passed into the ViewDataDictionary is of type '{0}', but this ViewDataDictionary instance requires a model item of type '{1}'. + /// + internal static string ViewData_WrongTModelType + { + get { return GetString("ViewData_WrongTModelType"); } + } + + /// + /// The model item passed into the ViewDataDictionary is of type '{0}', but this ViewDataDictionary instance requires a model item of type '{1}'. + /// + internal static string FormatViewData_WrongTModelType(object p0, object p1) + { + return string.Format(CultureInfo.CurrentCulture, GetString("ViewData_WrongTModelType"), p0, p1); + } + private static string GetString(string name, params string[] formatterNames) { var value = _resourceManager.GetString(name); diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Html/TemplatedHelpers/DisplayExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/DisplayExtensions.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/Html/TemplatedHelpers/DisplayExtensions.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/DisplayExtensions.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Html/TemplatedHelpers/DisplayForExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/DisplayForExtensions.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/Html/TemplatedHelpers/DisplayForExtensions.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/DisplayForExtensions.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Html/TemplatedHelpers/DisplayForModelExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/DisplayForModelExtensions.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/Html/TemplatedHelpers/DisplayForModelExtensions.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/DisplayForModelExtensions.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Expressions/CachedExpressionCompiler.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/CachedExpressionCompiler.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/Expressions/CachedExpressionCompiler.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/CachedExpressionCompiler.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Expressions/ExpressionHelper.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ExpressionHelper.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Rendering/Expressions/ExpressionHelper.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ExpressionHelper.cs index f2e6bc222d..e7a0a05571 100644 --- a/src/Microsoft.AspNet.Mvc.Rendering/Expressions/ExpressionHelper.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ExpressionHelper.cs @@ -4,6 +4,7 @@ using System.Globalization; using System.Linq; using System.Linq.Expressions; using System.Reflection; +using Microsoft.AspNet.Mvc.Core; namespace Microsoft.AspNet.Mvc.Rendering.Expressions { diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Expressions/ExpressionMetadataProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ExpressionMetadataProvider.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Rendering/Expressions/ExpressionMetadataProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ExpressionMetadataProvider.cs index 261260e7dd..7357f070a8 100644 --- a/src/Microsoft.AspNet.Mvc.Rendering/Expressions/ExpressionMetadataProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ExpressionMetadataProvider.cs @@ -3,6 +3,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Linq.Expressions; using System.Reflection; +using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.ModelBinding; namespace Microsoft.AspNet.Mvc.Rendering.Expressions diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Expressions/TryGetValueDelegate.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/TryGetValueDelegate.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/Expressions/TryGetValueDelegate.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/TryGetValueDelegate.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Expressions/TryGetValueProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/TryGetValueProvider.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/Expressions/TryGetValueProvider.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/TryGetValueProvider.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Expressions/ViewDataEvaluator.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ViewDataEvaluator.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/Expressions/ViewDataEvaluator.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ViewDataEvaluator.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Expressions/ViewDataInfo.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ViewDataInfo.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/Expressions/ViewDataInfo.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ViewDataInfo.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Html/FormMethod.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/FormMethod.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/Html/FormMethod.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/FormMethod.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Html/HtmlHelper.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Rendering/Html/HtmlHelper.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs index 9647b95e49..61ae2ef6b5 100644 --- a/src/Microsoft.AspNet.Mvc.Rendering/Html/HtmlHelper.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs @@ -8,6 +8,7 @@ using System.Reflection; using System.Text; using System.Threading.Tasks; using Microsoft.AspNet.Abstractions; +using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.Rendering.Expressions; diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Html/HtmlHelperOfT.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelperOfT.cs similarity index 94% rename from src/Microsoft.AspNet.Mvc.Rendering/Html/HtmlHelperOfT.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelperOfT.cs index 2642ce52b3..75aefba752 100644 --- a/src/Microsoft.AspNet.Mvc.Rendering/Html/HtmlHelperOfT.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelperOfT.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Diagnostics.Contracts; using System.Linq.Expressions; +using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.Rendering.Expressions; @@ -24,7 +25,10 @@ namespace Microsoft.AspNet.Mvc.Rendering { if (viewContext.ViewData == null) { - throw new ArgumentException(Resources.FormatArgumentPropertyNull("ViewData"), "viewContext"); + throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull( + "ViewData", + typeof(ViewContext)), + "viewContext"); } ViewData = viewContext.ViewData as ViewDataDictionary; diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Html/InputType.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/InputType.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/Html/InputType.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/Html/InputType.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Html/TagBuilder.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TagBuilder.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Rendering/Html/TagBuilder.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TagBuilder.cs index 1b0c8a7ba4..52bfdda64b 100644 --- a/src/Microsoft.AspNet.Mvc.Rendering/Html/TagBuilder.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TagBuilder.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Globalization; using System.Net; using System.Text; +using Microsoft.AspNet.Mvc.Core; namespace Microsoft.AspNet.Mvc.Rendering { diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Html/TagRenderMode.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TagRenderMode.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/Html/TagRenderMode.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TagRenderMode.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Html/TemplatedHelpers/TemplateBuilder.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TemplateBuilder.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/Html/TemplatedHelpers/TemplateBuilder.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TemplateBuilder.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Html/TemplatedHelpers/TemplateRenderer.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TemplateRenderer.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Rendering/Html/TemplatedHelpers/TemplateRenderer.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TemplateRenderer.cs index 27df81f5db..69cf1e5219 100644 --- a/src/Microsoft.AspNet.Mvc.Rendering/Html/TemplatedHelpers/TemplateRenderer.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TemplateRenderer.cs @@ -6,6 +6,7 @@ using System.IO; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNet.DependencyInjection; +using Microsoft.AspNet.Mvc.Core; namespace Microsoft.AspNet.Mvc.Rendering { diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Html/Validation/ValidationHelpers.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/ValidationHelpers.cs similarity index 98% rename from src/Microsoft.AspNet.Mvc.Rendering/Html/Validation/ValidationHelpers.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/Html/ValidationHelpers.cs index 24ac29d206..8eca5aec9b 100644 --- a/src/Microsoft.AspNet.Mvc.Rendering/Html/Validation/ValidationHelpers.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/ValidationHelpers.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.ModelBinding; namespace Microsoft.AspNet.Mvc.Rendering diff --git a/src/Microsoft.AspNet.Mvc.Rendering/HtmlAttributePropertyHelper.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlAttributePropertyHelper.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/HtmlAttributePropertyHelper.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlAttributePropertyHelper.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/HtmlHelperFormExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperFormExtensions.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/HtmlHelperFormExtensions.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperFormExtensions.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/HtmlHelperInputExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperInputExtensions.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/HtmlHelperInputExtensions.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperInputExtensions.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/HtmlHelperNameExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperNameExtensions.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/HtmlHelperNameExtensions.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperNameExtensions.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/HtmlHelperValueExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperValueExtensions.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/HtmlHelperValueExtensions.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperValueExtensions.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Html/HtmlString.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlString.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/Html/HtmlString.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlString.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/IHtmlHelperOfT.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/IHtmlHelperOfT.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/IHtmlHelperOfT.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/IHtmlHelperOfT.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Html/MvcForm.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/MvcForm.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/Html/MvcForm.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/MvcForm.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Html/Partials/PartialAsyncExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/PartialAsyncExtensions.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/Html/Partials/PartialAsyncExtensions.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/PartialAsyncExtensions.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Html/Partials/RenderPartialAsyncExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/RenderPartialAsyncExtensions.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/Html/Partials/RenderPartialAsyncExtensions.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/RenderPartialAsyncExtensions.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Html/Validation/ValidationExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/ValidationExtensions.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/Html/Validation/ValidationExtensions.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/ValidationExtensions.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/View/DynamicViewData.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/View/DynamicViewData.cs similarity index 98% rename from src/Microsoft.AspNet.Mvc.Rendering/View/DynamicViewData.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/View/DynamicViewData.cs index eee55e99c0..d43707936f 100644 --- a/src/Microsoft.AspNet.Mvc.Rendering/View/DynamicViewData.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/View/DynamicViewData.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Dynamic; +using Microsoft.AspNet.Mvc.Core; namespace Microsoft.AspNet.Mvc.Rendering { diff --git a/src/Microsoft.AspNet.Mvc.Rendering/View/FormContext.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/View/FormContext.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/View/FormContext.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/View/FormContext.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/ICanHasViewContext.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/View/ICanHasViewContext.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/ICanHasViewContext.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/View/ICanHasViewContext.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/View/IView.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/View/IView.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/View/IView.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/View/IView.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/View/IViewEngine.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/View/IViewEngine.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/View/IViewEngine.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/View/IViewEngine.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/View/TemplateInfo.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/View/TemplateInfo.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/View/TemplateInfo.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/View/TemplateInfo.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/View/ViewContext.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/View/ViewContext.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/View/ViewContext.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/View/ViewContext.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/View/ViewDataDictionary.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/View/ViewDataDictionary.cs similarity index 99% rename from src/Microsoft.AspNet.Mvc.Rendering/View/ViewDataDictionary.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/View/ViewDataDictionary.cs index 6494a39cf7..b23ef41574 100644 --- a/src/Microsoft.AspNet.Mvc.Rendering/View/ViewDataDictionary.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/View/ViewDataDictionary.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Globalization; +using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.Rendering.Expressions; diff --git a/src/Microsoft.AspNet.Mvc.Rendering/View/ViewDataDictionaryOfT.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/View/ViewDataDictionaryOfT.cs similarity index 98% rename from src/Microsoft.AspNet.Mvc.Rendering/View/ViewDataDictionaryOfT.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/View/ViewDataDictionaryOfT.cs index fd2ac46f85..8639772257 100644 --- a/src/Microsoft.AspNet.Mvc.Rendering/View/ViewDataDictionaryOfT.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/View/ViewDataDictionaryOfT.cs @@ -1,4 +1,5 @@ using System; +using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.ModelBinding; namespace Microsoft.AspNet.Mvc.Rendering diff --git a/src/Microsoft.AspNet.Mvc.Rendering/View/ViewEngineResult.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/View/ViewEngineResult.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/View/ViewEngineResult.cs rename to src/Microsoft.AspNet.Mvc.Core/Rendering/View/ViewEngineResult.cs diff --git a/src/Microsoft.AspNet.Mvc.Core/Resources.resx b/src/Microsoft.AspNet.Mvc.Core/Resources.resx index 4f1edbe75c..2277b140f6 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Resources.resx +++ b/src/Microsoft.AspNet.Mvc.Core/Resources.resx @@ -171,4 +171,40 @@ The supplied route values are ambiguous and can select multiple sets of actions. + + The argument must not be null or empty. + + + Property '{0}' is of type '{1}', but this method requires a value of type '{2}'. + + + The partial view '{0}' was not found or no view engine supports the searched locations. The following locations were searched:{1} + + + The value '{0}' is invalid. + + + ViewData value must not be null. + + + The expression compiler was unable to evaluate the indexer expression '{0}' because it references the model parameter '{1}' which is unavailable. + + + The IModelMetadataProvider was unable to provide metadata for expression '{0}'. + + + Must call 'Contextualize' method before using this HtmlHelper instance. + + + Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions. + + + Unable to locate an appropriate template for type {0}. + + + The model item passed is null, but this ViewDataDictionary instance requires a non-null model item of type '{0}'. + + + The model item passed into the ViewDataDictionary is of type '{0}', but this ViewDataDictionary instance requires a model item of type '{1}'. + \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Rendering/UrlHelperExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/UrlHelperExtensions.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/UrlHelperExtensions.cs rename to src/Microsoft.AspNet.Mvc.Core/UrlHelperExtensions.cs diff --git a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/DefaultViewComponentInvoker.cs b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/DefaultViewComponentInvoker.cs index 0209dcc7f3..de2f60952f 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/DefaultViewComponentInvoker.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/DefaultViewComponentInvoker.cs @@ -5,7 +5,6 @@ using System.Runtime.ExceptionServices; using System.Threading.Tasks; using Microsoft.AspNet.DependencyInjection; using Microsoft.AspNet.Mvc.Core; -using Microsoft.AspNet.Mvc.Core.ViewComponents; using Microsoft.AspNet.Mvc.Rendering; namespace Microsoft.AspNet.Mvc diff --git a/src/Microsoft.AspNet.Mvc.Rendering/IViewComponentHelper.cs b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/IViewComponentHelper.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/IViewComponentHelper.cs rename to src/Microsoft.AspNet.Mvc.Core/ViewComponents/IViewComponentHelper.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/IViewComponentResult.cs b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/IViewComponentResult.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/IViewComponentResult.cs rename to src/Microsoft.AspNet.Mvc.Core/ViewComponents/IViewComponentResult.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/ViewComponentContext.cs b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentContext.cs similarity index 100% rename from src/Microsoft.AspNet.Mvc.Rendering/ViewComponentContext.cs rename to src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentContext.cs diff --git a/src/Microsoft.AspNet.Mvc.Rendering/ViewComponentHelperExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentHelperExtensions.cs similarity index 93% rename from src/Microsoft.AspNet.Mvc.Rendering/ViewComponentHelperExtensions.cs rename to src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentHelperExtensions.cs index 9e93e3c98a..644291b7a7 100644 --- a/src/Microsoft.AspNet.Mvc.Rendering/ViewComponentHelperExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentHelperExtensions.cs @@ -1,7 +1,8 @@  using System.Threading.Tasks; +using Microsoft.AspNet.Mvc.Rendering; -namespace Microsoft.AspNet.Mvc.Rendering +namespace Microsoft.AspNet.Mvc { public static class ViewComponentHelperExtensions { diff --git a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentMethodSelector.cs b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentMethodSelector.cs index 3455912ed0..9870204df3 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentMethodSelector.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentMethodSelector.cs @@ -2,8 +2,9 @@ using System.Linq.Expressions; using System.Reflection; using System.Threading.Tasks; +using Microsoft.AspNet.Mvc.Core; -namespace Microsoft.AspNet.Mvc.Core.ViewComponents +namespace Microsoft.AspNet.Mvc { public static class ViewComponentMethodSelector { diff --git a/src/Microsoft.AspNet.Mvc.Core/project.json b/src/Microsoft.AspNet.Mvc.Core/project.json index 6a76bdf986..3221eea6c1 100644 --- a/src/Microsoft.AspNet.Mvc.Core/project.json +++ b/src/Microsoft.AspNet.Mvc.Core/project.json @@ -6,17 +6,19 @@ "Microsoft.AspNet.Abstractions": "0.1-alpha-*", "Microsoft.AspNet.Routing": "0.1-alpha-*", "Common": "", - "Microsoft.AspNet.Mvc.ModelBinding": "", - "Microsoft.AspNet.Mvc.Rendering": "" + "Microsoft.AspNet.Mvc.ModelBinding": "" }, "configurations": { "net45": {}, "k10": { "dependencies": { + "Microsoft.CSharp": "4.0.0.0", "System.Collections": "4.0.0.0", + "System.Collections.Concurrent": "4.0.0.0", "System.ComponentModel": "4.0.0.0", "System.Diagnostics.Contracts": "4.0.0.0", "System.Diagnostics.Debug": "4.0.10.0", + "System.Diagnostics.Tools": "4.0.0.0", "System.Dynamic.Runtime": "4.0.0.0", "System.Globalization": "4.0.10.0", "System.IO": "4.0.0.0", @@ -31,6 +33,7 @@ "System.Runtime.Extensions": "4.0.10.0", "System.Runtime.InteropServices": "4.0.20.0", "System.Text.Encoding": "4.0.20.0", + "System.Threading": "4.0.0.0", "System.Threading.Tasks": "4.0.10.0" } } diff --git a/src/Microsoft.AspNet.Mvc.Rendering/View/HelperResult.cs b/src/Microsoft.AspNet.Mvc.Razor/HelperResult.cs similarity index 89% rename from src/Microsoft.AspNet.Mvc.Rendering/View/HelperResult.cs rename to src/Microsoft.AspNet.Mvc.Razor/HelperResult.cs index 74f6b36991..5c8cd14189 100644 --- a/src/Microsoft.AspNet.Mvc.Rendering/View/HelperResult.cs +++ b/src/Microsoft.AspNet.Mvc.Razor/HelperResult.cs @@ -1,7 +1,7 @@ using System; using System.IO; -namespace Microsoft.AspNet.Mvc.Rendering +namespace Microsoft.AspNet.Mvc.Razor { public class HelperResult { diff --git a/src/Microsoft.AspNet.Mvc.Razor/project.json b/src/Microsoft.AspNet.Mvc.Razor/project.json index 0e60a3a081..0c3a7e3591 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/project.json +++ b/src/Microsoft.AspNet.Mvc.Razor/project.json @@ -8,7 +8,6 @@ "Common": "", "Microsoft.AspNet.Mvc.Core" : "", "Microsoft.AspNet.Mvc.ModelBinding" : "", - "Microsoft.AspNet.Mvc.Rendering" : "", "Microsoft.CodeAnalysis.Common" : "0.7-beta-*", "Microsoft.CodeAnalysis.CSharp" : "0.7-beta-*", "System.Reflection.Metadata.Ecma335": "0.7-beta-*", diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Properties/AssemblyInfo.cs b/src/Microsoft.AspNet.Mvc.Rendering/Properties/AssemblyInfo.cs deleted file mode 100644 index 1ba3c72153..0000000000 --- a/src/Microsoft.AspNet.Mvc.Rendering/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Microsoft.AspNet.Mvc.Rendering")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Microsoft.AspNet.Mvc.Rendering")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("93a358b1-7016-473f-a691-0724ae09dae2")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] - -[assembly: InternalsVisibleTo("Microsoft.AspNet.Mvc.Rendering.Test")] diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Properties/Resources.Designer.cs b/src/Microsoft.AspNet.Mvc.Rendering/Properties/Resources.Designer.cs deleted file mode 100644 index df90954f8c..0000000000 --- a/src/Microsoft.AspNet.Mvc.Rendering/Properties/Resources.Designer.cs +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - - - - - - - - - - - -// -namespace Microsoft.AspNet.Mvc.Rendering -{ - using System.Globalization; - using System.Reflection; - using System.Resources; - - internal static class Resources - { - private static readonly ResourceManager _resourceManager - = new ResourceManager("Microsoft.AspNet.Mvc.Rendering.Resources", typeof(Resources).GetTypeInfo().Assembly); - - /// - /// The argument must not be null or empty. - /// - internal static string ArgumentNullOrEmpty - { - get { return GetString("ArgumentNullOrEmpty"); } - } - - /// - /// The argument must not be null or empty. - /// - internal static string FormatArgumentNullOrEmpty() - { - return GetString("ArgumentNullOrEmpty"); - } - - /// - /// Property '{0}' must not be null. - /// - internal static string ArgumentPropertyNull - { - get { return GetString("ArgumentPropertyNull"); } - } - - /// - /// Property '{0}' must not be null. - /// - internal static string FormatArgumentPropertyNull(object p0) - { - return string.Format(CultureInfo.CurrentCulture, GetString("ArgumentPropertyNull"), p0); - } - - /// - /// Property '{0}' is of type '{1}', but this method requires a value of type '{2}'. - /// - internal static string ArgumentPropertyUnexpectedType - { - get { return GetString("ArgumentPropertyUnexpectedType"); } - } - - /// - /// Property '{0}' is of type '{1}', but this method requires a value of type '{2}'. - /// - internal static string FormatArgumentPropertyUnexpectedType(object p0, object p1, object p2) - { - return string.Format(CultureInfo.CurrentCulture, GetString("ArgumentPropertyUnexpectedType"), p0, p1, p2); - } - - /// - /// The partial view '{0}' was not found or no view engine supports the searched locations. The following locations were searched:{1} - /// - internal static string Common_PartialViewNotFound - { - get { return GetString("Common_PartialViewNotFound"); } - } - - /// - /// The partial view '{0}' was not found or no view engine supports the searched locations. The following locations were searched:{1} - /// - internal static string FormatCommon_PartialViewNotFound(object p0, object p1) - { - return string.Format(CultureInfo.CurrentCulture, GetString("Common_PartialViewNotFound"), p0, p1); - } - - /// - /// The value '{0}' is invalid. - /// - internal static string Common_ValueNotValidForProperty - { - get { return GetString("Common_ValueNotValidForProperty"); } - } - - /// - /// The value '{0}' is invalid. - /// - internal static string FormatCommon_ValueNotValidForProperty(object p0) - { - return string.Format(CultureInfo.CurrentCulture, GetString("Common_ValueNotValidForProperty"), p0); - } - - /// - /// ViewData value must not be null. - /// - internal static string DynamicViewData_ViewDataNull - { - get { return GetString("DynamicViewData_ViewDataNull"); } - } - - /// - /// ViewData value must not be null. - /// - internal static string FormatDynamicViewData_ViewDataNull() - { - return GetString("DynamicViewData_ViewDataNull"); - } - - /// - /// The expression compiler was unable to evaluate the indexer expression '{0}' because it references the model parameter '{1}' which is unavailable. - /// - internal static string ExpressionHelper_InvalidIndexerExpression - { - get { return GetString("ExpressionHelper_InvalidIndexerExpression"); } - } - - /// - /// The expression compiler was unable to evaluate the indexer expression '{0}' because it references the model parameter '{1}' which is unavailable. - /// - internal static string FormatExpressionHelper_InvalidIndexerExpression(object p0, object p1) - { - return string.Format(CultureInfo.CurrentCulture, GetString("ExpressionHelper_InvalidIndexerExpression"), p0, p1); - } - - /// - /// The IModelMetadataProvider was unable to provide metadata for expression '{0}'. - /// - internal static string HtmlHelper_NullModelMetadata - { - get { return GetString("HtmlHelper_NullModelMetadata"); } - } - - /// - /// The IModelMetadataProvider was unable to provide metadata for expression '{0}'. - /// - internal static string FormatHtmlHelper_NullModelMetadata(object p0) - { - return string.Format(CultureInfo.CurrentCulture, GetString("HtmlHelper_NullModelMetadata"), p0); - } - - /// - /// Must call 'Contextualize' method before using this HtmlHelper instance. - /// - internal static string HtmlHelper_NotContextualized - { - get { return GetString("HtmlHelper_NotContextualized"); } - } - - /// - /// Must call 'Contextualize' method before using this HtmlHelper instance. - /// - internal static string FormatHtmlHelper_NotContextualized() - { - return GetString("HtmlHelper_NotContextualized"); - } - - /// - /// Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions. - /// - internal static string TemplateHelpers_TemplateLimitations - { - get { return GetString("TemplateHelpers_TemplateLimitations"); } - } - - /// - /// Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions. - /// - internal static string FormatTemplateHelpers_TemplateLimitations() - { - return GetString("TemplateHelpers_TemplateLimitations"); - } - - /// - /// Unable to locate an appropriate template for type {0}. - /// - internal static string TemplateHelpers_NoTemplate - { - get { return GetString("TemplateHelpers_NoTemplate"); } - } - - /// - /// Unable to locate an appropriate template for type {0}. - /// - internal static string FormatTemplateHelpers_NoTemplate(object p0) - { - return string.Format(CultureInfo.CurrentCulture, GetString("TemplateHelpers_NoTemplate"), p0); - } - - /// - /// The model item passed is null, but this ViewDataDictionary instance requires a non-null model item of type '{0}'. - /// - internal static string ViewData_ModelCannotBeNull - { - get { return GetString("ViewData_ModelCannotBeNull"); } - } - - /// - /// The model item passed is null, but this ViewDataDictionary instance requires a non-null model item of type '{0}'. - /// - internal static string FormatViewData_ModelCannotBeNull(object p0) - { - return string.Format(CultureInfo.CurrentCulture, GetString("ViewData_ModelCannotBeNull"), p0); - } - - /// - /// The model item passed into the ViewDataDictionary is of type '{0}', but this ViewDataDictionary instance requires a model item of type '{1}'. - /// - internal static string ViewData_WrongTModelType - { - get { return GetString("ViewData_WrongTModelType"); } - } - - /// - /// The model item passed into the ViewDataDictionary is of type '{0}', but this ViewDataDictionary instance requires a model item of type '{1}'. - /// - internal static string FormatViewData_WrongTModelType(object p0, object p1) - { - return string.Format(CultureInfo.CurrentCulture, GetString("ViewData_WrongTModelType"), p0, p1); - } - - private static string GetString(string name, params string[] formatterNames) - { - var value = _resourceManager.GetString(name); - - System.Diagnostics.Debug.Assert(value != null); - - if (formatterNames != null) - { - for (var i = 0; i < formatterNames.Length; i++) - { - value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}"); - } - } - - return value; - } - } -} diff --git a/src/Microsoft.AspNet.Mvc.Rendering/Properties/Resources.resx b/src/Microsoft.AspNet.Mvc.Rendering/Properties/Resources.resx deleted file mode 100644 index ba0733c1eb..0000000000 --- a/src/Microsoft.AspNet.Mvc.Rendering/Properties/Resources.resx +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - The argument must not be null or empty. - - - Property '{0}' must not be null. - - - Property '{0}' is of type '{1}', but this method requires a value of type '{2}'. - - - The partial view '{0}' was not found or no view engine supports the searched locations. The following locations were searched:{1} - - - The value '{0}' is invalid. - - - ViewData value must not be null. - - - The expression compiler was unable to evaluate the indexer expression '{0}' because it references the model parameter '{1}' which is unavailable. - - - The IModelMetadataProvider was unable to provide metadata for expression '{0}'. - - - Must call 'Contextualize' method before using this HtmlHelper instance. - - - Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions. - - - Unable to locate an appropriate template for type {0}. - - - The model item passed is null, but this ViewDataDictionary instance requires a non-null model item of type '{0}'. - - - The model item passed into the ViewDataDictionary is of type '{0}', but this ViewDataDictionary instance requires a model item of type '{1}'. - - \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Rendering/TypeHelper.cs b/src/Microsoft.AspNet.Mvc.Rendering/TypeHelper.cs deleted file mode 100644 index 31aaaeeb0e..0000000000 --- a/src/Microsoft.AspNet.Mvc.Rendering/TypeHelper.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Microsoft.AspNet.Mvc.Rendering -{ - internal static class TypeHelper - { - /// - /// Given an object, adds each instance property with a public get method as a key and its - /// associated value to a dictionary. - /// - // - // The implementation of PropertyHelper will cache the property accessors per-type. This is - // faster when the the same type is used multiple times with ObjectToDictionary. - public static IDictionary ObjectToDictionary(object value) - { - var dictionary = new Dictionary(StringComparer.OrdinalIgnoreCase); - - if (value != null) - { - foreach (var helper in PropertyHelper.GetProperties(value)) - { - dictionary.Add(helper.Name, helper.GetValue(value)); - } - } - - return dictionary; - } - - } -} diff --git a/src/Microsoft.AspNet.Mvc.Rendering/project.json b/src/Microsoft.AspNet.Mvc.Rendering/project.json deleted file mode 100644 index bc423c7937..0000000000 --- a/src/Microsoft.AspNet.Mvc.Rendering/project.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "version": "0.1-alpha-*", - "dependencies": { - "Microsoft.AspNet.Abstractions": "0.1-alpha-*", - "Microsoft.AspNet.DependencyInjection": "0.1-alpha-*", - "Common": "", - "Microsoft.AspNet.Mvc.ModelBinding": "" - }, - "configurations": { - "net45": {}, - "k10": { - "dependencies": { - "Microsoft.CSharp": "4.0.0.0", - "System.Collections": "4.0.0.0", - "System.Collections.Concurrent": "4.0.0.0", - "System.ComponentModel": "4.0.0.0", - "System.Diagnostics.Contracts": "4.0.0.0", - "System.Diagnostics.Debug": "4.0.10.0", - "System.Diagnostics.Tools": "4.0.0.0", - "System.Dynamic.Runtime": "4.0.0.0", - "System.Globalization": "4.0.10.0", - "System.IO": "4.0.0.0", - "System.Linq": "4.0.0.0", - "System.Linq.Expressions": "4.0.0.0", - "System.Reflection": "4.0.10.0", - "System.Reflection.Extensions": "4.0.0.0", - "System.Resources.ResourceManager": "4.0.0.0", - "System.Runtime": "4.0.20.0", - "System.Runtime.Extensions": "4.0.10.0", - "System.Runtime.InteropServices": "4.0.20.0", - "System.Threading": "4.0.0.0", - "System.Threading.Tasks": "4.0.10.0" - } - } - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc/project.json b/src/Microsoft.AspNet.Mvc/project.json index 603eff4357..f3d270ab80 100644 --- a/src/Microsoft.AspNet.Mvc/project.json +++ b/src/Microsoft.AspNet.Mvc/project.json @@ -10,8 +10,7 @@ "Common": "", "Microsoft.AspNet.Mvc.Core": "", "Microsoft.AspNet.Mvc.Razor": "", - "Microsoft.AspNet.Mvc.ModelBinding": "", - "Microsoft.AspNet.Mvc.Rendering": "" + "Microsoft.AspNet.Mvc.ModelBinding": "" }, "configurations": { "net45": {}, diff --git a/test/Microsoft.AspNet.Mvc.Rendering.Test/PropertyHelperTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/PropertyHelperTest.cs similarity index 99% rename from test/Microsoft.AspNet.Mvc.Rendering.Test/PropertyHelperTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/PropertyHelperTest.cs index 2d561c276c..a9c7dee3f2 100644 --- a/test/Microsoft.AspNet.Mvc.Rendering.Test/PropertyHelperTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/PropertyHelperTest.cs @@ -2,7 +2,7 @@ using System.Reflection; using Xunit; -namespace Microsoft.AspNet.Mvc.Rendering +namespace Microsoft.AspNet.Mvc { public class PropertyHelperTest { diff --git a/test/Microsoft.AspNet.Mvc.Rendering.Test/HtmlAttributePropertyHelperTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlAttributePropertyHelperTest.cs similarity index 100% rename from test/Microsoft.AspNet.Mvc.Rendering.Test/HtmlAttributePropertyHelperTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlAttributePropertyHelperTest.cs diff --git a/test/Microsoft.AspNet.Mvc.Rendering.Test/ViewContextTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/ViewContextTests.cs similarity index 100% rename from test/Microsoft.AspNet.Mvc.Rendering.Test/ViewContextTests.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Rendering/ViewContextTests.cs diff --git a/test/Microsoft.AspNet.Mvc.Rendering.Test/ViewDataOfTTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/ViewDataOfTTest.cs similarity index 100% rename from test/Microsoft.AspNet.Mvc.Rendering.Test/ViewDataOfTTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/Rendering/ViewDataOfTTest.cs diff --git a/test/Microsoft.AspNet.Mvc.Rendering.Test/TypeHelperTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/TypeHelperTest.cs similarity index 98% rename from test/Microsoft.AspNet.Mvc.Rendering.Test/TypeHelperTest.cs rename to test/Microsoft.AspNet.Mvc.Core.Test/TypeHelperTest.cs index fbdecdc410..c7c5cb639f 100644 --- a/test/Microsoft.AspNet.Mvc.Rendering.Test/TypeHelperTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/TypeHelperTest.cs @@ -1,6 +1,6 @@ using Xunit; -namespace Microsoft.AspNet.Mvc.Rendering +namespace Microsoft.AspNet.Mvc { public class TypeHelperTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/project.json b/test/Microsoft.AspNet.Mvc.Core.Test/project.json index 554eee51f4..77a555ce36 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/project.json +++ b/test/Microsoft.AspNet.Mvc.Core.Test/project.json @@ -8,7 +8,6 @@ "Microsoft.AspNet.Routing": "0.1-alpha-*", "Microsoft.AspNet.Testing": "0.1-alpha-*", "Microsoft.AspNet.Mvc.ModelBinding": "", - "Microsoft.AspNet.Mvc.Rendering": "", "Microsoft.AspNet.Routing": "0.1-alpha-*", "Microsoft.AspNet.DependencyInjection" : "0.1-alpha-*", "Microsoft.AspNet.Abstractions" : "0.1-alpha-*", diff --git a/test/Microsoft.AspNet.Mvc.Razor.Test/project.json b/test/Microsoft.AspNet.Mvc.Razor.Test/project.json index 0704abb6c3..9f2c3bfd85 100644 --- a/test/Microsoft.AspNet.Mvc.Razor.Test/project.json +++ b/test/Microsoft.AspNet.Mvc.Razor.Test/project.json @@ -4,8 +4,8 @@ "Microsoft.AspNet.Abstractions": "0.1-alpha-*", "Microsoft.AspNet.FileSystems": "0.1-alpha-*", "Microsoft.AspNet.Razor": "0.1-alpha-*", + "Microsoft.AspNet.Mvc.Core" : "", "Microsoft.AspNet.Mvc.Razor" : "", - "Microsoft.AspNet.Mvc.Rendering" : "", "Microsoft.AspNet.Testing" : "0.1-alpha-*", "Xunit.KRunner": "0.1-alpha-*", "xunit.abstractions": "2.0.0-aspnet-*", diff --git a/test/Microsoft.AspNet.Mvc.Rendering.Test/project.json b/test/Microsoft.AspNet.Mvc.Rendering.Test/project.json deleted file mode 100644 index d2f461e3ae..0000000000 --- a/test/Microsoft.AspNet.Mvc.Rendering.Test/project.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "version" : "0.1-alpha-*", - "dependencies": { - "Microsoft.AspNet.Abstractions": "0.1-alpha-*", - "Microsoft.AspNet.PipelineCore": "0.1-alpha-*", - "Microsoft.AspNet.Mvc.ModelBinding" : "", - "Microsoft.AspNet.Mvc.Rendering" : "", - "Microsoft.AspNet.Testing" : "0.1-alpha-*", - "Xunit.KRunner": "0.1-alpha-*", - "xunit.abstractions": "2.0.0-aspnet-*", - "xunit.assert": "2.0.0-aspnet-*", - "xunit.core": "2.0.0-aspnet-*", - "xunit.execution": "2.0.0-aspnet-*" - }, - "commands": { - "test": "Xunit.KRunner" - }, - "configurations": { - "net45": { - "dependencies": { - "Moq": "4.2.1312.1622", - "System.Reflection": "" - } - } - } -} \ No newline at end of file