RateLimitLease 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
實作中返還 RateLimiter 的租約抽象化。 租約代表取得資源的成功或失敗,並包含與取得作業相關的潛在元資料。
public ref class RateLimitLease abstract : IDisposable
public abstract class RateLimitLease : IDisposable
type RateLimitLease = class
interface IDisposable
Public MustInherit Class RateLimitLease
Implements IDisposable
- 繼承
-
RateLimitLease
- 實作
建構函式
| 名稱 | Description |
|---|---|
| RateLimitLease() |
實作中返還 RateLimiter 的租約抽象化。 租約代表取得資源的成功或失敗,並包含與取得作業相關的潛在元資料。 |
屬性
| 名稱 | Description |
|---|---|
| IsAcquired |
代表租約取得是否成功。 |
| MetadataNames |
會取得租約上可用的元資料名稱清單。 |
方法
| 名稱 | Description |
|---|---|
| Dispose() |
處理租約。 這可能會釋放租約所屬限制器實作的空間。 |
| Dispose(Boolean) |
為實作撰寫的 Dispose 方法。 |
| GetAllMetadata() |
會取得租約上所有可用的元資料清單。 |
| TryGetMetadata(String, Object) |
嘗試擷取租約的元資料。 |
| TryGetMetadata<T>(MetadataName<T>, T) |
嘗試為租約擷取強型別的元資料。 |