Skip to content

Commit

Permalink
Fixed DoXXXAsync overloads
Browse files Browse the repository at this point in the history
  • Loading branch information
xanathar committed Oct 7, 2016
1 parent 45ca7a3 commit 8943cba
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/MoonSharp.Interpreter/AsyncExtensions.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,13 @@ public static Task<DynValue> CallAsync(this Closure function, params DynValue[]
/// <param name="script">The script.</param>
/// <param name="code">The code.</param>
/// <param name="globalContext">The global context.</param>
/// <param name="codeFriendlyName">Name of the code - used to report errors, etc. Also used by debuggers to locate the original source file.</param>
/// <returns>
/// A DynValue containing the result of the processing of the loaded chunk.
/// </returns>
public static Task<DynValue> DoString(this Script script, string code, Table globalContext = null)
public static Task<DynValue> DoStringAsync(this Script script, string code, Table globalContext = null, string codeFriendlyName = null)
{
return ExecAsync(() => script.DoString(code, globalContext));
return ExecAsync(() => script.DoString(code, globalContext, codeFriendlyName));
}


Expand All @@ -96,12 +97,13 @@ public static Task<DynValue> DoString(this Script script, string code, Table glo
/// <param name="script">The script.</param>
/// <param name="stream">The stream.</param>
/// <param name="globalContext">The global context.</param>
/// <param name="codeFriendlyName">Name of the code - used to report errors, etc. Also used by debuggers to locate the original source file.</param>
/// <returns>
/// A DynValue containing the result of the processing of the loaded chunk.
/// </returns>
public static Task<DynValue> DoStreamAsync(this Script script, Stream stream, Table globalContext = null)
public static Task<DynValue> DoStreamAsync(this Script script, Stream stream, Table globalContext = null, string codeFriendlyName = null)
{
return ExecAsync(() => script.DoStream(stream, globalContext));
return ExecAsync(() => script.DoStream(stream, globalContext, codeFriendlyName));
}


Expand All @@ -113,12 +115,13 @@ public static Task<DynValue> DoStreamAsync(this Script script, Stream stream, Ta
/// <param name="script">The script.</param>
/// <param name="filename">The filename.</param>
/// <param name="globalContext">The global context.</param>
/// <param name="codeFriendlyName">Name of the code - used to report errors, etc. Also used by debuggers to locate the original source file.</param>
/// <returns>
/// A DynValue containing the result of the processing of the loaded chunk.
/// </returns>
public static Task<DynValue> DoFile(this Script script, string filename, Table globalContext = null)
public static Task<DynValue> DoFileAsync(this Script script, string filename, Table globalContext = null, string codeFriendlyName = null)
{
return ExecAsync(() => script.DoFile(filename, globalContext));
return ExecAsync(() => script.DoFile(filename, globalContext, codeFriendlyName));
}

/// <summary>
Expand Down

0 comments on commit 8943cba

Please sign in to comment.