Example #1
0
        public ScriptInstance(string scriptDirectoryPath, ClientApi clientApi)
        {
            _scriptDirectoryPath     = scriptDirectoryPath;
            _clientApi               = clientApi;
            _scriptDataDirectoryPath = Path.Combine(_scriptDirectoryPath, "Data");

            Directory.CreateDirectory(_scriptDataDirectoryPath);
        }
Example #2
0
        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;
 }