/// <summary> /// /// </summary> public void Dispose() { Unload(); _currDomain = null; _scope.Dispose(); _scope = null; _context = null; GC.SuppressFinalize(this); }
private void InitDomain(string name) { #if STATIC #else _currDomain = AppDomain.CurrentDomain; var type = typeof(ScriptDomainContext); foreach (var v in _currDomain.GetAssemblies()) { var type2 = v.GetType(type.FullName); if (type2 == null) { continue; } _context = (ScriptDomainContext)Activator.CreateInstance(type2); } // _context = (ScriptDomainContext)_currDomain..(type.Assembly.GetName().CodeBase, type.FullName); #endif }