IServiceScopeFactory.CreateScope Metod

Definition

Skapa en IServiceScope som innehåller en IServiceProvider som används för att lösa beroenden från ett nyskapade omfång.

public:
 Microsoft::Extensions::DependencyInjection::IServiceScope ^ CreateScope();
public Microsoft.Extensions.DependencyInjection.IServiceScope CreateScope();
abstract member CreateScope : unit -> Microsoft.Extensions.DependencyInjection.IServiceScope
Public Function CreateScope () As IServiceScope

Returer

En IServiceScope kontroll av omfångets livslängd. När detta har tagits bort tas alla begränsade tjänster och tillfälliga tjänster som har lösts från ServiceProvider även bortskaffas.

Gäller för