ServicedComponent.CanBePooled メソッド

定義

このメソッドは、オブジェクトがプールに戻される前に、インフラストラクチャによって呼び出されます。 オブジェクトがプールに戻されるかどうかを投票するには、このメソッドをオーバーライドします。

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

適用対象