Merge pull request #633 from tgstation/632-MoreMissingClientShit [NugetDeploy]

Add missing IByondClient List call
This commit is contained in:
Jordan Brown
2018-09-13 13:57:59 -04:00
committed by GitHub
3 changed files with 20 additions and 8 deletions
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Api;
@@ -30,9 +31,12 @@ namespace Tgstation.Server.Client.Components
}
/// <inheritdoc />
public Task<Byond> Read(CancellationToken cancellationToken) => apiClient.Read<Byond>(Routes.Byond, instance.Id, cancellationToken);
public Task<Byond> ActiveVersion(CancellationToken cancellationToken) => apiClient.Read<Byond>(Routes.Byond, instance.Id, cancellationToken);
/// <inheritdoc />
public Task<Byond> Update(Byond byond, CancellationToken cancellationToken) => apiClient.Update<Byond, Byond>(Routes.Byond, byond ?? throw new ArgumentNullException(nameof(byond)), instance.Id, cancellationToken);
public Task<IReadOnlyList<Byond>> InstalledVersions(CancellationToken cancellationToken) => apiClient.Read<IReadOnlyList<Byond>>(Routes.List(Routes.Byond), instance.Id, cancellationToken);
/// <inheritdoc />
public Task<Byond> SetActiveVersion(Byond byond, CancellationToken cancellationToken) => apiClient.Update<Byond, Byond>(Routes.Byond, byond ?? throw new ArgumentNullException(nameof(byond)), instance.Id, cancellationToken);
}
}
@@ -1,4 +1,5 @@
using System.Threading;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Api.Models;
@@ -10,11 +11,18 @@ namespace Tgstation.Server.Client.Components
public interface IByondClient
{
/// <summary>
/// Get the <see cref="Byond"/> information
/// Get the <see cref="Byond"/> active <see cref="System.Version"/> information
/// </summary>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the operation</param>
/// <returns>A <see cref="Task{TResult}"/> resulting in the <see cref="Byond"/> information</returns>
Task<Byond> Read(CancellationToken cancellationToken);
/// <returns>A <see cref="Task{TResult}"/> resulting in the <see cref="Byond"/> active <see cref="System.Version"/> information</returns>
Task<Byond> ActiveVersion(CancellationToken cancellationToken);
/// <summary>
/// Get all installed <see cref="Byond"/> <see cref="System.Version"/>s
/// </summary>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the operation</param>
/// <returns>A <see cref="Task{TResult}"/> resulting in an <see cref="IReadOnlyList{T}"/> of installed <see cref="Byond"/> <see cref="System.Version"/>s</returns>
Task<IReadOnlyList<Byond>> InstalledVersions(CancellationToken cancellationToken);
/// <summary>
/// Updates the <see cref="Byond"/> information
@@ -22,6 +30,6 @@ namespace Tgstation.Server.Client.Components
/// <param name="byond">The <see cref="Byond"/> information to update</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the operation</param>
/// <returns>A <see cref="Task{TResult}"/> resulting in the updated <see cref="Byond"/> information</returns>
Task<Byond> Update(Byond byond, CancellationToken cancellationToken);
Task<Byond> SetActiveVersion(Byond byond, CancellationToken cancellationToken);
}
}
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<DebugType>Full</DebugType>
<Version>4.0.0.0-preview9103</Version>
<Version>4.0.0.0-preview9104</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Cyberboss</Authors>
<Company>/tg/station 13</Company>