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

適用対象