Пример #1
0
 private static async Task RunMainAsync(ScriptSettupInfo settupInfo)
 {
     while (!settupInfo.IsCancelRunning)
     {
         await Task.Delay(1000);
     }
 }
Пример #2
0
        private ScriptRuntimeScope CreateRuntimeScope(ScriptSettupInfo settupInfo, string amsKey, Type type)
        {
#if STATIC
            return(type.CreateInstance <ScriptRuntimeScope>(settupInfo));
#else
            return(type.CreateInstance <ScriptRuntimeScope>(settupInfo));

            //    return _context.GetInstance(amsKey, type.FullName, settupInfo) as ScriptRuntimeScope;
#endif
        }
Пример #3
0
        /// <summary>
        ///
        /// </summary>
        public ScriptRuntimeScope CreateScope(ScriptSettupInfo settupInfo)
        {
            var    type   = typeof(ScriptRuntimeScope);
            string amsKey = type.Assembly.GetName().Name;

            _scope = CreateRuntimeScope(settupInfo, amsKey, type);
            if (_scope != null)
            {
                _scope.Init();
            }
            return(_scope);
        }
Пример #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="settupInfo"></param>
 public LuaRuntimeScope(ScriptSettupInfo settupInfo)
     : base(settupInfo)
 {
 }
Пример #5
0
 /// <summary>
 /// init
 /// </summary>
 /// <param name="settupInfo"></param>
 protected ScriptBaseScope(ScriptSettupInfo settupInfo)
 {
     SettupInfo      = settupInfo;
     WatcherPathList = new List <string>();
     _rootPathArr    = Path.Combine(SettupInfo.RuntimePath, SettupInfo.ScriptRelativePath).Split('\\', '/', '.');
 }
Пример #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="settupInfo"></param>
 public PythonRuntimeScope(ScriptSettupInfo settupInfo)
     : base(settupInfo)
 {
 }
Пример #7
0
 static ScriptEngines()
 {
     _changedFiles = new HashSet <string>();
     _settupInfo   = new ScriptSettupInfo();
 }
Пример #8
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="settupInfo"></param>
 public CSharpRuntimeScope(ScriptSettupInfo settupInfo)
     : base(settupInfo)
 {
 }