34 references to Services
Microsoft.AspNetCore.Mvc.Abstractions (2)
ModelBinding\BindingInfo.cs (1)
188bindingInfo.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)
208metadata.BindingSource = BindingSource.Services; 217Assert.Same(BindingSource.Services, bindingInfo.BindingSource); 309Assert.Same(BindingSource.Services, bindingInfo.BindingSource);
Microsoft.AspNetCore.Mvc.ApiExplorer (2)
EndpointMetadataApiDescriptionProvider.cs (2)
177if (source == BindingSource.Services) 286return (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> 120return BindingSource.Services;
FromServicesAttribute.cs (1)
29public BindingSource BindingSource => BindingSource.Services;
ModelBinding\Binders\ServicesModelBinder.cs (1)
13/// has the binding source <see cref="BindingSource.Services"/>.
ModelBinding\Binders\ServicesModelBinderProvider.cs (1)
24context.BindingInfo.BindingSource.CanAcceptDataFrom(BindingSource.Services))
Microsoft.AspNetCore.Mvc.Core.Test (10)
ApplicationModels\DefaultApplicationModelProviderTest.cs (2)
98Assert.Equal(BindingSource.Services, property.BindingInfo.BindingSource); 150Assert.Equal(BindingSource.Services, property.BindingInfo.BindingSource);
ApplicationModels\InferParameterBindingInfoConventionTest.cs (2)
624Assert.Same(BindingSource.Services, result); 642Assert.Same(BindingSource.Services, result);
ModelBinding\Binders\ServicesModelBinderProviderTest.cs (1)
47context.BindingInfo.BindingSource = BindingSource.Services;
ModelBinding\Binders\ServicesModelBinderTest.cs (1)
36metadataProvider.ForType(modelType).BindingDetails(d => d.BindingSource = BindingSource.Services);
ModelBinding\Metadata\BindingSourceTest.cs (1)
73BindingSource.Services,
ModelBinding\ModelBinderFactoryTest.cs (3)
296BindingSource = BindingSource.Services, 310BindingSource = BindingSource.Services, 317BindingSource = BindingSource.Services,
Microsoft.AspNetCore.Mvc.IntegrationTests (10)
ServicesModelBinderIntegrationTest.cs (10)
24BindingSource = BindingSource.Services 61BindingSource = BindingSource.Services, 97BindingSource = BindingSource.Services, 133BindingSource = BindingSource.Services, 169BindingSource = BindingSource.Services, 206BindingSource = BindingSource.Services, 239BindingSource = BindingSource.Services, 275BindingSource = BindingSource.Services, 308BindingSource = BindingSource.Services, 390.BindingDetails(binding => binding.BindingSource = BindingSource.Services);
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
ApplicationModels\DefaultPageApplicationModelProviderTest.cs (1)
363Assert.Equal(BindingSource.Services, property.BindingInfo.BindingSource);