共用方式為


TimerResult 類別

記錄計時器的結果,測試寫入器可能會使用此結果執行部分測試。

繼承階層架構

System.Object
  Microsoft.VisualStudio.TestTools.Common.TimerResult

命名空間:  Microsoft.VisualStudio.TestTools.Common
組件:  Microsoft.VisualStudio.QualityTools.Common (在 Microsoft.VisualStudio.QualityTools.Common.dll 中)

語法

'宣告
<SerializableAttribute> _
Public Class TimerResult _
    Implements ICloneable, IXmlTestStore
[SerializableAttribute]
public class TimerResult : ICloneable, 
    IXmlTestStore
[SerializableAttribute]
public ref class TimerResult : ICloneable, 
    IXmlTestStore
[<SerializableAttribute>]
type TimerResult =  
    class
        interface ICloneable
        interface IXmlTestStore
    end
public class TimerResult implements ICloneable, IXmlTestStore

TimerResult 型別會公開下列成員。

建構函式

  名稱 說明
受保護的方法 TimerResult() 初始化 TimerResult 類別的新執行個體。
公用方法 TimerResult(String) 使用計時器結果的名稱,初始化 TimerResult類別的新執行個體。

回頁首

屬性

  名稱 說明
公用屬性 Duration 取得或設定計時器的時間間隔。
公用屬性 EndTime 新增 m_durationm_startTime,以取得結束時間。
公用屬性 Name 取得目前計時器結果物件的名稱。
公用屬性 StartTime 取得或設定計時器的開始時間。

回頁首

方法

  名稱 說明
公用方法 Clone 傳回計時器結果物件的複製品。
公用方法 Equals 判斷指定的物件是否等於目前物件。 (繼承自 Object)。
受保護的方法 Finalize 允許物件在記憶體回收進行回收之前,嘗試釋放資源並執行其他清除作業。 (繼承自 Object)。
公用方法 GetHashCode 做為特定型別的雜湊函式。 (繼承自 Object)。
公用方法 GetType 取得目前執行個體的 Type。 (繼承自 Object)。
公用方法 Load 使用提供的參數,從提供的 XML 項目載入此類別的執行個體。
受保護的方法 MemberwiseClone 建立目前 Object 的淺層複本 (Shallow Copy)。 (繼承自 Object)。
公用方法 Save 使用提供的參數,將這個物件儲存在提供的 XML 項目中。
公用方法 ToString 傳回表示目前物件的字串。 (繼承自 Object)。

回頁首

欄位

  名稱 說明
受保護的欄位 m_duration 在此計時器結果物件中設定的時間間隔。
受保護的欄位 m_name 此計時器結果物件的名稱。
受保護的欄位 m_startTime 為此計時器的結果物件設定的開始時間。
受保護的欄位 m_timeZone

回頁首

執行緒安全

這個型別的任何 Public static (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。不保證任何執行個體成員是安全執行緒。

請參閱

參考

Microsoft.VisualStudio.TestTools.Common 命名空間