public static ModelBinderCache Basic()
        {
            var cache = new ModelBinderCache();

            cache._binders.Add(StandardModelBinder.Basic());

            return(cache);
        }
 public void SetUp()
 {
     var converterRegistry = new ValueConverterRegistry(new IConverterFamily[]{new EntityPropertyConverter()}, new ConverterLibrary());
     binder = new StandardModelBinder(
             new PropertyBinderCache(new IPropertyBinder[0], converterRegistry,
                                     new DefaultCollectionTypeProvider()),
             new TypeDescriptorCache());
 }
        public void SetUp()
        {
            theBinder = new StandardModelBinder(new BindingRegistry(), new TypeDescriptorCache());

            theRequestData = new RequestData();

            var otherDictionary = new Dictionary<string, string>();
            for (int i = 0; i < 10; i++)
            {
                otherDictionary.Add("Part" + i, Guid.NewGuid().ToString());
            }

            theRequestData.AddValues(RequestDataSource.Request, new DictionaryKeyValues(otherDictionary));

            theRouteValues = new Dictionary<string, string>();

            theRequestData.AddValues(RequestDataSource.Route.ToString(), new DictionaryKeyValues(theRouteValues));
        }
        public void SetUp()
        {
            // Lots of stuff to put together, so I'm just using a minimalistic
            // container to do it for me because I'm lazy -- JDM 2/12/2010
            IContainer container = StructureMapContainerFacility.GetBasicFubuContainer();
            binder = container.GetInstance<StandardModelBinder>();

            context = new InMemoryBindingContext();

            result = null;
        }
        public void SetUp()
        {
            theBinder = StandardModelBinder.Basic().As<StandardModelBinder>();

            theAggregateDictionary = new AggregateDictionary();

            var otherDictionary = new Dictionary<string, object>();
            for (int i = 0; i < 10; i++)
            {
                otherDictionary.Add("Part" + i, Guid.NewGuid().ToString());
            }

            theAggregateDictionary.AddDictionary(RequestDataSource.Request.ToString(), otherDictionary);

            theRouteValues = new Dictionary<string, object>();

            theAggregateDictionary.AddDictionary(RequestDataSource.Route.ToString(), theRouteValues);
        }
 public ResourcePathBinder(StandardModelBinder binder)
 {
     _binder = binder;
 }