Class ScyllaModuleDependency
Declares a single dependency from one Scylla module onto another, specifying the target module by ID, the ScyllaModuleDependencyType that governs enforcement behavior, and an optional minimum version constraint.
Inherited Members
Namespace: Scylla.Core.Modules
Assembly: ScyllaCore.dll
Syntax
public sealed class ScyllaModuleDependency
Remarks
Instances are created by module authors and collected into the
dependencies list passed to the ScyllaModuleInfo
constructor. The framework reads these declarations during
ValidateAllDependencies() and
InitializeAllModules().
Declaring a hard dependency on Input (version >= 1.0.0) and a soft dependency on UI with no version constraint:
var deps = new List<ScyllaModuleDependency>
{
new ScyllaModuleDependency(ScyllaModuleID.INPUT, ScyllaModuleDependencyType.Hard, "1.0.0"),
new ScyllaModuleDependency(ScyllaModuleID.UI, ScyllaModuleDependencyType.Soft)
};
Constructors
ScyllaModuleDependency(string, ScyllaModuleDependencyType, string)
Initializes a new ScyllaModuleDependency that declares a
dependency on the module identified by moduleID.
Declaration
public ScyllaModuleDependency(string moduleID, ScyllaModuleDependencyType type = ScyllaModuleDependencyType.Hard, string minVersion = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | moduleID | The unique string ID of the module this dependency targets. Use the constants in ScyllaModuleID for built-in Scylla modules. Must be non-null and non-empty; passing an invalid ID will cause validation to fail at startup when the framework cannot locate the target module in the registry. |
| ScyllaModuleDependencyType | type | The ScyllaModuleDependencyType that determines how the framework responds if the dependency is absent or version-incompatible. Defaults to Hard so that dependency declarations are fail-safe by default. |
| string | minVersion | Optional minimum required version string in |
Properties
MinVersion
Gets the optional minimum required version of the dependency target, in
"major.minor.patch" semantic versioning format.
Declaration
public string MinVersion { get; }
Property Value
| Type | Description |
|---|---|
| string | A version string such as |
See Also
ModuleID
Gets the unique string identifier of the module that this dependency targets.
Declaration
public string ModuleID { get; }
Property Value
| Type | Description |
|---|---|
| string | A non-null, non-empty string matching the ID of the depended-upon module. For built-in Scylla modules this corresponds to a constant in ScyllaModuleID. |
See Also
Type
Gets the type of this dependency, which controls whether the framework enforces its presence at startup and whether it participates in initialization ordering.
Declaration
public ScyllaModuleDependencyType Type { get; }
Property Value
| Type | Description |
|---|---|
| ScyllaModuleDependencyType | One of Hard, Soft, or EventBased. |
See Also
Methods
ToString()
Returns a human-readable string describing this dependency, including the target module ID, dependency type label, and minimum version constraint if one was specified. Useful for log output and diagnostic tooling.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string in one of the following formats:
|