20 writes to ModelExplorer
Microsoft.AspNetCore.Mvc.Razor.Test (2)
RazorPageCreateModelExpressionTest.cs (2)
28ModelExplorer = modelExplorer, 53ModelExplorer = modelExplorer,
Microsoft.AspNetCore.Mvc.ViewFeatures (11)
TemplateBuilder.cs (1)
78viewData.ModelExplorer = _modelExplorer.GetExplorerForModel(_model);
ViewDataDictionary.cs (10)
127ModelExplorer = _metadataProvider.GetModelExplorerForType(declaredModelType, model: null); 203ModelExplorer = _metadataProvider.GetModelExplorerForType(modelOrDeclaredType, model); 208ModelExplorer = _metadataProvider.GetModelExplorerForType(modelOrDeclaredType, model); 213ModelExplorer = _metadataProvider.GetModelExplorerForType(modelType, model); 218ModelExplorer = source.ModelExplorer; 223ModelExplorer = new ModelExplorer( 450ModelExplorer = _metadataProvider.GetModelExplorerForType(modelType, value); 458ModelExplorer = _metadataProvider.GetModelExplorerForType(modelType, value); 471ModelExplorer = _metadataProvider.GetModelExplorerForType(_declaredModelType, value); 477ModelExplorer = new ModelExplorer(_metadataProvider, ModelExplorer.Container, ModelMetadata, value);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (7)
Rendering\HtmlHelperLabelExtensionsTest.cs (2)
120helper.ViewData.ModelExplorer = modelExplorer; 292helper.ViewData.ModelExplorer = provider
ViewDataDictionaryTest.cs (5)
192ModelExplorer = metadataProvider.GetModelExplorerForType(typeof(TestModel), model), 281ModelExplorer = metadataProvider.GetModelExplorerForType(sourceType, model: null), 305ModelExplorer = metadataProvider.GetModelExplorerForType(sourceType, model: null), 353ModelExplorer = explorer, 378ModelExplorer = explorer,
58 references to ModelExplorer
Microsoft.AspNetCore.Mvc.Razor.Test (3)
RazorPageCreateModelExpressionTest.cs (3)
24var modelExplorer = viewContext.ViewData.ModelExplorer.GetExplorerForProperty( 49var modelExplorer = viewContext.ViewData.ModelExplorer.GetExplorerForProperty( 110var modelExplorer = viewData.ModelExplorer;
Microsoft.AspNetCore.Mvc.ViewFeatures (17)
DefaultDisplayTemplates.cs (2)
122container: htmlHelper.ViewData.ModelExplorer, 190var modelExplorer = viewData.ModelExplorer;
DefaultEditorTemplates.cs (2)
104container: htmlHelper.ViewData.ModelExplorer, 232var modelExplorer = viewData.ModelExplorer;
ExpressionMetadataProvider.cs (5)
121return viewData.ModelExplorer.GetExplorerForExpression(metadata, modelAccessor); 147var propertyExplorer = viewData.ModelExplorer.GetExplorerForProperty(expression); 165ModelExplorer containerExplorer = viewData.ModelExplorer; 192return viewData.ModelExplorer.GetExplorerForExpression(stringMetadata, modelAccessor: null); 209return viewData.ModelExplorer;
TemplateRenderer.cs (1)
137Resources.FormatTemplateHelpers_NoTemplate(_viewData.ModelExplorer.ModelType.FullName));
ViewDataDictionary.cs (7)
215else if (object.ReferenceEquals(model, source.ModelExplorer.Model)) 218ModelExplorer = source.ModelExplorer; 225source.ModelExplorer.Container, 263return ModelExplorer.Model; 289return ModelExplorer.Metadata; 434/// Set <see cref="ModelExplorer"/> to ensure <see cref="Model"/> and <see cref="ModelExplorer.Model"/> 477ModelExplorer = new ModelExplorer(_metadataProvider, ModelExplorer.Container, ModelMetadata, value);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (38)
Rendering\DefaultTemplatesUtilities.cs (1)
311await v.Writer.WriteAsync(FormatOutput(v.ViewData.ModelExplorer));
ViewDataDictionaryOfTModelTest.cs (18)
193Assert.NotNull(viewData1.ModelExplorer); 195Assert.Equal(expectedType, viewData1.ModelExplorer.ModelType); 198Assert.NotNull(viewData2.ModelExplorer); 200Assert.Equal(expectedType, viewData2.ModelExplorer.ModelType); 254Assert.NotNull(viewData.ModelExplorer); 255Assert.NotSame(source.ModelExplorer, viewData.ModelExplorer); 277Assert.NotNull(viewData.ModelExplorer); 278Assert.NotSame(source.ModelExplorer, viewData.ModelExplorer); 281Assert.Equal(viewData.Model, viewData.ModelExplorer.Model); 296Assert.NotNull(viewData.ModelExplorer); 297Assert.NotSame(source.ModelExplorer, viewData.ModelExplorer); 318Assert.NotNull(viewData.ModelExplorer); 319Assert.Same(source.ModelExplorer, viewData.ModelExplorer); 322Assert.Equal(viewData.Model, viewData.ModelExplorer.Model);
ViewDataDictionaryTest.cs (19)
290Assert.NotSame(source.ModelExplorer, viewData.ModelExplorer); 313Assert.NotSame(source.ModelExplorer, viewData.ModelExplorer); 328var originalExplorer = viewData.ModelExplorer; 335Assert.NotNull(viewData.ModelExplorer); 337Assert.Equal(5, viewData.ModelExplorer.Model); 339Assert.NotSame(originalExplorer, viewData.ModelExplorer); 360Assert.NotNull(viewData.ModelExplorer); 362Assert.NotSame(explorer, viewData.ModelExplorer); 386Assert.NotNull(viewData.ModelExplorer); 388Assert.NotSame(explorer, viewData.ModelExplorer); 389Assert.Equal(viewData.Model, viewData.ModelExplorer.Model); 420var originalExplorer = viewData.ModelExplorer; 427Assert.NotNull(viewData.ModelExplorer); 429Assert.Equal(3, viewData.ModelExplorer.Model); 431Assert.NotSame(originalExplorer, viewData.ModelExplorer); 447var originalExplorer = viewData.ModelExplorer; 456Assert.Same(originalExplorer, viewData.ModelExplorer);