/// <summary> /// Returns a standard binding context for the specified type /// </summary> /// <typeparam name="T"></typeparam> /// <param name="node"></param> /// <param name="values"></param> /// <returns></returns> private static ModelBindingContext GetBindingContext(HiveId node, IValueProvider values) { var bindingContext = new ModelBindingContext() { ModelName = string.Empty, ValueProvider = values, ModelMetadata = ModelMetadataProviders.Current.GetMetadataForType(() => node, node.GetType()), ModelState = new ModelStateDictionary(), FallbackToEmptyPrefix = true }; return(bindingContext); }
/// <summary> /// Returns a standard binding context for the specified type /// </summary> /// <typeparam name="T"></typeparam> /// <param name="node"></param> /// <param name="values"></param> /// <returns></returns> private static ModelBindingContext GetBindingContext(HiveId node, IValueProvider values) { var bindingContext = new ModelBindingContext() { ModelName = string.Empty, ValueProvider = values, ModelMetadata = ModelMetadataProviders.Current.GetMetadataForType(() => node, node.GetType()), ModelState = new ModelStateDictionary(), FallbackToEmptyPrefix = true }; return bindingContext; }