ServiceProviderServiceExtensions.CreateScope(IServiceProvider) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new IServiceScope that can be used to resolve scoped services.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceScope ^ CreateScope(IServiceProvider ^ provider);
public static Microsoft.Extensions.DependencyInjection.IServiceScope CreateScope (this IServiceProvider provider);
static member CreateScope : IServiceProvider -> Microsoft.Extensions.DependencyInjection.IServiceScope
<Extension()>
Public Function CreateScope (provider As IServiceProvider) As IServiceScope
Parameters
- provider
- IServiceProvider
The IServiceProvider to create the scope from.
Returns
A IServiceScope that can be used to resolve scoped services.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.