1 namespace System.Web.Mvc {
3 using System.Globalization;
5 public sealed class ChildActionValueProvider : DictionaryValueProvider<object> {
7 public ChildActionValueProvider(ControllerContext controllerContext)
8 : base(controllerContext.RouteData.Values, CultureInfo.InvariantCulture) {
11 private static string _childActionValuesKey = Guid.NewGuid().ToString();
13 internal static string ChildActionValuesKey {
15 return _childActionValuesKey;
19 public override ValueProviderResult GetValue(string key) {
21 throw new ArgumentNullException("key");
24 ValueProviderResult explicitValues = base.GetValue(ChildActionValuesKey);
25 if (explicitValues != null) {
26 DictionaryValueProvider<object> rawExplicitValues = explicitValues.RawValue as DictionaryValueProvider<object>;
27 if (rawExplicitValues != null) {
28 return rawExplicitValues.GetValue(key);