34 references to Services
Microsoft.AspNetCore.Mvc.Abstractions (2)
ModelBinding\BindingInfo.cs (1)
188
bindingInfo.BindingSource = BindingSource.
Services
;
ModelBinding\BindingSource.cs (1)
161
/// Some sources (like <see cref="BindingSource.
Services
"/>) are based on application state and not user
Microsoft.AspNetCore.Mvc.Abstractions.Test (3)
ModelBinding\BindingInfoTest.cs (3)
208
metadata.BindingSource = BindingSource.
Services
;
217
Assert.Same(BindingSource.
Services
, bindingInfo.BindingSource);
309
Assert.Same(BindingSource.
Services
, bindingInfo.BindingSource);
Microsoft.AspNetCore.Mvc.ApiExplorer (2)
EndpointMetadataApiDescriptionProvider.cs (2)
177
if (source == BindingSource.
Services
)
286
return (BindingSource.
Services
, parameter.Name ?? string.Empty, false, parameterType);
Microsoft.AspNetCore.Mvc.Core (6)
ApiBehaviorOptions.cs (1)
43
/// Parameters that are complex (<see cref="ModelMetadata.IsComplexType"/>) and are registered in the DI Container (<see cref="IServiceCollection"/>) are assumed to be bound from the services <see cref="BindingSource.
Services
"/>, unless this
ApplicationModels\InferParameterBindingInfoConvention.cs (2)
20
/// <item>A complex type parameter (<see cref="ModelMetadata.IsComplexType"/>), registered in the DI container, is assigned <see cref="BindingSource.
Services
"/>.</item>
120
return BindingSource.
Services
;
FromServicesAttribute.cs (1)
29
public BindingSource BindingSource => BindingSource.
Services
;
ModelBinding\Binders\ServicesModelBinder.cs (1)
13
/// has the binding source <see cref="BindingSource.
Services
"/>.
ModelBinding\Binders\ServicesModelBinderProvider.cs (1)
24
context.BindingInfo.BindingSource.CanAcceptDataFrom(BindingSource.
Services
))
Microsoft.AspNetCore.Mvc.Core.Test (10)
ApplicationModels\DefaultApplicationModelProviderTest.cs (2)
98
Assert.Equal(BindingSource.
Services
, property.BindingInfo.BindingSource);
150
Assert.Equal(BindingSource.
Services
, property.BindingInfo.BindingSource);
ApplicationModels\InferParameterBindingInfoConventionTest.cs (2)
624
Assert.Same(BindingSource.
Services
, result);
642
Assert.Same(BindingSource.
Services
, result);
ModelBinding\Binders\ServicesModelBinderProviderTest.cs (1)
47
context.BindingInfo.BindingSource = BindingSource.
Services
;
ModelBinding\Binders\ServicesModelBinderTest.cs (1)
36
metadataProvider.ForType(modelType).BindingDetails(d => d.BindingSource = BindingSource.
Services
);
ModelBinding\Metadata\BindingSourceTest.cs (1)
73
BindingSource.
Services
,
ModelBinding\ModelBinderFactoryTest.cs (3)
296
BindingSource = BindingSource.
Services
,
310
BindingSource = BindingSource.
Services
,
317
BindingSource = BindingSource.
Services
,
Microsoft.AspNetCore.Mvc.IntegrationTests (10)
ServicesModelBinderIntegrationTest.cs (10)
24
BindingSource = BindingSource.
Services
61
BindingSource = BindingSource.
Services
,
97
BindingSource = BindingSource.
Services
,
133
BindingSource = BindingSource.
Services
,
169
BindingSource = BindingSource.
Services
,
206
BindingSource = BindingSource.
Services
,
239
BindingSource = BindingSource.
Services
,
275
BindingSource = BindingSource.
Services
,
308
BindingSource = BindingSource.
Services
,
390
.BindingDetails(binding => binding.BindingSource = BindingSource.
Services
);
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
ApplicationModels\DefaultPageApplicationModelProviderTest.cs (1)
363
Assert.Equal(BindingSource.
Services
, property.BindingInfo.BindingSource);