Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description: sandbox add an example. #9

Open
rainbowdesign opened this issue Mar 13, 2019 · 2 comments
Open

Description: sandbox add an example. #9

rainbowdesign opened this issue Mar 13, 2019 · 2 comments

Comments

@rainbowdesign
Copy link

It would be great if there would be an example in http://www.moonsharp.org/sandbox.html

@LimpingNinja
Copy link

LimpingNinja commented Jan 7, 2020

I agree it could be helpful, do you have an example? It's a relatively simple process:

        CoreModules ModuleSet = CoreModules.Preset_HardSandbox | CoreModules.ErrorHandling | CoreModules.Dynamic;
  	Script script = new Script(ModuleSet);
	DynValue res = script.DoString("<script text here>");
	return res.Number;

Or were you thinking something that goes into deeper detail with specific examples? I wouldn't mind adding it in if you had some examples of what would be helpful.

@LimpingNinja LimpingNinja transferred this issue from moonsharp-devs/moonsharp Jan 7, 2020
@rainbowdesign
Copy link
Author

It would be a start, there is also the example removing dangerous apis i really would like to have it a full example with all i have to replace from a normal script to a sandboxed script with some comments on it so it can easily applied an understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants