LANCommander/LANCommander.SDK/PowerShell/Cmdlets/Get-GameManifest.cs
Pat Hartl f3708b4f3c Refactor redistributable installation
- Install now extracts the redistributable archive to the game's `.lancommander` directory, under a directory matching the redist's ID
- Scripts are downloaded and saved to the same location
- BeforeStart, AfterStop, and NameChange scripts are now available for redistributables
- Change manifest reading/writing to use async
2025-01-30 23:57:12 -06:00

23 lines
679 B
C#

using LANCommander.SDK;
using LANCommander.SDK.Helpers;
using System;
using System.Management.Automation;
namespace LANCommander.SDK.PowerShell.Cmdlets
{
[Cmdlet(VerbsCommon.Get, "GameManifest")]
[OutputType(typeof(GameManifest))]
public class GetGameManifestCmdlet : Cmdlet
{
[Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]
public string Path { get; set; }
[Parameter(Mandatory = true)]
public Guid Id { get; set; }
protected override void ProcessRecord()
{
WriteObject(ManifestHelper.Read<GameManifest>(Path, Id));
}
}
}