AcceptingStateConditionAttribute Class
Indicates that a parameter-free method or Boolean property is an accepting state condition.
Namespace: Microsoft.Modeling
Assembly: Microsoft.Xrt.Runtime (in Microsoft.Xrt.Runtime.dll)
Microsoft.Modeling Namespace
Namespace: Microsoft.Modeling
Assembly: Microsoft.Xrt.Runtime (in Microsoft.Xrt.Runtime.dll)
The following example shows the use of the AcceptingStateCondition attribute. States of this model program are accepting only if the mailboxes of all clients that have ever been created are empty.
namespace Microsoft.MyModel
{
class Client
{
Sequence<object> mailbox;
[AcceptingStateCondition]
static bool AllMailDelivered()
{
return mailbox.Count == 0;
}
}
}
An accepting state is a state where a test can successfully end, leaving the system under test in a stable state.
If the target of an AcceptingStateCondition attribute is a method, it can be static or instance-based. In the latter case, the state is accepting if the condition holds for all reachable instances of the class.
For more information about using attributes, see Extending Metadata Using Attributes.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Development Platforms
Microsoft Windows 7, Microsoft Windows Vista, Microsoft Windows XP SP2 or later, Microsoft Windows Server 2008, Microsoft Windows Server 2003Reference
AcceptingStateConditionAttribute MembersMicrosoft.Modeling Namespace
Other Resources
State Attributes
Community Additions
ADD
Show: