public ScriptInstance(string scriptDirectoryPath, ClientApi clientApi) { _scriptDirectoryPath = scriptDirectoryPath; _clientApi = clientApi; _scriptDataDirectoryPath = Path.Combine(_scriptDirectoryPath, "Data"); Directory.CreateDirectory(_scriptDataDirectoryPath); }
public static void Main() { var clientApi = new ClientApi(); var scriptsHost = new ScriptsHost(clientApi); scriptsHost.Initialize(); scriptsHost.StartScripts(); clientApi.RaiseEvent(nameof(ClientApi.SampleClientEvent), "Test argument."); Console.ReadKey(); }
public ScriptsHost(ClientApi clientApi) { _clientApi = clientApi; }