IServiceScope 介面
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
Dispose() 方法會結束範圍存留期。 一旦呼叫了 Dispose,就會處置已從 ServiceProvider 解析的任何範圍服務。
public interface class IServiceScope : IDisposable
C#
public interface IServiceScope : IDisposable
type IServiceScope = interface
interface IDisposable
Public Interface IServiceScope
Implements IDisposable
- 衍生
- 實作
Service |
用於從範圍解析相依性的 IServiceProvider。 |
Dispose() |
執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。 (繼承來源 IDisposable) |
產品 | 版本 |
---|---|
.NET | 6, 7, 8, 9 |
.NET Framework | 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |