Skip to content
This repository has been archived by the owner on Jul 4, 2022. It is now read-only.

Commit

Permalink
Use GetText instead of ToFullString
Browse files Browse the repository at this point in the history
See dotnet/roslyn#61506
  • Loading branch information
sharwell committed May 25, 2022
1 parent 3ac08b5 commit c1f27f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ private void GenerateOperationInterface(in SourceProductionContext context, Inte
.WithTrailingTrivia(
SyntaxFactory.CarriageReturnLineFeed);

context.AddSource(node.WrapperName + ".g.cs", SourceText.From(wrapperNamespace.ToFullString(), Encoding.UTF8));
context.AddSource(node.WrapperName + ".g.cs", wrapperNamespace.GetText(Encoding.UTF8));
}

private void GenerateOperationWrapperHelper(in SourceProductionContext context, ImmutableArray<InterfaceData> wrapperTypes)
Expand Down Expand Up @@ -787,7 +787,7 @@ private void GenerateOperationWrapperHelper(in SourceProductionContext context,
.WithTrailingTrivia(
SyntaxFactory.CarriageReturnLineFeed);

context.AddSource("OperationWrapperHelper.g.cs", SourceText.From(wrapperNamespace.ToFullString(), Encoding.UTF8));
context.AddSource("OperationWrapperHelper.g.cs", wrapperNamespace.GetText(Encoding.UTF8));
}

private void GenerateOperationKindEx(in SourceProductionContext context, ImmutableArray<InterfaceData> wrapperTypes)
Expand Down Expand Up @@ -840,7 +840,7 @@ private void GenerateOperationKindEx(in SourceProductionContext context, Immutab
.WithTrailingTrivia(
SyntaxFactory.CarriageReturnLineFeed);

context.AddSource("OperationKindEx.g.cs", SourceText.From(wrapperNamespace.ToFullString(), Encoding.UTF8));
context.AddSource("OperationKindEx.g.cs", wrapperNamespace.GetText(Encoding.UTF8));
}

private sealed class DocumentData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ private void GenerateSyntaxWrapper(in SourceProductionContext context, SyntaxDat
.WithTrailingTrivia(
SyntaxFactory.CarriageReturnLineFeed);

context.AddSource(nodeData.WrapperName + ".g.cs", SourceText.From(wrapperNamespace.ToFullString(), Encoding.UTF8));
context.AddSource(nodeData.WrapperName + ".g.cs", wrapperNamespace.GetText(Encoding.UTF8));
}

private void GenerateSyntaxWrapperHelper(in SourceProductionContext context, ImmutableArray<NodeData> wrapperTypes)
Expand Down Expand Up @@ -1246,7 +1246,7 @@ private void GenerateSyntaxWrapperHelper(in SourceProductionContext context, Imm
.WithTrailingTrivia(
SyntaxFactory.CarriageReturnLineFeed);

context.AddSource("SyntaxWrapperHelper.g.cs", SourceText.From(wrapperNamespace.ToFullString(), Encoding.UTF8));
context.AddSource("SyntaxWrapperHelper.g.cs", wrapperNamespace.GetText(Encoding.UTF8));
}

private sealed class SyntaxData
Expand Down

0 comments on commit c1f27f2

Please sign in to comment.