Example #1
0
        public object BindObject(string prefix, Type childType)
        {
            var resolver = Service <IObjectResolver>();
            var context  = prefixWith(prefix, _propertyStack.ToArray().Reverse());

            //need to determine if the item is in there or not since we will be greedy
            //and try to get as many items for our list as possible

            if (_requestData.HasAnyValuePrefixedWith(prefix))
            {
                var bindResult = resolver.BindModel(childType, context);
                return(bindResult.Value);
            }
            return(null);
        }
 public bool HasAnyValuePrefixedWith(string key)
 {
     return(_inner.HasAnyValuePrefixedWith(key));
 }