Table of Contents

Class RequiredModuleAttribute

Namespace
Prefrontal.Attributes
Assembly
Prefrontal.Core.dll

Specifies that this module requires the given module to be present on the Agent in order to function. The agent will ensure that the required module is present before configuring and initializing this module.

Example sage:

public class MyModule : Module
{
	[RequiredModule]
	public MyOtherModule OtherModule { get; set; } = null!;
}

Module dependencies can also be specified in the module's constructor like so:

public class MyModule(MyOtherModule otherModule) : Module
{
	public MyOtherModule OtherModule = otherModule;
}
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class RequiredModuleAttribute : Attribute
Inheritance
RequiredModuleAttribute
Inherited Members
Extension Methods

See Also