Skip to content

Commit efb1be8

Browse files
committed
Added an overload method to the "Translate".
1 parent cf68c1b commit efb1be8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

CSharpToJavaScript/CSTOJS.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ namespace CSharpToJavaScript;
1414
/// </summary>
1515
public static class CSTOJS
1616
{
17+
/// <summary>
18+
/// This method translates CSharp string into JavaScript with specified options.
19+
/// </summary>
20+
/// <param name="file"><see cref="FileData" />. CS string with options.</param>
21+
/// <param name="references">Optional. Array of references.</param>
22+
/// <returns></returns>
23+
public static FileData Translate(FileData file, MetadataReference[]? references = null)
24+
{
25+
FileData[] files = Translate([file], references);
26+
return files[0];
27+
}
1728
/// <summary>
1829
/// This method translates CSharp string into JavaScript with specified options.
1930
/// </summary>

0 commit comments

Comments
 (0)