# OpcStateMachineTransitionsAttribute Members

> Reference: Defines unique transitions that a custom OpcStateMachineNode can perform using an enumeration type.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcStateMachineTransitionsAttribute</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
</dl>

Inherits members from [Attribute](https://learn.microsoft.com/dotnet/api/system.attribute).

## Constructors

### OpcStateMachineTransitionsAttribute

Initializes a new instance of the [OpcStateMachineTransitionsAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionsattribute/) class using the specified `statesType`.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStateMachineTransitionsAttribute(Type statesType)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Sub New(statesType As Type)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `statesType` | [Type](https://learn.microsoft.com/dotnet/api/system.type) | The enumeration [Type](https://learn.microsoft.com/dotnet/api/system.type) which defines the states used as the possible 'from' and 'to' states of the transitions to define. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `statesType` is not an enumeration type. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `statesType` is a null reference (Nothing in Visual Basic). |

## Properties

### IsLoop

Gets or sets a value indicating whether the states defined in the [StatesType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionsattribute/members#statestype) can be reached in a loop.

<div class="api-signature" data-lang="csharp">

```csharp
public bool IsLoop { get; set; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Property IsLoop As Boolean
```

</div>

**Property value**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if the states defined in the [StatesType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionsattribute/members#statestype) can be reached in a loop; otherwise the value false.

**Remarks**

The transitions defined for a loop of states result into a state machine which can re-enter the first state after reaching the last state defined in the [StatesType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionsattribute/members#statestype).

### StatesType

Gets the [Type](https://learn.microsoft.com/dotnet/api/system.type) which defines the different states used as the possible 'from' and 'to' states of the transitions to define.

<div class="api-signature" data-lang="csharp">

```csharp
public Type StatesType { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public ReadOnly Property StatesType As Type
```

</div>

**Property value**

[Type](https://learn.microsoft.com/dotnet/api/system.type)

An enumeration [Type](https://learn.microsoft.com/dotnet/api/system.type) used to define the different transitions.
