ServicedComponent.CanBePooled 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
此方法由基礎設施在物件重新放入池中前呼叫。 覆寫此方法,投票決定該物品是否放回池中。
protected public:
virtual bool CanBePooled();
protected internal virtual bool CanBePooled();
abstract member CanBePooled : unit -> bool
override this.CanBePooled : unit -> bool
Protected Friend Overridable Function CanBePooled () As Boolean
傳回
true若服務元件可被池化;否則,。 false
範例
以下程式碼範例示範此方法的使用。
// This object can be pooled.
virtual bool CanBePooled() override
{
return (true);
}
// This object can be pooled.
protected override bool CanBePooled()
{
return(true);
}
' This object can be pooled.
Protected Overrides Function CanBePooled() As Boolean
Return True
End Function 'CanBePooled