ProbeAttribute Class
Namespace: Microsoft.Modeling
Assembly: Microsoft.Xrt.Runtime (in Microsoft.Xrt.Runtime.dll)
The following example shows a probe from the Sailboat code sample.
static int x, y;
/// <summary>
/// State description, which could be represented as a probe value.
/// </summary>
[Probe]
public static string Position()
{
return string.Format("{0},{1}", x, y);
}
When applied to a method or property in a model program, the ProbeAttribute attribute creates a probe, which is state information that can be accessed when examining exploration results for the model. The name of the probe is set to the name of the member to which the Probe attribute is applied. The Probe attribute can be applied to static, parameterless methods and to static, parameterless properties that contain a get method.
The state browser in the Exploration Graph Viewer displays probes in a separate category, and you can create a view definition that uses a defined probe to change the displayed label of each state, or to hide or group states. For more information about using probes to modify the representation of an exploration graph, see View Definitions.
For more uses of probes, see Probe Attribute.
For more information about using attributes, see Extending Metadata Using Attributes.
Development Platforms
Microsoft Windows 7, Microsoft Windows Vista, Microsoft Windows XP SP2 or later, Microsoft Windows Server 2008, Microsoft Windows Server 2003