/// <summary> /// Creates a new environment with the given settings. /// </summary> /// <param name="settings">The settings to give the Environment.</param> /// <exception cref="System.ArgumentNullException">If settings is null.</exception> public LuaEnvironmentNet(LuaSettings settings) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } _globals = new LuaTable(); _runtime = LuaRuntimeNet.Create(this); _compiler = new CodeCompiler(); _parser = new PlainParser(); _modules = new ModuleBinder(); Settings = settings.AsReadOnly(); // initialize the global variables. LuaStaticLibraries.Initialize(this); _initializeTypes(); }
/// <summary> /// Creates a new environment with the given settings. /// </summary> /// <param name="settings">The settings to give the Environment.</param> /// <exception cref="System.ArgumentNullException">If settings is null.</exception> public LuaEnvironmentNet(LuaSettings settings) { if (settings == null) throw new ArgumentNullException("settings"); this._globals = new LuaValues.LuaTable(); this._runtime = LuaRuntimeNet.Create(this); this._compiler = new CodeCompiler(); this._parser = new PlainParser(); this._modules = new ModuleBinder(); this.Settings = settings.AsReadOnly(); // initialize the global variables. LuaStaticLibraries.Initialize(this); InitializeTypes(); }