52 references to Model
Microsoft.AspNetCore.Mvc.TagHelpers (6)
InputTagHelper.cs (6)
304
if (modelExplorer.
Model
!= null)
306
if (!bool.TryParse(modelExplorer.
Model
.ToString(), out _))
310
modelExplorer.
Model
.ToString(),
406
(modelExplorer.
Model
is DateTime || modelExplorer.
Model
is DateTimeOffset))
435
modelExplorer.
Model
,
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
InputTagHelperTest.cs (1)
871
modelExplorer.
Model
,
Microsoft.AspNetCore.Mvc.ViewFeatures (30)
DefaultDisplayTemplates.cs (1)
192
if (modelExplorer.
Model
== null)
DefaultEditorTemplates.cs (1)
236
if (modelExplorer.
Model
== null)
DefaultHtmlGenerator.cs (6)
201
if (modelExplorer.
Model
!= null)
203
if (bool.TryParse(modelExplorer.
Model
.ToString(), out var modelChecked))
459
var model = modelExplorer.
Model
;
639
else if (modelExplorer.
Model
!= null)
641
value = modelExplorer.
Model
.ToString();
929
rawValue = modelExplorer.
Model
;
FormatWeekHelper.cs (1)
12
var value = modelExplorer.
Model
;
ModelExplorer.cs (4)
118
/// Retrieving the <see cref="
Model
"/> object will execute the model accessor function if this
128
_model = _modelAccessor(Container.
Model
);
154
if (
Model
== null)
162
return
Model
.GetType();
ModelExplorerExtensions.cs (10)
15
/// Gets a simple display string for the <see cref="ModelExplorer.
Model
"/> property
23
/// <see cref="ModelExplorer.
Model
" /> converted to string (if the result is interesting),
37
if (propertyExplorer?.
Model
!= null)
39
return propertyExplorer.
Model
.ToString();
43
if (modelExplorer.
Model
== null)
48
if (modelExplorer.Metadata.IsEnum && modelExplorer.
Model
is Enum modelEnum)
64
var stringResult = Convert.ToString(modelExplorer.
Model
, CultureInfo.CurrentCulture);
70
if (!stringResult.Equals(modelExplorer.
Model
.GetType().FullName, StringComparison.Ordinal))
82
if (firstProperty.
Model
== null)
87
return Convert.ToString(firstProperty.
Model
, CultureInfo.CurrentCulture);
ModelExpression.cs (2)
48
public object Model => ModelExplorer.
Model
;
54
/// Getting <see cref="ModelExplorer.
Model
"/> will evaluate a compiled version of the original
TemplateBuilder.cs (1)
55
_model = modelExplorer.
Model
;
TemplateInfo.cs (1)
117
return _visitedObjects.Contains(modelExplorer.
Model
?? modelExplorer.Metadata.ModelType);
ViewDataDictionary.cs (3)
215
else if (object.ReferenceEquals(model, source.ModelExplorer.
Model
))
263
return ModelExplorer.
Model
;
434
/// Set <see cref="ModelExplorer"/> to ensure <see cref="Model"/> and <see cref="ModelExplorer.
Model
"/>
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (15)
ExpressionMetadataProviderTest.cs (7)
32
Assert.Null(explorer.
Model
);
50
Assert.Null(explorer.
Model
);
68
Assert.Null(explorer.
Model
);
90
Assert.Null(explorer.
Model
);
109
Assert.Same(myModel, metadata.Container.
Model
);
134
Assert.Null(explorer.
Model
);
152
Assert.Same(myModel, metadata.Container.
Model
);
ModelExplorerTest.cs (2)
98
var propertyValue = propertyExplorer.
Model
;
114
var propertyValue = propertyExplorer.
Model
;
Rendering\DefaultTemplatesUtilities.cs (1)
340
modelExplorer.
Model
?? "(null)",
ViewDataDictionaryOfTModelTest.cs (2)
281
Assert.Equal(viewData.Model, viewData.ModelExplorer.
Model
);
322
Assert.Equal(viewData.Model, viewData.ModelExplorer.
Model
);
ViewDataDictionaryTest.cs (3)
337
Assert.Equal(5, viewData.ModelExplorer.
Model
);
389
Assert.Equal(viewData.Model, viewData.ModelExplorer.
Model
);
429
Assert.Equal(3, viewData.ModelExplorer.
Model
);