Add Unity Pipeline package support

This commit is contained in:
ud18010
2026-07-31 17:34:04 +08:00
parent d1a526094e
commit 786b7ffff9
590 changed files with 51995 additions and 2 deletions
@@ -0,0 +1,55 @@
using System;
namespace Unity.Pipeline.Commands
{
/// <summary>
/// Information about a CLI command parameter.
/// Contains metadata needed for parameter validation and CLI help generation.
/// </summary>
public class CommandParameterInfo
{
/// <summary>
/// Name of the parameter for CLI arguments.
/// </summary>
public string Name { get; }
/// <summary>
/// Human-readable description of the parameter.
/// </summary>
public string Description { get; }
/// <summary>
/// Whether this parameter is required for command execution.
/// </summary>
public bool Required { get; }
/// <summary>
/// Type of the parameter for validation and conversion.
/// </summary>
public Type ParameterType { get; }
/// <summary>
/// Default value for optional parameters.
/// </summary>
public object DefaultValue { get; }
/// <summary>
/// Create parameter information from discovery.
/// </summary>
public CommandParameterInfo(string name, string description, bool required,
Type parameterType, object defaultValue = null)
{
Name = name ?? throw new ArgumentNullException(nameof(name));
Description = description ?? throw new ArgumentNullException(nameof(description));
ParameterType = parameterType ?? throw new ArgumentNullException(nameof(parameterType));
Required = required;
DefaultValue = defaultValue;
}
public override string ToString()
{
return $"{Name} Required:{Required} Type:{ParameterType}";
}
}
}