Initial commit

This commit is contained in:
2026-07-03 16:31:37 +07:00
commit 899c7c637d
1939 changed files with 641750 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
using RobotNet.VDA5050.Factsheet;
using RobotNet.VDA5050.Type;
namespace RobotNet10.RobotApp.Services.Robot.Actions;
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public class RobotActionAttribute : Attribute
{
public ActionType ActionType { get; }
public IReadOnlyList<ActionScope> ActionScopes { get; }
public IReadOnlyList<BlockingType> BlockingTypes { get; }
public string? ActionDescription { get; }
public string? ResultDescription { get; }
public RobotActionAttribute(
ActionType actionType,
ActionScope[] scopes,
BlockingType[] blockingTypes,
string? description = null,
string? resultDescription = null)
{
ArgumentNullException.ThrowIfNull(scopes);
ArgumentNullException.ThrowIfNull(blockingTypes);
if (!Enum.IsDefined(actionType))
{
throw new ArgumentException("Invalid action type.", nameof(actionType));
}
if (scopes.Length == 0)
throw new ArgumentException("Scopes cannot be empty.", nameof(scopes));
if (blockingTypes.Length == 0)
throw new ArgumentException("Blocking types cannot be empty.", nameof(blockingTypes));
ActionType = actionType;
ActionScopes = Array.AsReadOnly(scopes);
BlockingTypes = Array.AsReadOnly(blockingTypes);
ActionDescription = description;
ResultDescription = resultDescription;
}
}