OutWit.Engine.Shared
1.0.1
dotnet add package OutWit.Engine.Shared --version 1.0.1
NuGet\Install-Package OutWit.Engine.Shared -Version 1.0.1
<PackageReference Include="OutWit.Engine.Shared" Version="1.0.1" />
<PackageVersion Include="OutWit.Engine.Shared" Version="1.0.1" />
<PackageReference Include="OutWit.Engine.Shared" />
paket add OutWit.Engine.Shared --version 1.0.1
#r "nuget: OutWit.Engine.Shared, 1.0.1"
#:package OutWit.Engine.Shared@1.0.1
#addin nuget:?package=OutWit.Engine.Shared&version=1.0.1
#tool nuget:?package=OutWit.Engine.Shared&version=1.0.1
OutWit.Engine.Shared
Shared infrastructure components used by both WitEngine and WitEngineNode.
Overview
This package contains common managers, services, and utilities that are shared between the host engine (OutWit.Engine) and the compute node (OutWit.EngineNode). It provides the core infrastructure for plugin management, job processing, and resource localization.
Note
This is an internal package and is not published to nuget.org. It is used as a shared dependency between the full engine and node implementations.
Key Components
Managers
| Class | Description |
|---|---|
ControllerManager |
Central registry for activity and variable adapters from all loaded plugins |
ProcessingManager |
Executes jobs by processing activities sequentially and managing task lifecycle |
ResourcesManagerBase |
Abstract base for managing localized resources from multiple plugins |
Services
| Class | Description |
|---|---|
ResourcesService |
Provides unified access to localized strings from all registered resource dictionaries |
ServicesUtils |
Extension methods for dependency injection container operations |
Architecture
OutWit.Engine.Shared
|
+-- Managers/
| +-- ControllerManager.cs (activity/variable adapter registry)
| +-- ProcessingManager.cs (job execution engine)
| +-- ResourcesManagerBase.cs (localization base)
|
+-- Services/
+-- ResourcesService.cs (localized string access)
+-- ServicesUtils.cs (DI helper extensions)
ControllerManager
The ControllerManager is the central registry that connects parsed activities and variables to their processing implementations:
- Maintains dictionaries of activity parsers, processors, and benchmark adapters
- Provides lookup by operator type name (from
[Operator]attribute) - Delegates processing and benchmarking to the appropriate adapter
// Register adapters from loaded plugins
controllerManager.RegisterActivities(serviceCollection.GetAllTypes<IWitActivityAdapter>());
controllerManager.RegisterVariables(serviceCollection.GetAllTypes<IWitVariableAdapter>());
// Process an activity
var status = await controllerManager.Process(engineId, jobId, activity, activityStatus, pool, reportProgress);
// Run benchmark for an activity type
var benchmark = controllerManager.Benchmark<MyActivity>();
var result = await benchmark.RunBenchmark(options, cancellationToken);
ProcessingManager
The ProcessingManager handles job execution and task lifecycle:
- Schedules jobs for execution
- Processes activities sequentially within a job
- Manages cancellation, pause/resume, and progress reporting
- Tracks running tasks with their status
// Schedule and run a job
var task = processingManager.ScheduleAndRun(engineId, job);
// Wait for completion
await task.WaitAsync();
// Check result
if (task.Status.Result == WitProcessingResult.Completed)
{
// Job finished successfully
}
ServicesUtils
Extension methods for working with the dependency injection container:
// Get all registered types implementing an interface
IReadOnlyList<Type> adapterTypes = serviceCollection.GetAllTypes<IWitActivityAdapter>();
// Get all registered instances of a type
IReadOnlyList<IResources> resources = serviceCollection.GetAllInstances<IResources>();
// Find the first generic type argument matching a base type
Type? activityType = adapterType.GetFirstGenericTypeOf<IWitActivity>();
Usage in Engine and Node
Both WitEngine and WitEngineNode follow the same initialization pattern using shared components:
// 1. Create service collection
var services = new ServiceCollection();
// 2. Register shared managers
services.AddSingleton<IWitControllerManager, ControllerManager>();
services.AddSingleton<IWitProcessingManager, ProcessingManager>();
// 3. Load and initialize plugins
foreach (var controller in pluginLoader)
controller.Initialize(services);
// 4. Build service provider
var serviceProvider = services.BuildServiceProvider();
// 5. Register adapters from plugins
var controllerManager = serviceProvider.GetRequiredService<IWitControllerManager>();
controllerManager.RegisterActivities(services.GetAllTypes<IWitActivityAdapter>());
controllerManager.RegisterVariables(services.GetAllTypes<IWitVariableAdapter>());
Dependencies
- OutWit.Engine.Data
- Microsoft.Extensions.DependencyInjection
Related Packages
| Package | Description |
|---|---|
| OutWit.Engine.Interfaces | Core interfaces and contracts |
| OutWit.Engine.Data | Data models and base classes |
| OutWit.Engine | Full host engine (uses Shared) |
| OutWit.EngineNode | Compute node (uses Shared) |
| OutWit.Engine.Sdk | SDK versions (uses Shared) |
License
This software is licensed under the Non-Commercial License (NCL).
- Free for personal, educational, and research purposes
- Commercial use requires a separate license agreement
- Contact licensing@ratner.io for commercial licensing inquiries
See the full LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- OutWit.Engine.Data (>= 1.0.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on OutWit.Engine.Shared:
| Package | Downloads |
|---|---|
|
OutWit.Engine.Sdk
Limited SDK version of WitEngine for controller plugin development and testing. Provides local execution with built-in limits for development workflows. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1 | 90 | 1/16/2026 |