LANCommander/LANCommander.PowerShell/Cmdlets/Get-GameManifest.cs

24 lines
661 B
C#
Raw Permalink Normal View History

using LANCommander.SDK;
using LANCommander.SDK.Helpers;
using System;
using System.Management.Automation;
namespace LANCommander.PowerShell.Cmdlets
{
[Cmdlet(VerbsCommon.Get, "GameManifest")]
[OutputType(typeof(GameManifest))]
2023-11-16 15:21:50 -06:00
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(Path, Id));
}
}
}