ServicedComponent.CanBePooled Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This method is called by the infrastructure before the object is put back into the pool. Override this method to vote on whether the object is put back into the pool.
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
Returns
true
if the serviced component can be pooled; otherwise, false
.
Examples
The following code example demonstrates the use of this method.
// 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
Applies to
ทํางานร่วมกับเราใน GitHub
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา