Added: IsBusy

This commit is contained in:
TheJoKlLa
2021-03-30 13:33:58 +02:00
parent 158cab6b23
commit 8d6bd2a1e4
18 changed files with 369 additions and 103 deletions

View File

@ -113,6 +113,22 @@ namespace FabAccessAPI
return writeCap.Use();
}
/// <summary>
/// Try to get a GiveBack capability for a machine.
/// </summary>
/// <returns>Capability to give back the machine or null</returns>
/// <exception cref="UnauthorizedException"></exception>
public Task<Schema.Machine.WriteInterface.IGiveBack> GetGiveBack()
{
var writeCap = _machine.Write;
if (writeCap == null)
{
throw new UnauthorizedException();
}
return writeCap.GetGiveBack();
}
/// <summary>
/// Try to reserve a machine. Throws a UnauthorizedException if the user does not have the required
/// permissions to use this machine.