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
繼承
WebPartTrackerWebPartTrackerWebPartTrackerWebPartTracker
實作

備註

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物件會在提供者 Web 組件控制項上WebPart.ConnectErrorMessage設定屬性。If a circular connection is detected, the WebPartTracker object sets the WebPart.ConnectErrorMessage property on the provider Web Parts control. IsCircularConnection屬性會true傳回。The 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)

適用於