Skip to content

Commit

Permalink
Handle File Scoped Namespaces (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminMichaelis authored Oct 31, 2022
1 parent 89b4fdc commit 1ea22c0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ListingManager/ListingManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,14 @@ private static void UpdateNamespaceOfPath(string path, string newNamespace, stri
{
if (line.StartsWith("namespace"))
{
textWriter.WriteLine("namespace " + newNamespace);
if (line.TrimEnd().EndsWith(";"))
{
textWriter.WriteLine("namespace " + newNamespace + ";");
}
else
{
textWriter.WriteLine("namespace " + newNamespace);
}
}
else
{
Expand Down

0 comments on commit 1ea22c0

Please sign in to comment.