Class ApartmentAttribute
Marks a test that must run in a particular threading apartment state, causing it to run in a separate thread if necessary.
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class ApartmentAttribute : PropertyAttribute, IApplyToTest
- Inheritance
-
ApartmentAttribute
- Implements
- Inherited Members
Constructors
ApartmentAttribute(ApartmentState)
Construct an ApartmentAttribute
public ApartmentAttribute(ApartmentState apartmentState)
Parameters
apartmentState
ApartmentStateThe apartment state that this test must be run under. You must pass in a valid apartment state.