Bagikan melalui


IServiceScopeFactory.CreateScope Metode

Definisi

Buat yang IServiceScope berisi yang IServiceProvider digunakan untuk mengatasi dependensi dari cakupan yang baru dibuat.

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

Mengembalikan

IServiceScope Mengontrol masa pakai cakupan. Setelah ini dibuang, layanan tercakup apa pun dan layanan sementara apa pun yang telah diselesaikan dari ServiceProvider juga akan dibuang.

Berlaku untuk