using Microsoft.CodeAnalysis.Scripting; using System.Collections.Generic; using System.IO; namespace Arrowgene.Ddon.GameServer.Scripting { public abstract class ScriptModule { public abstract string ModuleRoot { get; } public abstract string Filter { get; } public abstract bool ScanSubdirectories { get; } public FileSystemWatcher Watcher { get; set; } /// /// Determines if this module is able to be hot-loadable or not. /// If a module is not hot-loadable, it will only be evaluated once /// when the server first loads. /// public abstract bool EnableHotLoad { get; } public HashSet Scripts { get; set; } public ScriptModule() { Scripts = new HashSet(); } /// /// Options passed into the compilation unit. /// /// public abstract ScriptOptions Options(); /// /// Evaluates the result returned by the script. /// /// Path to the script that was executed /// The result object of the script that executed /// public abstract bool EvaluateResult(string path, ScriptState result); } }