IServiceScope 介面

定義

Dispose() 方法會結束範圍存留期。The Dispose() method ends the scope lifetime. 一旦呼叫了 Dispose,就會處置已從 ServiceProvider 解析的任何範圍服務。Once Dispose is called, any scoped services that have been resolved from ServiceProvider will be disposed.

public interface class IServiceScope : IDisposable
public interface IServiceScope : IDisposable
type IServiceScope = interface
    interface IDisposable
Public Interface IServiceScope
Implements IDisposable
實作

屬性

ServiceProvider

用於從範圍解析相依性的 IServiceProviderThe IServiceProvider used to resolve dependencies from the scope.

方法

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

(繼承來源 IDisposable)

適用於