We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 983b9ef commit a6d9e3eCopy full SHA for a6d9e3e
1 file changed
XObjectsTests/Extensions/RoslynExtensions.cs
@@ -246,14 +246,14 @@ private static T StripLeadingTripleSlashDocComments<T>(T node) where T : SyntaxN
246
247
public static SourceText ToSourceText(this FileInfo csFile)
248
{
249
- StreamReader text = csFile.OpenText();
+ using StreamReader text = csFile.OpenText();
250
251
return SourceText.From(text, (int)text.BaseStream.Length);
252
}
253
254
public static CSharpSyntaxTree ToSyntaxTree(this FileInfo csFile)
255
256
- var source = csFile.ToSourceText();
+ SourceText source = csFile.ToSourceText();
257
258
SyntaxTree tree = CSharpSyntaxTree.ParseText(source, CSharpParseOptions.Default);
259
0 commit comments