36 references to ModelType
Microsoft.AspNetCore.Mvc.Core (36)
ModelBinding\Binders\CollectionModelBinder.cs (3)
122model = CreateEmptyCollection(bindingContext.ModelType); 160model = ConvertToCollectionType(bindingContext.ModelType, boundCollection); 501var enumerableType = ClosedGenericMatcher.ExtractGenericInterface(bindingContext.ModelType, typeof(IEnumerable<>));
ModelBinding\Binders\ComplexObjectModelBinder.cs (5)
177/// <returns>An <see cref="object"/> compatible with <see cref="ModelBindingContext.ModelType"/>.</returns> 190var modelType = bindingContext.ModelType; 215.Lambda<Func<object>>(Expression.New(bindingContext.ModelType)) 742NoPublicSettableItems(logger, bindingContext.ModelName, bindingContext.ModelType); 746=> CannotBindToComplexType(logger, bindingContext.ModelType);
ModelBinding\Binders\ComplexTypeModelBinder.cs (5)
458/// <returns>An <see cref="object"/> compatible with <see cref="ModelBindingContext.ModelType"/>.</returns> 471var modelType = bindingContext.ModelType; 504.Lambda<Func<object>>(Expression.New(bindingContext.ModelType)) 575=> NoPublicSettableProperties(logger, bindingContext.ModelName, bindingContext.ModelType); 581=> CannotBindToComplexType(logger, bindingContext.ModelType);
ModelBinding\Binders\DictionaryModelBinder.cs (1)
157var model = (IDictionary<TKey, TValue?>)(result.Model ?? CreateEmptyCollection(bindingContext.ModelType));
ModelBinding\Binders\FormFileModelBinder.cs (3)
40var createFileCollection = bindingContext.ModelType == typeof(IFormFileCollection); 80if (bindingContext.ModelType == typeof(IFormFile)) 102var modelType = bindingContext.ModelType;
ModelBinding\Binders\HeaderModelBinder.cs (2)
128if (bindingContext.ModelType == typeof(string)) 173if (bindingContext.ModelType.IsAssignableFrom(typeof(string[])))
ModelBinding\Binders\KeyedServicesModelBinder.cs (2)
32keyedServices.GetKeyedService(bindingContext.ModelType, _key) : 33keyedServices.GetRequiredKeyedService(bindingContext.ModelType, _key);
ModelBinding\Binders\ServicesModelBinder.cs (2)
26requestServices.GetService(bindingContext.ModelType) : 27requestServices.GetRequiredService(bindingContext.ModelType);
ModelBinding\Binders\SimpleTypeModelBinder.cs (1)
60if (bindingContext.ModelType == typeof(string))
ModelBinding\ModelBindingHelper.cs (6)
461var modelType = bindingContext.ModelType; 505/// <see cref="ModelBindingContext.ModelType"/>. 511/// <see cref="ModelBindingContext.ModelType"/>. 523/// <see cref="ModelBindingContext.ModelType"/>. 532/// <see cref="ModelBindingContext.ModelType"/>. 545var modelType = bindingContext.ModelType;
MvcCoreLoggerExtensions.cs (6)
128bindingContext.ModelType); 136bindingContext.ModelType); 142bindingContext.ModelType); 161=> CannotBindToFilesCollectionDueToUnsupportedContentType(logger, bindingContext.ModelName, bindingContext.ModelType); 194AttemptingToBindModel(logger, bindingContext.ModelType, bindingContext.ModelName); 232DoneAttemptingToBindModel(logger, bindingContext.ModelType, bindingContext.ModelName);