Rhino.Context.EvaluateReader C# (CSharp) Method

EvaluateReader() public method

Evaluate a reader as JavaScript source.
Evaluate a reader as JavaScript source. All characters of the reader are consumed.
/// IOException /// if an IOException was generated by the Reader ///
public EvaluateReader ( Scriptable scope, TextReader @in, string sourceName, int lineno, object securityDomain ) : object
scope Scriptable the scope to execute in
@in System.IO.TextReader
sourceName string a string describing the source, such as a filename
lineno int the starting line number
securityDomain object /// an arbitrary object that specifies security /// information about the origin or owner of the script. For /// implementations that don't care about security, this value /// may be null. ///
return object
		public object EvaluateReader(Scriptable scope, TextReader @in, string sourceName, int lineno, object securityDomain)
		{
			Script script = CompileReader(scope, @in, sourceName, lineno, securityDomain);
			if (script != null)
			{
				return script.Exec(this, scope);
			}
			else
			{
				return null;
			}
		}
Context