1 iw4madminapplicationpluginscript ScriptPlugin
RaidMax edited this page 2023-05-20 22:09:21 -05:00

ScriptPlugin Public class

Description

implementation of IPlugin used to proxy script plugin requests

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph IW4MAdmin.Application.Plugin.Script
  IW4MAdmin.Application.Plugin.Script.ScriptPlugin[[ScriptPlugin]]
  end
  subgraph SharedLibraryCore.Interfaces
  SharedLibraryCore.Interfaces.IPlugin[[IPlugin]]
  class SharedLibraryCore.Interfaces.IPlugin interfaceStyle;
  end
SharedLibraryCore.Interfaces.IPlugin --> IW4MAdmin.Application.Plugin.Script.ScriptPlugin

Members

Properties

Public properties

Type Name Methods
string Author get, set
bool IsParser
indicates if the plugin is a parser
get, private set
string Name get, set
float Version get, set
FileSystemWatcher Watcher get

Methods

Protected methods

Returns Name
void Finalize()

Public methods

Returns Name
T ExecuteAction(Delegate action, CancellationToken token, object``[] param)
Task Initialize(IManager manager, IScriptCommandFactory scriptCommandFactory, IScriptPluginServiceResolver serviceResolver, IConfigurationHandlerV2<ScriptPluginConfiguration> configHandler)
Task OnEventAsync(GameEvent gameEvent, Server server)
Task OnLoadAsync(IManager manager)
Task OnTickAsync(Server server)
Task OnUnloadAsync()
T WrapDelegate(Delegate act, CancellationToken token, object``[] args)

Details

Summary

implementation of IPlugin used to proxy script plugin requests

Inheritance

Constructors

ScriptPlugin

Source code

public ScriptPlugin(ILogger logger, string filename, string workingDirectory)
Arguments
Type Name Description
ILogger logger
string filename
string workingDirectory

Methods

Finalize

Source code

protected override void Finalize()

Initialize

Source code

public async Task Initialize(IManager manager, IScriptCommandFactory scriptCommandFactory, IScriptPluginServiceResolver serviceResolver, IConfigurationHandlerV2<ScriptPluginConfiguration> configHandler)
Arguments
Type Name Description
IManager manager
IScriptCommandFactory scriptCommandFactory
IScriptPluginServiceResolver serviceResolver
IConfigurationHandlerV2<ScriptPluginConfiguration> configHandler

OnEventAsync

Source code

public virtual async Task OnEventAsync(GameEvent gameEvent, Server server)
Arguments
Type Name Description
GameEvent gameEvent
Server server

OnLoadAsync

Source code

public virtual Task OnLoadAsync(IManager manager)
Arguments
Type Name Description
IManager manager

OnTickAsync

Source code

public virtual Task OnTickAsync(Server server)
Arguments
Type Name Description
Server server

OnUnloadAsync

Source code

public virtual async Task OnUnloadAsync()

ExecuteAction

Source code

public T ExecuteAction<T>(Delegate action, CancellationToken token, object[] param)
where T : 
Arguments
Type Name Description
Delegate action
CancellationToken token
object``[] param

WrapDelegate

Source code

public T WrapDelegate<T>(Delegate act, CancellationToken token, object[] args)
where T : 
Arguments
Type Name Description
Delegate act
CancellationToken token
object``[] args

Properties

Name

public string Name { get; set; }

Version

public float Version { get; set; }

Author

public string Author { get; set; }

IsParser

public virtual bool IsParser { get; private set; }
Summary

indicates if the plugin is a parser

Watcher

public FileSystemWatcher Watcher { get; }

Generated with ModularDoc