Comments (2)
nerver mind i got this
state.Libraries.Configure(libs =>
{
var consoleOutput = libs.Get<ConsoleOutputLibrary>();
var debugOut = libs.Get<MondDebugLibrary>();
consoleOutput.Out = new StringWriter(sb)
{
NewLine = "\n"
};
});
from mond.
Glad to see you got it! For anyone else coming here looking for this, here is a more complete sample:
// Set up your MondState as usual...
var sb = new StringBuilder();
state.Libraries.Configure(libs =>
{
var consoleOutput = libs.Get<ConsoleOutputLibrary>();
consoleOutput.Out = new StringWriter(sb)
{
NewLine = "\n"
};
});
// Run your Mond script...
var outputString = sb.ToString(); // This gets the output text from the script as a string
Console.WriteLine(outputString);
from mond.
Related Issues (20)
- Stack trace does not show metamethods properly
- Help with MondModuleBinder? HOT 1
- Comment on the last line of a script causes an Expression error HOT 1
- No clear documentation or feature on calling a function, binding a class, or overriding a function without global HOT 3
- Remove prototypes?
- General questions regarding sandboxing and performance HOT 1
- Debugger stop points behave weirdly before/after decorators
- Custom lib does not work HOT 4
- Switch to using uniform function call syntax
- Async MondFunction ? HOT 17
- Add support for async functions to the bindings codegen HOT 1
- Add a way to bind DTOs to Mond
- Require but include string as well? HOT 4
- How to convert string to number in Mond ? HOT 2
- Require does not work for me. HOT 8
- Improve the module creation process
- Use console library inside own Module HOT 2
- Async Examples and make sure it does not block the thread. HOT 16
- Get type of the value? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mond.