Skip to content

Commit

Permalink
Use StringSyntax for template code string (Roslyn Embedded Languages …
Browse files Browse the repository at this point in the history
…Support)
  • Loading branch information
jbe2277 committed Dec 15, 2024
1 parent 12a5f49 commit 9237768
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions src/DotNetPad/DotNetPad.Applications/CodeAnalysis/TemplateCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,35 @@
internal static class TemplateCode
{
public static string InitialCSharpCode =>
@"namespace Sample;
/*lang=c#-test*/ """
namespace Sample;
internal static class Program
{
private static void Main()
{
internal static class Program
{
private static void Main()
{
}
}";
}
}
""";

public static int StartCaretPositionCSharp => 102;

public static string InitialVisualBasicCode =>
@"Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Threading.Tasks
/*lang=vb.net-test*/ """
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Threading.Tasks
Namespace Sample
Module Program
Sub Main()
Namespace Sample
Module Program
Sub Main()
End Sub
End Module
End Namespace";
End Sub
End Module
End Namespace
""";

public static int StartCaretPositionVisualBasic => 177;
}
Expand Down

0 comments on commit 9237768

Please sign in to comment.