WebPartTracker WebPartTracker WebPartTracker WebPartTracker Class


監控 Web 組件連接,找出循環連接。Monitors Web Parts connections for circular connections.

public ref class WebPartTracker sealed : IDisposable
public sealed class WebPartTracker : IDisposable
type WebPartTracker = class
    interface IDisposable
Public NotInheritable Class WebPartTracker
Implements IDisposable


Web 組件連接是連結或兩個之間的關聯WebPart(或其他伺服器或使用者) 可讓它們共用資料的控制項。A Web Parts connection is a link or association between two WebPart (or other server or user) controls that enables them to share data. 每個 Web 組件連接中,一個則做為資料,另一個為資料的取用者的提供者。In every Web Parts connection, one control acts as a provider of data and another as a consumer of data.

當 Web 組件控制項是一個提供者和取用者,並提供的資料取決於已使用的資料時,有可能會建立會導致無限迴圈 Web 組件控制項之間的連線。When a Web Parts control is both a provider and a consumer, and the provided data depends on the consumed data, there is the possibility of creating a connection that results in an infinite loop between Web Parts controls. 這些迴圈會呼叫循環的連線。These loops are called circular connections. 開發人員可以使用以避免循環連接WebPartTracker類別來追蹤連線提供者連接點和 Web 組件控制項的數目。A developer can prevent a circular connection by using the WebPartTracker class to track the number of connections for a provider connection point and a Web Parts control. 中指定的提供者連接點和控制項WebPartTracker建構函式。The provider connection point and the control are specified in the WebPartTracker constructor.

如果偵測到循環的連線時,WebPartTracker物件集WebPart.ConnectErrorMessageWeb 組件控制項的提供者的屬性。If a circular connection is detected, the WebPartTracker object sets the WebPart.ConnectErrorMessage property on the provider Web Parts control. IsCircularConnection屬性會傳回trueThe IsCircularConnection property will return true.


WebPartTracker(WebPart, ProviderConnectionPoint) WebPartTracker(WebPart, ProviderConnectionPoint) WebPartTracker(WebPart, ProviderConnectionPoint) WebPartTracker(WebPart, ProviderConnectionPoint)

初始化 WebPartTracker 類別的新執行個體。Initializes a new instance of the WebPartTracker class.


IsCircularConnection IsCircularConnection IsCircularConnection IsCircularConnection

取得值,指出提供者連接點是否包含在與 Web 組件控制項的多個連接之中。Gets a value indicating whether a provider connection point is involved in more than one connection with a Web Parts control.


IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.


Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)