private static async Task RunMainAsync(ScriptSettupInfo settupInfo) { while (!settupInfo.IsCancelRunning) { await Task.Delay(1000); } }
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 }
/// <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); }
/// <summary> /// /// </summary> /// <param name="settupInfo"></param> public LuaRuntimeScope(ScriptSettupInfo settupInfo) : base(settupInfo) { }
/// <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('\\', '/', '.'); }
/// <summary> /// /// </summary> /// <param name="settupInfo"></param> public PythonRuntimeScope(ScriptSettupInfo settupInfo) : base(settupInfo) { }
static ScriptEngines() { _changedFiles = new HashSet <string>(); _settupInfo = new ScriptSettupInfo(); }
/// <summary> /// /// </summary> /// <param name="settupInfo"></param> public CSharpRuntimeScope(ScriptSettupInfo settupInfo) : base(settupInfo) { }