LoadTestConstantLoadProfile.UserCount 屬性
取得或設定使用固定負載模式的情況下的虛擬使用者數目。
命名空間: Microsoft.VisualStudio.TestTools.LoadTesting
組件: Microsoft.VisualStudio.QualityTools.LoadTestFramework (在 Microsoft.VisualStudio.QualityTools.LoadTestFramework.dll 中)
語法
'宣告
Public Property UserCount As Integer
public int UserCount { get; set; }
public:
property int UserCount {
int get ();
void set (int value);
}
member UserCount : int with get, set
function get UserCount () : int
function set UserCount (value : int)
屬性值
類型:Int32
備註
對於任何 LoadTestLoadProfile 類別之任何屬性的變更,都應該在將 LoadTestLoadProfile 物件指派至 LoadTestScenario 的 LoadProfile 屬性之前進行。 將 LoadTestLoadProfile 物件指派給 LoadProfile 屬性之後,它會變成唯讀版本。 如果您在 LoadProfile 物件處於唯讀狀態時嘗試設定它的任何一個屬性,便會擲回例外狀況。 若要取得新的可寫入 LoadProfile 物件,請依照 LoadTestGoalBasedLoadProfile 底下範例所示,呼叫 Copy() 方法。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。