4 overrides of Properties
Microsoft.AspNetCore.Grpc.Swagger (1)
Internal\GrpcModelMetadata.cs (1)
44public override ModelPropertyCollection Properties { get; }
Microsoft.AspNetCore.Mvc.Abstractions.Test (1)
ModelBinding\ModelMetadataTest.cs (1)
676public override ModelPropertyCollection Properties
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
EndpointModelMetadata.cs (1)
44public override ModelPropertyCollection Properties { get; } = new(Enumerable.Empty<ModelMetadata>());
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\Metadata\DefaultModelMetadata.cs (1)
360public override ModelPropertyCollection Properties
129 references to Properties
Microsoft.AspNetCore.Mvc.Abstractions (4)
ModelBinding\ModelMetadata.cs (4)
135return Properties; 143foreach (var metadata in Properties) 377/// <para>For example this property is used to order items in <see cref="Properties"/>.</para> 672var property = Properties.FirstOrDefault(p =>
Microsoft.AspNetCore.Mvc.ApiExplorer (2)
DefaultApiDescriptionProvider.cs (2)
594modelMetadata.Properties.Count == 0) 627var metadataProperties = modelMetadata.Properties;
Microsoft.AspNetCore.Mvc.Core (19)
ModelBinding\Binders\ComplexObjectModelBinder.cs (3)
547if (modelMetadata.Properties.Count == 0 && 578for (var i = 0; i < bindingContext.ModelMetadata.Properties.Count; i++) 580var propertyMetadata = bindingContext.ModelMetadata.Properties[i];
ModelBinding\Binders\ComplexObjectModelBinderProvider.cs (2)
29for (var i = 0; i < context.Metadata.Properties.Count; i++) 31var property = context.Metadata.Properties[i];
ModelBinding\Binders\ComplexTypeModelBinder.cs (7)
109for (var i = 0; i < modelMetadata.Properties.Count; i++) 111var property = modelMetadata.Properties[i]; 159for (var i = 0; i < modelMetadata.Properties.Count; i++) 161var property = modelMetadata.Properties[i]; 349if (bindingContext.ModelMetadata.Properties.Count == 0) 379for (var i = 0; i < bindingContext.ModelMetadata.Properties.Count; i++) 381var propertyMetadata = bindingContext.ModelMetadata.Properties[i];
ModelBinding\Binders\ComplexTypeModelBinderProvider.cs (2)
25for (var i = 0; i < context.Metadata.Properties.Count; i++) 27var property = context.Metadata.Properties[i];
ModelBinding\Binders\DictionaryModelBinder.cs (1)
159var valueMetadata = elementMetadata.Properties[nameof(KeyValuePair<TKey, TValue>.Value)]!;
ModelBinding\Binders\KeyValuePairModelBinder.cs (1)
96var propertyModelMetadata = bindingContext.ModelMetadata.Properties[propertyName]!;
ModelBinding\ModelBindingHelper.cs (2)
415for (var i = 0; i < modelMetadata.Properties.Count; i++) 417var property = modelMetadata.Properties[i];
ModelBinding\ModelMetadataProviderExtensions.cs (1)
34var propertyMetadata = containerMetadata.Properties[propertyName];
Microsoft.AspNetCore.Mvc.Core.Test (83)
ControllerBaseTest.cs (31)
2621Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Property1"])); 2622Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Property2"])); 2649Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Property1"])); 2650Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Property2"])); 2676Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Property1"])); 2677Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Property2"])); 2730Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Include1"])); 2731Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Include2"])); 2733Assert.False(context.PropertyFilter(context.ModelMetadata.Properties["Exclude1"])); 2734Assert.False(context.PropertyFilter(context.ModelMetadata.Properties["Exclude2"])); 2763Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Include1"])); 2764Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Include2"])); 2766Assert.False(context.PropertyFilter(context.ModelMetadata.Properties["Exclude1"])); 2767Assert.False(context.PropertyFilter(context.ModelMetadata.Properties["Exclude2"])); 2797Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Property1"])); 2798Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Property2"])); 2800Assert.False(context.PropertyFilter(context.ModelMetadata.Properties["Exclude1"])); 2801Assert.False(context.PropertyFilter(context.ModelMetadata.Properties["Exclude2"])); 2829Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Property1"])); 2830Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Property2"])); 2832Assert.False(context.PropertyFilter(context.ModelMetadata.Properties["Exclude1"])); 2833Assert.False(context.PropertyFilter(context.ModelMetadata.Properties["Exclude2"])); 2865var modelMetadata = context.ModelMetadata.Properties[propertyName]; 2913Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Include1"])); 2914Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Include2"])); 2916Assert.False(context.PropertyFilter(context.ModelMetadata.Properties["Exclude1"])); 2917Assert.False(context.PropertyFilter(context.ModelMetadata.Properties["Exclude2"])); 2945Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Property1"])); 2946Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Property2"])); 2973Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Property1"])); 2974Assert.True(context.PropertyFilter(context.ModelMetadata.Properties["Property2"]));
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (11)
441var binders = bindingContext.ModelMetadata.Properties.ToDictionary( 844var firstNameProperty = containerMetadata.Properties[nameof(model.FirstName)]; 847var lastNameProperty = containerMetadata.Properties[nameof(model.LastName)]; 869var propertyMetadata = metadata.Properties[nameof(model.PropertyWithDefaultValue)]; 891var propertyMetadata = metadata.Properties[nameof(model.PropertyWithInitializedValue)]; 915var propertyMetadata = metadata.Properties[nameof(model.PropertyWithInitializedValueAndDefault)]; 939var propertyMetadata = metadata.Properties[nameof(model.NonUpdateableProperty)]; 981var propertyMetadata = bindingContext.ModelMetadata.Properties[propertyName]; 1024var propertyMetadata = bindingContext.ModelMetadata.Properties[nameof(model.DateOfBirth)]; 1048var propertyMetadata = bindingContext.ModelMetadata.Properties[nameof(model.DateOfDeath)]; 1069var propertyMetadata = bindingContext.ModelMetadata.Properties[nameof(model.NameNoAttribute)];
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (14)
597var binders = bindingContext.ModelMetadata.Properties.ToDictionary( 619var binders = bindingContext.ModelMetadata.Properties.ToDictionary( 976foreach (var property in containerMetadata.Properties) 981var firstNameProperty = containerMetadata.Properties[nameof(model.FirstName)]; 984var lastNameProperty = containerMetadata.Properties[nameof(model.LastName)]; 1031var propertyMetadata = metadata.Properties[nameof(model.PropertyWithDefaultValue)]; 1053var propertyMetadata = metadata.Properties[nameof(model.PropertyWithInitializedValue)]; 1077var propertyMetadata = metadata.Properties[nameof(model.PropertyWithInitializedValueAndDefault)]; 1101var propertyMetadata = metadata.Properties[nameof(model.NonUpdateableProperty)]; 1143var propertyMetadata = bindingContext.ModelMetadata.Properties[propertyName]; 1186var propertyMetadata = bindingContext.ModelMetadata.Properties[nameof(model.DateOfBirth)]; 1210var propertyMetadata = bindingContext.ModelMetadata.Properties[nameof(model.DateOfDeath)]; 1231var propertyMetadata = bindingContext.ModelMetadata.Properties[nameof(model.NameNoAttribute)]; 1587foreach (var property in context.Metadata.Properties)
ModelBinding\Binders\DictionaryModelBinderTest.cs (2)
348{ valueMetadata.Properties["Id"], new SimpleTypeModelBinder(typeof(int), NullLoggerFactory.Instance) }, 349{ valueMetadata.Properties["Name"], new SimpleTypeModelBinder(typeof(string), NullLoggerFactory.Instance) },
ModelBinding\Metadata\DefaultModelMetadataProviderTest.cs (2)
289metadata.Properties.OrderBy(p => p.Name), 373metadata.Properties.OrderBy(p => p.Name),
ModelBinding\ModelBinderFactoryTest.cs (9)
74Assert.NotNull(c.CreateBinder(c.Metadata.Properties[nameof(Widget.Id)])); 149Assert.NotNull(c.CreateBinder(c.Metadata.Properties[nameof(Widget.Id)])); 190var binder = c.CreateBinder(c.Metadata.Properties[nameof(Employee.Manager)]); 403var binder = c.CreateBinder(c.Metadata.Properties[nameof(Widget.Id)]); 464var binder = c.CreateBinder(c.Metadata.Properties[nameof(Widget.Id)]); 528inner = c.CreateBinder(c.Metadata.Properties[nameof(Widget.Id)]); 558context.Metadata = context.Metadata.Properties[nameof(Widget.Id)]; 591inner = c.CreateBinder(c.Metadata.Properties[nameof(Widget.Id)]); 622context.Metadata = context.Metadata.Properties[nameof(Widget.Id)];
ModelBinding\Validation\ClientValidatorCacheTest.cs (2)
72var property = metadata.Properties[nameof(TestRecordType.Property1)]; 93var property = metadata.Properties[nameof(TestRecordTypeWithProperty.Property2)];
ModelBinding\Validation\DefaultComplexObjectValidationStrategyTest.cs (12)
36Assert.Same(metadata.Properties["Age"], entry.Metadata); 42Assert.Same(metadata.Properties["Id"], entry.Metadata); 48Assert.Same(metadata.Properties["Name"], entry.Metadata); 76Assert.Same(metadata.Properties["Age"], entry.Metadata); 82Assert.Same(metadata.Properties["Id"], entry.Metadata); 88Assert.Same(metadata.Properties["Name"], entry.Metadata); 110Assert.Same(metadata.Properties["Age"], entry.Metadata); 116Assert.Same(metadata.Properties["Id"], entry.Metadata); 122Assert.Same(metadata.Properties["Name"], entry.Metadata); 145Assert.Same(metadata.Properties["Age"], entry.Metadata); 151Assert.Same(metadata.Properties["Id"], entry.Metadata); 157Assert.Same(metadata.Properties["Name"], entry.Metadata);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (6)
ModelMetadataProviderTest.cs (6)
35foreach (var property in metadata.Properties) 92var property = metadata.Properties["DirectlyHidden"]; 107var property = metadata.Properties["OfHiddenType"]; 122var property = metadata.Properties["DirectlyHidden"]; 137var property = metadata.Properties["OfHiddenType"]; 795Assert.Null(metadata.Properties[propertyName]);
Microsoft.AspNetCore.Mvc.IntegrationTests (3)
ActionParametersIntegrationTest.cs (1)
1086foreach (var property in context.Metadata.Properties)
ValidationIntegrationTests.cs (1)
1547var otherProperty = parentEntry.Metadata.Properties[_otherProperty];
ValidationWithRecordIntegrationTests.cs (1)
1357var otherProperty = parentEntry.Metadata.Properties[_otherProperty];
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
NewtonsoftJsonInputFormatter.cs (1)
400var propertyMetadata = metadata.Properties[propertyName];
Microsoft.AspNetCore.Mvc.ViewFeatures (11)
DefaultDisplayTemplates.cs (1)
212var content = new HtmlContentBuilder(modelExplorer.Metadata.Properties.Count);
DefaultEditorTemplates.cs (1)
254var content = new HtmlContentBuilder(modelExplorer.Metadata.Properties.Count);
ExpressionMetadataProvider.cs (2)
102metadata = metadataProvider.GetMetadataForType(containerType).Properties[propertyName]; 177var propertyMetadata = containerMetadata.Properties[viewDataInfo.PropertyInfo.Name];
ModelExplorer.cs (3)
182var properties = metadata.Properties; 266var propertyMetadata = metadata.Properties[name]; 291var propertyMetadata = metadata.Properties[name];
ModelStateDictionaryExtensions.cs (2)
125for (var i = 0; i < modelMetadata.Properties.Count; i++) 127var property = modelMetadata.Properties[i];
ValidationHelpers.cs (2)
96for (var i = 0; i < metadata.Properties.Count; i++) 98var propertyMetadata = metadata.Properties[i];