コード例 #1
0
        public void Reload()
        {
            messageHandlers.Clear();
            eventMessageHandlers.Clear();

            engineRuntime.ImportModule("api");

            foreach (string path in System.IO.Directory.GetFiles(rootPath))
            {
                try
                {
                    Debug.WriteLine($"loading {path}");
                    engine.ExecuteFile(path, engineScope);
                }
                catch (Exception ex)
                {
                    Debug.WriteLine($"{ex.Message}");
                }
            }
        }
コード例 #2
0
 public MoodleAPI(IDictionary <string, string> Server)
 {
     python      = Python.CreateRuntime();
     moodle      = python.ImportModule("moodle");
     this.Server = Server;
 }