Class ApartmentAttribute
Marks a test as needing to be run in a particular threading apartment state. This will cause it to run in a separate thread if necessary.
Implements
Inherited Members
Namespace: NUnit.Framework
Assembly: nunit.framework.dll
Syntax
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class ApartmentAttribute : PropertyAttribute, IApplyToTest
Constructors
View SourceApartmentAttribute(ApartmentState)
Construct an ApartmentAttribute
Declaration
public ApartmentAttribute(ApartmentState apartmentState)
Parameters
Type | Name | Description |
---|---|---|
ApartmentState | apartmentState | The apartment state that this test must be run under. You must pass in a valid apartment state. |