LoadTestLoadProfile::CheckIfProfileCanBeModified Method (String^)
Throws an exception if the profile property is not yet ready to be modified.
Assembly: Microsoft.VisualStudio.QualityTools.LoadTestFramework (in Microsoft.VisualStudio.QualityTools.LoadTestFramework.dll)
Parameters
- propertyName
-
Type:
System::String^
The property name that you want to set.
When a test method that is called by the ILoadTestPlugin modifies the LoadTestScenario::LoadProfile property (available from the LoadTest::Scenarios property), it must first assign values to the properties of the object that is extending the LoadTestLoadProfile class before it assigns that object to the LoadTestScenario::LoadProfile. The CheckIfProfileCanBeModified method is used by the built-in implementations of LoadTestLoadProfile, and can also be used by custom implementations of LoadTestLoadProfile to guarantee this ordering. For example, it can be called in the setter for a property of a custom implementation of LoadTestLoadProfile. If the setter is called by the ILoadTestPlugin out of the required order, CheckIfProfileCanBeModified throws a LoadProfileModificationException. The string that is passed as an argument is the propertyName that the caller is trying to set, and is included in the Message property of the LoadProfileModificationException if it is thrown.