Merging Mvc.Rendering and Mvc.Core
This commit is contained in:
parent
652e89b343
commit
faa8251b70
21
WebFx.sln
21
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}
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given an object, adds each instance property with a public get method as a key and its
|
||||
/// associated value to a dictionary.
|
||||
/// </summary>
|
||||
//
|
||||
// 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<string, object> ObjectToDictionary(object value)
|
||||
{
|
||||
var dictionary = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
if (value != null)
|
||||
{
|
||||
foreach (var helper in PropertyHelper.GetProperties(value))
|
||||
{
|
||||
dictionary.Add(helper.Name, helper.GetValue(value));
|
||||
}
|
||||
}
|
||||
|
||||
return dictionary;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -298,6 +298,198 @@ namespace Microsoft.AspNet.Mvc.Core
|
|||
return GetString("ActionSelector_GetCandidateActionsIsAmbiguous");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The argument must not be null or empty.
|
||||
/// </summary>
|
||||
internal static string ArgumentNullOrEmpty
|
||||
{
|
||||
get { return GetString("ArgumentNullOrEmpty"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The argument must not be null or empty.
|
||||
/// </summary>
|
||||
internal static string FormatArgumentNullOrEmpty()
|
||||
{
|
||||
return GetString("ArgumentNullOrEmpty");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Property '{0}' is of type '{1}', but this method requires a value of type '{2}'.
|
||||
/// </summary>
|
||||
internal static string ArgumentPropertyUnexpectedType
|
||||
{
|
||||
get { return GetString("ArgumentPropertyUnexpectedType"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Property '{0}' is of type '{1}', but this method requires a value of type '{2}'.
|
||||
/// </summary>
|
||||
internal static string FormatArgumentPropertyUnexpectedType(object p0, object p1, object p2)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("ArgumentPropertyUnexpectedType"), p0, p1, p2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The partial view '{0}' was not found or no view engine supports the searched locations. The following locations were searched:{1}
|
||||
/// </summary>
|
||||
internal static string Common_PartialViewNotFound
|
||||
{
|
||||
get { return GetString("Common_PartialViewNotFound"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The partial view '{0}' was not found or no view engine supports the searched locations. The following locations were searched:{1}
|
||||
/// </summary>
|
||||
internal static string FormatCommon_PartialViewNotFound(object p0, object p1)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("Common_PartialViewNotFound"), p0, p1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The value '{0}' is invalid.
|
||||
/// </summary>
|
||||
internal static string Common_ValueNotValidForProperty
|
||||
{
|
||||
get { return GetString("Common_ValueNotValidForProperty"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The value '{0}' is invalid.
|
||||
/// </summary>
|
||||
internal static string FormatCommon_ValueNotValidForProperty(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("Common_ValueNotValidForProperty"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ViewData value must not be null.
|
||||
/// </summary>
|
||||
internal static string DynamicViewData_ViewDataNull
|
||||
{
|
||||
get { return GetString("DynamicViewData_ViewDataNull"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ViewData value must not be null.
|
||||
/// </summary>
|
||||
internal static string FormatDynamicViewData_ViewDataNull()
|
||||
{
|
||||
return GetString("DynamicViewData_ViewDataNull");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The expression compiler was unable to evaluate the indexer expression '{0}' because it references the model parameter '{1}' which is unavailable.
|
||||
/// </summary>
|
||||
internal static string ExpressionHelper_InvalidIndexerExpression
|
||||
{
|
||||
get { return GetString("ExpressionHelper_InvalidIndexerExpression"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The expression compiler was unable to evaluate the indexer expression '{0}' because it references the model parameter '{1}' which is unavailable.
|
||||
/// </summary>
|
||||
internal static string FormatExpressionHelper_InvalidIndexerExpression(object p0, object p1)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("ExpressionHelper_InvalidIndexerExpression"), p0, p1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The IModelMetadataProvider was unable to provide metadata for expression '{0}'.
|
||||
/// </summary>
|
||||
internal static string HtmlHelper_NullModelMetadata
|
||||
{
|
||||
get { return GetString("HtmlHelper_NullModelMetadata"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The IModelMetadataProvider was unable to provide metadata for expression '{0}'.
|
||||
/// </summary>
|
||||
internal static string FormatHtmlHelper_NullModelMetadata(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("HtmlHelper_NullModelMetadata"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Must call 'Contextualize' method before using this HtmlHelper instance.
|
||||
/// </summary>
|
||||
internal static string HtmlHelper_NotContextualized
|
||||
{
|
||||
get { return GetString("HtmlHelper_NotContextualized"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Must call 'Contextualize' method before using this HtmlHelper instance.
|
||||
/// </summary>
|
||||
internal static string FormatHtmlHelper_NotContextualized()
|
||||
{
|
||||
return GetString("HtmlHelper_NotContextualized");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.
|
||||
/// </summary>
|
||||
internal static string TemplateHelpers_TemplateLimitations
|
||||
{
|
||||
get { return GetString("TemplateHelpers_TemplateLimitations"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.
|
||||
/// </summary>
|
||||
internal static string FormatTemplateHelpers_TemplateLimitations()
|
||||
{
|
||||
return GetString("TemplateHelpers_TemplateLimitations");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unable to locate an appropriate template for type {0}.
|
||||
/// </summary>
|
||||
internal static string TemplateHelpers_NoTemplate
|
||||
{
|
||||
get { return GetString("TemplateHelpers_NoTemplate"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unable to locate an appropriate template for type {0}.
|
||||
/// </summary>
|
||||
internal static string FormatTemplateHelpers_NoTemplate(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("TemplateHelpers_NoTemplate"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The model item passed is null, but this ViewDataDictionary instance requires a non-null model item of type '{0}'.
|
||||
/// </summary>
|
||||
internal static string ViewData_ModelCannotBeNull
|
||||
{
|
||||
get { return GetString("ViewData_ModelCannotBeNull"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The model item passed is null, but this ViewDataDictionary instance requires a non-null model item of type '{0}'.
|
||||
/// </summary>
|
||||
internal static string FormatViewData_ModelCannotBeNull(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("ViewData_ModelCannotBeNull"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The model item passed into the ViewDataDictionary is of type '{0}', but this ViewDataDictionary instance requires a model item of type '{1}'.
|
||||
/// </summary>
|
||||
internal static string ViewData_WrongTModelType
|
||||
{
|
||||
get { return GetString("ViewData_WrongTModelType"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The model item passed into the ViewDataDictionary is of type '{0}', but this ViewDataDictionary instance requires a model item of type '{1}'.
|
||||
/// </summary>
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
@ -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
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
@ -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<TModel>;
|
||||
|
|
@ -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
|
||||
{
|
||||
|
|
@ -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
|
||||
{
|
||||
|
|
@ -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
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Dynamic;
|
||||
using Microsoft.AspNet.Mvc.Core;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.Rendering
|
||||
{
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Microsoft.AspNet.Mvc.Core;
|
||||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.Rendering
|
||||
|
|
@ -171,4 +171,40 @@
|
|||
<data name="ActionSelector_GetCandidateActionsIsAmbiguous" xml:space="preserve">
|
||||
<value>The supplied route values are ambiguous and can select multiple sets of actions.</value>
|
||||
</data>
|
||||
<data name="ArgumentNullOrEmpty" xml:space="preserve">
|
||||
<value>The argument must not be null or empty.</value>
|
||||
</data>
|
||||
<data name="ArgumentPropertyUnexpectedType" xml:space="preserve">
|
||||
<value>Property '{0}' is of type '{1}', but this method requires a value of type '{2}'.</value>
|
||||
</data>
|
||||
<data name="Common_PartialViewNotFound" xml:space="preserve">
|
||||
<value>The partial view '{0}' was not found or no view engine supports the searched locations. The following locations were searched:{1}</value>
|
||||
</data>
|
||||
<data name="Common_ValueNotValidForProperty" xml:space="preserve">
|
||||
<value>The value '{0}' is invalid.</value>
|
||||
</data>
|
||||
<data name="DynamicViewData_ViewDataNull" xml:space="preserve">
|
||||
<value>ViewData value must not be null.</value>
|
||||
</data>
|
||||
<data name="ExpressionHelper_InvalidIndexerExpression" xml:space="preserve">
|
||||
<value>The expression compiler was unable to evaluate the indexer expression '{0}' because it references the model parameter '{1}' which is unavailable.</value>
|
||||
</data>
|
||||
<data name="HtmlHelper_NullModelMetadata" xml:space="preserve">
|
||||
<value>The IModelMetadataProvider was unable to provide metadata for expression '{0}'.</value>
|
||||
</data>
|
||||
<data name="HtmlHelper_NotContextualized" xml:space="preserve">
|
||||
<value>Must call 'Contextualize' method before using this HtmlHelper instance.</value>
|
||||
</data>
|
||||
<data name="TemplateHelpers_TemplateLimitations" xml:space="preserve">
|
||||
<value>Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.</value>
|
||||
</data>
|
||||
<data name="TemplateHelpers_NoTemplate" xml:space="preserve">
|
||||
<value>Unable to locate an appropriate template for type {0}.</value>
|
||||
</data>
|
||||
<data name="ViewData_ModelCannotBeNull" xml:space="preserve">
|
||||
<value>The model item passed is null, but this ViewDataDictionary instance requires a non-null model item of type '{0}'.</value>
|
||||
</data>
|
||||
<data name="ViewData_WrongTModelType" xml:space="preserve">
|
||||
<value>The model item passed into the ViewDataDictionary is of type '{0}', but this ViewDataDictionary instance requires a model item of type '{1}'.</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.Rendering
|
||||
namespace Microsoft.AspNet.Mvc.Razor
|
||||
{
|
||||
public class HelperResult
|
||||
{
|
||||
|
|
@ -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-*",
|
||||
|
|
|
|||
|
|
@ -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")]
|
||||
|
|
@ -1,255 +0,0 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// <auto-generated />
|
||||
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);
|
||||
|
||||
/// <summary>
|
||||
/// The argument must not be null or empty.
|
||||
/// </summary>
|
||||
internal static string ArgumentNullOrEmpty
|
||||
{
|
||||
get { return GetString("ArgumentNullOrEmpty"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The argument must not be null or empty.
|
||||
/// </summary>
|
||||
internal static string FormatArgumentNullOrEmpty()
|
||||
{
|
||||
return GetString("ArgumentNullOrEmpty");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Property '{0}' must not be null.
|
||||
/// </summary>
|
||||
internal static string ArgumentPropertyNull
|
||||
{
|
||||
get { return GetString("ArgumentPropertyNull"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Property '{0}' must not be null.
|
||||
/// </summary>
|
||||
internal static string FormatArgumentPropertyNull(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("ArgumentPropertyNull"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Property '{0}' is of type '{1}', but this method requires a value of type '{2}'.
|
||||
/// </summary>
|
||||
internal static string ArgumentPropertyUnexpectedType
|
||||
{
|
||||
get { return GetString("ArgumentPropertyUnexpectedType"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Property '{0}' is of type '{1}', but this method requires a value of type '{2}'.
|
||||
/// </summary>
|
||||
internal static string FormatArgumentPropertyUnexpectedType(object p0, object p1, object p2)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("ArgumentPropertyUnexpectedType"), p0, p1, p2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The partial view '{0}' was not found or no view engine supports the searched locations. The following locations were searched:{1}
|
||||
/// </summary>
|
||||
internal static string Common_PartialViewNotFound
|
||||
{
|
||||
get { return GetString("Common_PartialViewNotFound"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The partial view '{0}' was not found or no view engine supports the searched locations. The following locations were searched:{1}
|
||||
/// </summary>
|
||||
internal static string FormatCommon_PartialViewNotFound(object p0, object p1)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("Common_PartialViewNotFound"), p0, p1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The value '{0}' is invalid.
|
||||
/// </summary>
|
||||
internal static string Common_ValueNotValidForProperty
|
||||
{
|
||||
get { return GetString("Common_ValueNotValidForProperty"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The value '{0}' is invalid.
|
||||
/// </summary>
|
||||
internal static string FormatCommon_ValueNotValidForProperty(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("Common_ValueNotValidForProperty"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ViewData value must not be null.
|
||||
/// </summary>
|
||||
internal static string DynamicViewData_ViewDataNull
|
||||
{
|
||||
get { return GetString("DynamicViewData_ViewDataNull"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ViewData value must not be null.
|
||||
/// </summary>
|
||||
internal static string FormatDynamicViewData_ViewDataNull()
|
||||
{
|
||||
return GetString("DynamicViewData_ViewDataNull");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The expression compiler was unable to evaluate the indexer expression '{0}' because it references the model parameter '{1}' which is unavailable.
|
||||
/// </summary>
|
||||
internal static string ExpressionHelper_InvalidIndexerExpression
|
||||
{
|
||||
get { return GetString("ExpressionHelper_InvalidIndexerExpression"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The expression compiler was unable to evaluate the indexer expression '{0}' because it references the model parameter '{1}' which is unavailable.
|
||||
/// </summary>
|
||||
internal static string FormatExpressionHelper_InvalidIndexerExpression(object p0, object p1)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("ExpressionHelper_InvalidIndexerExpression"), p0, p1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The IModelMetadataProvider was unable to provide metadata for expression '{0}'.
|
||||
/// </summary>
|
||||
internal static string HtmlHelper_NullModelMetadata
|
||||
{
|
||||
get { return GetString("HtmlHelper_NullModelMetadata"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The IModelMetadataProvider was unable to provide metadata for expression '{0}'.
|
||||
/// </summary>
|
||||
internal static string FormatHtmlHelper_NullModelMetadata(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("HtmlHelper_NullModelMetadata"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Must call 'Contextualize' method before using this HtmlHelper instance.
|
||||
/// </summary>
|
||||
internal static string HtmlHelper_NotContextualized
|
||||
{
|
||||
get { return GetString("HtmlHelper_NotContextualized"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Must call 'Contextualize' method before using this HtmlHelper instance.
|
||||
/// </summary>
|
||||
internal static string FormatHtmlHelper_NotContextualized()
|
||||
{
|
||||
return GetString("HtmlHelper_NotContextualized");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.
|
||||
/// </summary>
|
||||
internal static string TemplateHelpers_TemplateLimitations
|
||||
{
|
||||
get { return GetString("TemplateHelpers_TemplateLimitations"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.
|
||||
/// </summary>
|
||||
internal static string FormatTemplateHelpers_TemplateLimitations()
|
||||
{
|
||||
return GetString("TemplateHelpers_TemplateLimitations");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unable to locate an appropriate template for type {0}.
|
||||
/// </summary>
|
||||
internal static string TemplateHelpers_NoTemplate
|
||||
{
|
||||
get { return GetString("TemplateHelpers_NoTemplate"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unable to locate an appropriate template for type {0}.
|
||||
/// </summary>
|
||||
internal static string FormatTemplateHelpers_NoTemplate(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("TemplateHelpers_NoTemplate"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The model item passed is null, but this ViewDataDictionary instance requires a non-null model item of type '{0}'.
|
||||
/// </summary>
|
||||
internal static string ViewData_ModelCannotBeNull
|
||||
{
|
||||
get { return GetString("ViewData_ModelCannotBeNull"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The model item passed is null, but this ViewDataDictionary instance requires a non-null model item of type '{0}'.
|
||||
/// </summary>
|
||||
internal static string FormatViewData_ModelCannotBeNull(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("ViewData_ModelCannotBeNull"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The model item passed into the ViewDataDictionary is of type '{0}', but this ViewDataDictionary instance requires a model item of type '{1}'.
|
||||
/// </summary>
|
||||
internal static string ViewData_WrongTModelType
|
||||
{
|
||||
get { return GetString("ViewData_WrongTModelType"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The model item passed into the ViewDataDictionary is of type '{0}', but this ViewDataDictionary instance requires a model item of type '{1}'.
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,159 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ArgumentNullOrEmpty" xml:space="preserve">
|
||||
<value>The argument must not be null or empty.</value>
|
||||
</data>
|
||||
<data name="ArgumentPropertyNull" xml:space="preserve">
|
||||
<value>Property '{0}' must not be null.</value>
|
||||
</data>
|
||||
<data name="ArgumentPropertyUnexpectedType" xml:space="preserve">
|
||||
<value>Property '{0}' is of type '{1}', but this method requires a value of type '{2}'.</value>
|
||||
</data>
|
||||
<data name="Common_PartialViewNotFound" xml:space="preserve">
|
||||
<value>The partial view '{0}' was not found or no view engine supports the searched locations. The following locations were searched:{1}</value>
|
||||
</data>
|
||||
<data name="Common_ValueNotValidForProperty" xml:space="preserve">
|
||||
<value>The value '{0}' is invalid.</value>
|
||||
</data>
|
||||
<data name="DynamicViewData_ViewDataNull" xml:space="preserve">
|
||||
<value>ViewData value must not be null.</value>
|
||||
</data>
|
||||
<data name="ExpressionHelper_InvalidIndexerExpression" xml:space="preserve">
|
||||
<value>The expression compiler was unable to evaluate the indexer expression '{0}' because it references the model parameter '{1}' which is unavailable.</value>
|
||||
</data>
|
||||
<data name="HtmlHelper_NullModelMetadata" xml:space="preserve">
|
||||
<value>The IModelMetadataProvider was unable to provide metadata for expression '{0}'.</value>
|
||||
</data>
|
||||
<data name="HtmlHelper_NotContextualized" xml:space="preserve">
|
||||
<value>Must call 'Contextualize' method before using this HtmlHelper instance.</value>
|
||||
</data>
|
||||
<data name="TemplateHelpers_TemplateLimitations" xml:space="preserve">
|
||||
<value>Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.</value>
|
||||
</data>
|
||||
<data name="TemplateHelpers_NoTemplate" xml:space="preserve">
|
||||
<value>Unable to locate an appropriate template for type {0}.</value>
|
||||
</data>
|
||||
<data name="ViewData_ModelCannotBeNull" xml:space="preserve">
|
||||
<value>The model item passed is null, but this ViewDataDictionary instance requires a non-null model item of type '{0}'.</value>
|
||||
</data>
|
||||
<data name="ViewData_WrongTModelType" xml:space="preserve">
|
||||
<value>The model item passed into the ViewDataDictionary is of type '{0}', but this ViewDataDictionary instance requires a model item of type '{1}'.</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.Rendering
|
||||
{
|
||||
internal static class TypeHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// Given an object, adds each instance property with a public get method as a key and its
|
||||
/// associated value to a dictionary.
|
||||
/// </summary>
|
||||
//
|
||||
// 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<string, object> ObjectToDictionary(object value)
|
||||
{
|
||||
var dictionary = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
if (value != null)
|
||||
{
|
||||
foreach (var helper in PropertyHelper.GetProperties(value))
|
||||
{
|
||||
dictionary.Add(helper.Name, helper.GetValue(value));
|
||||
}
|
||||
}
|
||||
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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": {},
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
using System.Reflection;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.Rendering
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
public class PropertyHelperTest
|
||||
{
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.Rendering
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
public class TypeHelperTest
|
||||
{
|
||||
|
|
@ -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-*",
|
||||
|
|
|
|||
|
|
@ -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-*",
|
||||
|
|
|
|||
|
|
@ -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": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue