Fixed: List Machine and Nuget Packages

This commit is contained in:
TheJoKlLa
2021-02-09 14:19:27 +01:00
parent d7c362773b
commit 9bee54f312
15 changed files with 2316 additions and 431 deletions

View File

@ -10,7 +10,6 @@ namespace FabAccessAPI {
#region private variables
private TcpRpcClient? _rpcClient = null;
private IBootstrap? _bootstrapCap = null;
private AuthUser? _authUser = null;
private Auth? _auth = null;
private Machines? _machines = null;
#endregion

View File

@ -31,8 +31,16 @@ namespace FabAccessAPI {
/// List of all machines that BFFH knows about the user has been granted at least read access on
/// </summary>
/// <returns>ReadOnlyList of available Machines</returns>
public async Task<IReadOnlyList<Machine>?> ListMachines() {
return (await _machinesCap.ListMachines().ConfigureAwait(false)).Select(x => new Machine(x)) as IReadOnlyList<Machine>;
public async Task<IReadOnlyList<Machine>?> ListMachines()
{
IReadOnlyList<Schema.Machine>? machineList = await _machinesCap.ListMachines().ConfigureAwait(false);
List<Machine> machineList_new = new List<Machine>();
foreach(Schema.Machine machine in machineList)
{
machineList_new.Add(new Machine(machine));
}
return machineList_new;
}
/// <summary>