Skip to content

Commit

Permalink
Implemented GetMachineReference for NaturalStateEngine
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovan Crone committed Jan 13, 2019
1 parent 3f5112b commit b5f6931
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/REstate/Natural/NaturalStateEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Task<INaturalStateMachine> GetMachineAsync(
string machineId,
CancellationToken cancellationToken = default);

INaturalStateMachine GetMachineReference(string machineId);

Task<INaturalSchematic> GetSchematicAsync(
string schematicName,
CancellationToken cancellationToken = default);
Expand Down Expand Up @@ -169,6 +171,14 @@ public async Task<INaturalStateMachine> GetMachineAsync(
return new NaturalStateMachine(machine);
}


public INaturalStateMachine GetMachineReference(string machineId)
{
var machine = _stateEngine.GetMachineReference(machineId);

return new NaturalStateMachine(machine);
}

public async Task<INaturalSchematic> GetSchematicAsync(
string schematicName,
CancellationToken cancellationToken = default)
Expand Down

0 comments on commit b5f6931

Please sign in to comment.