共用方式為


LoadTestGoalBasedLoadProfile.MaxUserCount 屬性

取得或設定最大使用者計數。到達目標之後,負載便不能超過這個值。

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

語法

'宣告
Public Overrides Property MaxUserCount As Integer
public override int MaxUserCount { get; set; }
public:
virtual property int MaxUserCount {
    int get () override;
    void set (int value) override;
}
abstract MaxUserCount : int with get, set
override MaxUserCount : int with get, set
override function get MaxUserCount () : int
override function set MaxUserCount (value : int)

屬性值

型別:System.Int32
最大使用者計數。

備註

對任何 LoadTestLoadProfile 類別之任何屬性的變更,全部都應該在您將 LoadTestLoadProfile 物件指派給 LoadTestScenario 的 LoadProfile 屬性之前進行。在將 LoadTestLoadProfile 物件指派給 LoadProfile 屬性之後,該物件就會變成唯讀版本。如果您在 LoadProfile 物件處於唯讀狀態時嘗試設定它的任何屬性,便會擲回例外狀況。若要取得新的可寫入 LoadProfile 物件,請依照 LoadTestGoalBasedLoadProfile 底下範例所示,呼叫 Copy() 方法。

.NET Framework 安全性

請參閱

參考

LoadTestGoalBasedLoadProfile 類別

Microsoft.VisualStudio.TestTools.LoadTesting 命名空間