Пример #1
0
 public static void Shutdown()
 {
     ((IDisposable)prolog).Dispose();
     ((IDisposable)v8).Dispose();
     v8     = null;
     prolog = null;
 }
Пример #2
0
 internal SwiPrologModule(SwiPrologEngine prolog, string name)
 {
     if (name == null)
     {
         throw new ArgumentNullException(nameof(name));
     }
     module            = name;
     foreignPredicates = new List <Delegate>();
 }
Пример #3
0
        public static void Initialize(TestContext context)
        {
            var settings = new SwiPrologInitializationSettings
            {
                HomeDirectory = @"C:\Program Files\swipl",
                SetHomeDirectoryEnvironmentVariable = true,
                BinaryDirectory = @"C:\Program Files\swipl\bin",
                PrependBinaryDirectoryToPath = true
            };

            v8     = new V8ScriptEngine();
            prolog = new SwiPrologEngine(settings);
            v8.AddHostType("Console", typeof(Console));
            v8.AddHostObject("prolog", prolog);
        }
Пример #4
0
 internal SwiPrologModule(SwiPrologEngine prolog, string name, dynamic settings)
     : this(prolog, name)
 {
 }