Skip to content

Commit 01f7674

Browse files
authored
Merge pull request #3514 from sharwell/get-text
Use GetText instead of ToFullString
2 parents 8c609a7 + c1f27f2 commit 01f7674

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

StyleCop.Analyzers/StyleCop.Analyzers.CodeGeneration/OperationLightupGenerator.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ private void GenerateOperationInterface(in SourceProductionContext context, Inte
579579
.WithTrailingTrivia(
580580
SyntaxFactory.CarriageReturnLineFeed);
581581

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

585585
private void GenerateOperationWrapperHelper(in SourceProductionContext context, ImmutableArray<InterfaceData> wrapperTypes)
@@ -787,7 +787,7 @@ private void GenerateOperationWrapperHelper(in SourceProductionContext context,
787787
.WithTrailingTrivia(
788788
SyntaxFactory.CarriageReturnLineFeed);
789789

790-
context.AddSource("OperationWrapperHelper.g.cs", SourceText.From(wrapperNamespace.ToFullString(), Encoding.UTF8));
790+
context.AddSource("OperationWrapperHelper.g.cs", wrapperNamespace.GetText(Encoding.UTF8));
791791
}
792792

793793
private void GenerateOperationKindEx(in SourceProductionContext context, ImmutableArray<InterfaceData> wrapperTypes)
@@ -840,7 +840,7 @@ private void GenerateOperationKindEx(in SourceProductionContext context, Immutab
840840
.WithTrailingTrivia(
841841
SyntaxFactory.CarriageReturnLineFeed);
842842

843-
context.AddSource("OperationKindEx.g.cs", SourceText.From(wrapperNamespace.ToFullString(), Encoding.UTF8));
843+
context.AddSource("OperationKindEx.g.cs", wrapperNamespace.GetText(Encoding.UTF8));
844844
}
845845

846846
private sealed class DocumentData

StyleCop.Analyzers/StyleCop.Analyzers.CodeGeneration/SyntaxLightupGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ private void GenerateSyntaxWrapper(in SourceProductionContext context, SyntaxDat
859859
.WithTrailingTrivia(
860860
SyntaxFactory.CarriageReturnLineFeed);
861861

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

865865
private void GenerateSyntaxWrapperHelper(in SourceProductionContext context, ImmutableArray<NodeData> wrapperTypes)
@@ -1246,7 +1246,7 @@ private void GenerateSyntaxWrapperHelper(in SourceProductionContext context, Imm
12461246
.WithTrailingTrivia(
12471247
SyntaxFactory.CarriageReturnLineFeed);
12481248

1249-
context.AddSource("SyntaxWrapperHelper.g.cs", SourceText.From(wrapperNamespace.ToFullString(), Encoding.UTF8));
1249+
context.AddSource("SyntaxWrapperHelper.g.cs", wrapperNamespace.GetText(Encoding.UTF8));
12501250
}
12511251

12521252
private sealed class SyntaxData

0 commit comments

Comments
 (0)