Initial commit
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
using System.Collections.Immutable;
|
||||
|
||||
namespace RobotNet10.FleetManager.Script.Shared;
|
||||
|
||||
/// <summary>
|
||||
/// Provides configuration resources for the FleetManager ScriptEngine.
|
||||
/// Defines the global type, namespaces, modules, and documentation modules available to scripts.
|
||||
/// </summary>
|
||||
public class FleetManagerScriptEngineResource
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the global type that will be exposed to scripts as the entry point for FleetManager APIs.
|
||||
/// </summary>
|
||||
public static readonly Type GlobalType = typeof(IFleetManagerScriptGlobals);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the collection of namespaces that are automatically imported in scripts.
|
||||
/// These namespaces are available without explicit using statements.
|
||||
/// </summary>
|
||||
public static readonly ImmutableArray<string> UsingNamespaces = [
|
||||
"System",
|
||||
"System.Collections.Generic",
|
||||
"System.Threading",
|
||||
"System.Threading.Tasks",
|
||||
"System.Runtime.CompilerServices",
|
||||
"RobotNet10.FleetManager.Script",
|
||||
"RobotNet10.Script",
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
/// Gets the collection of assembly modules that are loaded and available to scripts.
|
||||
/// These modules provide the runtime types and functionality accessible from scripts.
|
||||
/// </summary>
|
||||
public static readonly ImmutableArray<string> Modules = [
|
||||
"System.Runtime",
|
||||
"System.Collections",
|
||||
"System.Private.CoreLib",
|
||||
"RobotNet10.FleetManager.Script",
|
||||
"RobotNet10.Script",
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
/// Gets the collection of XML documentation module files used for IntelliSense and code completion in scripts.
|
||||
/// These documentation files provide type information and method descriptions to script editors.
|
||||
/// </summary>
|
||||
public static readonly ImmutableArray<string> DocModules = [
|
||||
"System.Runtime.xml",
|
||||
"System.Collections.xml",
|
||||
//"System.Private.CoreLib.xml",
|
||||
"RobotNet10.FleetManager.Script.xml",
|
||||
"RobotNet10.Script.xml",
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
namespace RobotNet10.FleetManager.Script.Shared;
|
||||
|
||||
/// <summary>
|
||||
/// Provides global APIs exposed to FleetManager scripts for robot management and layout access.
|
||||
/// This interface defines the entry point for scripts to interact with the FleetManager system.
|
||||
/// </summary>
|
||||
public interface IFleetManagerScriptGlobals
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the robot management service that provides methods to retrieve, query, and control robots in the fleet.
|
||||
/// </summary>
|
||||
IRobotManager RobotManager { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the layout management service that provides methods to access map elements (nodes, stations) and actions.
|
||||
/// </summary>
|
||||
ILayoutManager LayoutManager { get; }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\RobotNet10.FleetManager.Script\RobotNet10.FleetManager.Script.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user