436 references to WriteAllText
InteractiveHost.UnitTests (15)
InteractiveHostCoreInitTests.cs (1)
58
srcDir.CreateFile("goo.csx").
WriteAllText
("ReferencePaths.Add(@\"" + dllDir + "\");");
InteractiveHostDesktopInitTests.cs (1)
31
srcDir.CreateFile("goo.csx").
WriteAllText
("ReferencePaths.Add(@\"" + dllDir + "\");");
InteractiveHostDesktopTests.cs (13)
182
var file = Temp.CreateFile().
WriteAllText
(MethodWithInfiniteLoop + "\r\nfoo();").Path;
201
var file = Temp.CreateFile().
WriteAllText
("1 1").Path;
224
var file = Temp.CreateFile().
WriteAllText
(@"
270
var file = Temp.CreateFile().
WriteAllText
("#load blah.csx" + "\r\n" + "class C {}");
693
initFile.
WriteAllText
(@"
704
rspFile.
WriteAllText
($"/lib:{directory1.Path} /r:Assembly2.dll {initFile.Path}");
736
initFile.
WriteAllText
(@"#r ""Assembly.dll""");
742
rspFile.
WriteAllText
($"{initFile.Path}");
755
rspFile.
WriteAllText
(@"
810
var initFile = Temp.CreateFile(extension: ".csx").
WriteAllText
("1 1");
814
rspFile.
WriteAllText
($@"
838
var scriptFile = Temp.CreateFile(extension: ".csx").
WriteAllText
("foreach (var arg in Args) Print(arg);");
841
rspFile.
WriteAllText
($@"
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (36)
DotNetSdkTests.cs (25)
26
var libFile = sourcePackageDir.CreateFile("lib.cs").
WriteAllText
("class Lib { public void M() { } }");
316
ProjectDir.CreateFile("Project2.csproj").
WriteAllText
($@"
410
var srcFile = ProjectDir.CreateFile("lib1.cs").
WriteAllText
("class C { }");
412
var srcFile2 = subdir.CreateFile("lib2.cs").
WriteAllText
("class D { }");
413
var editorConfigFile2 = subdir.CreateFile(".editorconfig").
WriteAllText
(@"[*.cs]
440
var srcFile = ProjectDir.CreateFile("lib1.cs").
WriteAllText
("class C { }");
442
var srcFile2 = subdir.CreateFile("lib2.cs").
WriteAllText
("class D { }");
443
var editorConfigFile2 = subdir.CreateFile(".editorconfig").
WriteAllText
(@"[*.cs]
468
var srcFile = ProjectDir.CreateFile("lib1.cs").
WriteAllText
("class C { }");
469
var globalConfigFile = ProjectDir.CreateFile(".globalconfig").
WriteAllText
(@"is_global = true
472
var srcFile2 = subdir.CreateFile("lib2.cs").
WriteAllText
("class D { }");
473
var globalConfigFile2 = subdir.CreateFile(".globalconfig").
WriteAllText
(@"is_global = true
502
var srcFile = ProjectDir.CreateFile("lib1.cs").
WriteAllText
("class C { }");
503
var globalConfigFile = ProjectDir.CreateFile(".globalconfig").
WriteAllText
(@"is_global = true
506
var srcFile2 = subdir.CreateFile("lib2.cs").
WriteAllText
("class D { }");
507
var globalConfigFile2 = subdir.CreateFile(".globalconfig").
WriteAllText
(@"is_global = true
535
var srcFile = ProjectDir.CreateFile("lib1.cs").
WriteAllText
("class C { }");
536
var globalConfigFile = ProjectDir.CreateFile(".globalconfig").
WriteAllText
(@"is_global = true
539
var srcFile2 = subdir.CreateFile("lib2.cs").
WriteAllText
("class D { }");
540
var globalConfigFile2 = subdir.CreateFile(".globalconfig").
WriteAllText
(@"is_global = true
599
var srcFile = ProjectDir.CreateFile("lib1.cs").
WriteAllText
("class C { }");
600
var globalConfigFile = ProjectDir.CreateFile(".globalconfig").
WriteAllText
(@"is_global = true
603
var globalConfigFile2 = subdir.CreateFile(".globalconfig").
WriteAllText
(@"is_global = true
629
var srcFile = ProjectDir.CreateFile("lib1.cs").
WriteAllText
("class C { }");
630
var globalConfigFile = ProjectDir.CreateFile("mycustom.config").
WriteAllText
(@"is_global = true
IntegrationTests.cs (6)
81
file.
WriteAllText
(pair.Value);
619
var slnFile = testDir.CreateFile("Console;!@(goo)'^(Application1.sln").
WriteAllText
(
648
var appProjFile = appDir.CreateFile(@"Cons.ole;!@(goo)'^(Application1.csproj").
WriteAllText
(
698
var appProgramFile = appDir.CreateFile("Program.cs").
WriteAllText
(
716
var libraryProjFile = libraryDir.CreateFile("Class;!@(goo)'^(Library1.csproj").
WriteAllText
(
772
var libraryClassFile = libraryDir.CreateFile("Class1.cs").
WriteAllText
(
TestUtilities\DotNetSdkTestBase.cs (5)
166
Project = ProjectDir.CreateFile(ProjectFileName).
WriteAllText
(s_projectSource);
167
ProjectDir.CreateFile("TestClass.cs").
WriteAllText
(s_classSource);
170
ProjectDir.CreateFile("Directory.Build.props").
WriteAllText
("<Project/>");
171
ProjectDir.CreateFile("Directory.Build.targets").
WriteAllText
("<Project/>");
172
ProjectDir.CreateFile(".editorconfig").
WriteAllText
("root = true");
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (55)
CommandLineIVTTests.cs (4)
26
var source2 = dir.CreateFile("B.cs").
WriteAllText
("""
103
var source2 = dir.CreateFile("B.cs").
WriteAllText
("""
181
var source2 = dir.CreateFile("B.cs").
WriteAllText
("""
264
var source2 = dir.CreateFile("B.cs").
WriteAllText
("""
CommandLineTests.cs (31)
138
var src = dir.CreateFile("temp.cs").
WriteAllText
(@"
163
var src = dir.CreateFile("temp.cs").
WriteAllText
("class C {}");
187
var src = dir.CreateFile("test.cs").
WriteAllText
(@"
192
var analyzerConfig = dir.CreateFile(".editorconfig").
WriteAllText
(@"
217
var src = dir.CreateFile("Class1.cs").
WriteAllText
("""
229
var editorconfig = dir.CreateFile(".editorconfig").
WriteAllText
("""
273
var src = dir.CreateFile("test.cs").
WriteAllText
(@"
279
var analyzerConfig = dir.CreateFile(".editorconfig").
WriteAllText
(@"
332
var src = dir.CreateFile("test.cs").
WriteAllText
(@"
337
var analyzerConfig = dir.CreateFile(".editorconfig").
WriteAllText
(@"
364
var src = dir.CreateFile("test.cs").
WriteAllText
(@"
373
var analyzerConfig1 = dir.CreateFile("analyzerconfig1").
WriteAllText
(configText);
374
var analyzerConfig2 = dir.CreateFile("analyzerconfig2").
WriteAllText
(configText);
447
string rsp = Temp.CreateFile().
WriteAllText
(@"
580
file.
WriteAllText
(source);
742
f.
WriteAllText
("");
1230
file1.
WriteAllText
("");
1231
file2.
WriteAllText
("");
1232
file3.
WriteAllText
("");
1233
file4.
WriteAllText
("");
1234
file5.
WriteAllText
("");
2244
src.
WriteAllText
(@"class C { public static void Main() {} }");
2247
sl.
WriteAllText
(@"{ ""documents"" : {} }");
2276
src.
WriteAllText
(@"class C { public static void Main() {} }");
2279
sl.
WriteAllText
(@"{ ""documents"" : {} }");
2304
src.
WriteAllText
(@"class C { public static void Main() {} }");
2433
src.
WriteAllText
(embed_cs);
2434
src2.
WriteAllText
(embed2_cs);
2435
txt.
WriteAllText
(embed_xyz);
9287
TempFile tempFile = tempDir.CreateFile("a.cs").
WriteAllText
(@"public class A { }");
11620
var src = dir.CreateFile("a.cs").
WriteAllText
(source);
SarifErrorLoggerTests.cs (9)
41
var hello = Temp.CreateFile().
WriteAllText
(helloWorldCS).Path;
72
var sourceFile = Temp.CreateFile().
WriteAllText
(source).Path;
106
var sourceFile = Temp.CreateFile().
WriteAllText
(source).Path;
138
var sourceFile = Temp.CreateFile().
WriteAllText
(source).Path;
175
var sourceFile = Temp.CreateFile().
WriteAllText
(source).Path;
210
var sourceFile = Temp.CreateFile().
WriteAllText
(source).Path;
245
var sourceFile = Temp.CreateFile().
WriteAllText
(source).Path;
280
var sourceFile = Temp.CreateFile().
WriteAllText
(source).Path;
313
var sourceFile = Temp.CreateFile().
WriteAllText
(source).Path;
SarifV2ErrorLoggerTests.cs (6)
445
var sourceFile = Temp.CreateFile().
WriteAllText
(source).Path;
525
var sourceFile1 = sourceDir.CreateFile("source1.cs").
WriteAllText
(source1).Path;
526
var sourceFile2 = sourceDir.CreateFile("source2.cs").
WriteAllText
(source2).Path;
527
var editorconfigFile = sourceDir.CreateFile(".editorconfig").
WriteAllText
(editorconfigText).Path;
597
var sourceFile = Temp.CreateFile().
WriteAllText
(source).Path;
678
var sourceFile = errorLogDir.CreateFile("myfile.cs").
WriteAllText
(source);
TouchedFileLoggingTests.cs (5)
38
var hello = Temp.CreateFile().
WriteAllText
(helloWorldCS).Path;
66
var hello = Temp.CreateFile().
WriteAllText
(helloWorldCS).Path;
69
var appConfigPath = Temp.CreateFile().
WriteAllText
(
112
var hello = Temp.CreateFile().
WriteAllText
(helloWorldCS).Path;
147
var sourcePath = Temp.CreateFile().
WriteAllText
(@"
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Attributes\AttributeTests_Security.cs (2)
1486
tempFile.
WriteAllText
(text);
1575
tempFile.
WriteAllText
(text);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (19)
CommandLineRunnerTests.cs (19)
264
var script = Temp.CreateFile(extension: ".csx").
WriteAllText
("foreach (var arg in Args) Print(arg);");
266
var rsp = Temp.CreateFile(extension: ".rsp").
WriteAllText
($@"
297
var script = Temp.CreateFile(extension: ".csx").
WriteAllText
("foreach (var arg in Args) Print(arg);");
314
var script = Temp.CreateFile(extension: ".csx").
WriteAllText
("foreach (var arg in Args) Print(arg);");
331
var script = Temp.CreateFile(extension: ".csx").
WriteAllText
("foreach (var arg in Args) Print(arg);");
333
var rsp = Temp.CreateFile(extension: ".rsp").
WriteAllText
($@"
363
var script = Temp.CreateFile(prefix: "@", extension: ".csx").
WriteAllText
("foreach (var arg in Args) Print(arg);");
381
var script = dir.CreateFile("--").
WriteAllText
("foreach (var arg in Args) Print(arg);");
446
var script = Temp.CreateFile(extension: ".csx").
WriteAllText
("WriteLine(42);");
487
var script = directory.CreateFile(scriptName).
WriteAllText
("Print(3);");
527
var main = Temp.CreateFile(extension: ".csx").
WriteAllText
(@"
535
dir1.CreateFile("1.csx").
WriteAllText
(@"Print(1);");
538
dir2.CreateFile("2.csx").
WriteAllText
(@"Print(2);");
541
dir3.CreateFile("3.csx").
WriteAllText
(@"Print(3);");
558
var main = Temp.CreateFile(extension: ".csx").
WriteAllText
(@"
596
var main = dir.CreateFile("a.csx").
WriteAllText
("int X = 1;");
667
var rsp = Temp.CreateFile().
WriteAllText
(@"
706
var init = Temp.CreateFile(extension: ".csx").
WriteAllText
(@"
726
var init = Temp.CreateFile(extension: ".csx").
WriteAllText
(@"
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\SemanticErrorTests.cs (1)
21969
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
("&");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (50)
DocumentationComments\DocumentationCommentCompilerTests.cs (49)
3441
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(xml);
3476
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(xml);
3514
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(xml);
3549
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(xml);
3585
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(xml);
3646
var dir1XmlFile = dir1.CreateFile("test.xml").
WriteAllText
(xml1);
3649
var dir2XmlFile = dir2.CreateFile("test.xml").
WriteAllText
(xml2);
3652
var dir3XmlFile = dir3.CreateFile("test.xml").
WriteAllText
(xml3);
3733
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(xml);
3804
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(xml);
3876
var xmlFile2 = Temp.CreateFile(extension: ".xml").
WriteAllText
(string.Format("<include file='{0}' path='path'/>", xmlFilePath1));
3909
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
("<element/>");
3943
var xmlFile1 = Temp.CreateFile(extension: ".xml").
WriteAllText
("<element/>");
3946
var xmlFile2 = Temp.CreateFile(extension: ".xml").
WriteAllText
(string.Format("<include file='{0}' path=':'/>", xmlFilePath1));
3976
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
("<OpenWithoutClose>");
4010
var xmlFile1 = Temp.CreateFile(extension: ".xml").
WriteAllText
("<OpenWithoutClose>");
4013
var xmlFile2 = Temp.CreateFile(extension: ".xml").
WriteAllText
(string.Format("<include file='{0}' path='path'/>", xmlFilePath1));
4046
xmlFile.
WriteAllText
(string.Format(@"<include file=""{0}"" path=""//include""/>", xmlFilePath)); //Includes itself.
4078
xmlFile.
WriteAllText
(string.Format(@"<parent><include file=""{0}"" path=""//parent""/></parent>", xmlFilePath)); //Includes its parent.
4112
xmlFile.
WriteAllText
(string.Format(@"
4171
xmlFile.
WriteAllText
(string.Format(xmlTemplate, xmlFilePath));
4211
xmlFile1.
WriteAllText
(string.Format(xmlTemplate1, xmlFilePath2));
4212
xmlFile2.
WriteAllText
(xml2);
4244
xmlFile.
WriteAllText
(@"<?xml version=""1.0""?>
4318
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(@"<see cref=""Main""/>");
4353
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(@"<see cref=""M:Verbatim""/>");
4388
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(@"<see cref=""Int32""/>");
4435
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(@"<see cref=""#""/>");
4476
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(@"<see cref=""Invalid""/>");
4530
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(seeElement);
4575
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(seeElement);
4652
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(xml);
4732
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(xml);
4803
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(xml);
4847
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(@"<typeparam name=""#""/>");
4885
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(@"<param name=""Q""/>");
4926
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(@"<param name=""x""/>");
4962
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(@"<param name=""x"" name=""y""/>");
5004
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(xml);
5074
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(xml);
5243
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
("<stuff />");
5957
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
("&");
7212
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(xml);
7301
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
("<hello/>");
7324
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
("<hello/>");
7343
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
("<hello/>");
7381
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(
7446
xmlFile.
WriteAllText
(string.Format(xmlTemplate, xmlFilePath));
7601
var xmlFile = dir.CreateFile("---.xml").
WriteAllText
(@"<summary attrib="""" attrib=""""/>");
DocumentationComments\DocumentationModeTests.cs (1)
368
var xmlFile = Temp.CreateFile(extension: ".xml").
WriteAllText
(xml);
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (6)
MetadataShadowCopyProviderTests.cs (6)
86
var doc = dir.CreateFile("a.xml").
WriteAllText
("<hello>");
103
var dll = Temp.CreateFile().
WriteAllText
("blah");
186
var f0 = Temp.CreateFile().
WriteAllText
("bogus").Path;
198
var doc = dir.CreateFile("a.xml").
WriteAllText
("<hello>");
225
var docInvariant = dir.CreateFile("a.xml").
WriteAllText
("Invariant");
226
var docGreek = dir.CreateDirectory(elGR.Name).CreateFile("a.xml").
WriteAllText
("Greek");
Microsoft.CodeAnalysis.Test.Utilities (1)
Metadata\IlasmUtilities.cs (1)
109
sourceFile.
WriteAllText
(completeIL);
Microsoft.CodeAnalysis.UnitTests (41)
Analyzers\AnalyzerFileReferenceTests.cs (4)
199
var textFile = directory.CreateFile("Goo.txt").
WriteAllText
("I am the very model of a modern major general.").Path;
231
var textFile = directory.CreateFile("Goo.txt").
WriteAllText
("I am the very model of a modern major general.").Path;
314
source.
WriteAllText
("int x = 0;");
343
source.
WriteAllText
("int x = 0;");
CommonCommandLineParserTests.cs (11)
35
file.
WriteAllText
(source);
40
newFile.
WriteAllText
(otherSources[i - 1]);
472
file.
WriteAllText
(source);
981
file.
WriteAllText
(source);
983
newFile.
WriteAllText
(source1);
1012
file.
WriteAllText
(source);
1046
file.
WriteAllText
(ruleSetSource);
1049
include.
WriteAllText
(includeSource);
1095
file.
WriteAllText
(ruleSetSource);
1098
include1.
WriteAllText
(includeSource1);
1101
include2.
WriteAllText
(includeSource2);
MetadataReferences\AssemblyIdentityComparerTests.cs (1)
616
var appConfig = Temp.CreateFile().
WriteAllText
(
MetadataReferences\AssemblyPortabilityPolicyTests.cs (25)
78
appConfig.
WriteAllText
("garbage");
84
appConfig.
WriteAllText
(
93
appConfig.
WriteAllText
(
115
appConfig.
WriteAllText
(
137
appConfig1.
WriteAllText
(
149
appConfig2.
WriteAllText
(
170
appConfig.
WriteAllText
(
178
appConfig.
WriteAllText
(
186
appConfig.
WriteAllText
(
196
appConfig.
WriteAllText
(
216
appConfig.
WriteAllText
(
235
appConfig.
WriteAllText
(
253
appConfig.
WriteAllText
(
270
appConfig.
WriteAllText
(
288
appConfig.
WriteAllText
(
307
appConfig.
WriteAllText
(
327
appConfig.
WriteAllText
(
351
appConfig.
WriteAllText
(
371
appConfig.
WriteAllText
(
387
var appConfig = Temp.CreateFile().
WriteAllText
(correctAppConfigText);
400
var appConfig = Temp.CreateFile().
WriteAllText
(correctAppConfigText);
407
appConfig.
WriteAllText
(correctAppConfigText);
412
appConfig = Temp.CreateFile().
WriteAllText
(correctAppConfigText);
417
appConfig.
WriteAllText
(@"
430
var appConfig2 = Temp.CreateFile().
WriteAllText
(correctAppConfigText);
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (176)
CommandLineBreakingChanges.vb (5)
16
Dim src As String = Temp.CreateFile().
WriteAllText
("
48
Dim src As String = Temp.CreateFile().
WriteAllText
(<text>
80
Dim src As String = Temp.CreateFile().
WriteAllText
(<text>
112
Dim src As String = Temp.CreateFile().
WriteAllText
(<text>
147
Dim src As String = Temp.CreateFile().
WriteAllText
(<text>
CommandLineIVTTests.vb (5)
25
Dim source2 = dir.CreateFile("B.vb").
WriteAllText
("
123
Dim source2 = dir.CreateFile("B.vb").
WriteAllText
("
224
Dim source2 = dir.CreateFile("B.vb").
WriteAllText
("
334
Dim source2 = dir.CreateFile("B.vb").
WriteAllText
("
453
Dim source3 = dir.CreateFile("C.vb").
WriteAllText
("
CommandLineTests.vb (159)
67
Dim src = dir.CreateFile("test.vb").
WriteAllText
("
74
Dim analyzerConfig = dir.CreateFile(".editorconfig").
WriteAllText
("
97
Dim src = dir.CreateFile("test.vb").
WriteAllText
("
104
Dim analyzerConfig = dir.CreateFile(".editorconfig").
WriteAllText
("
163
Dim src = dir.CreateFile("test.vb").
WriteAllText
("
169
Dim analyzerConfig = dir.CreateFile(".editorconfig").
WriteAllText
("
196
Dim src = dir.CreateFile("test.cs").
WriteAllText
("
206
Dim analyzerConfig1 = dir.CreateFile("analyzerconfig1").
WriteAllText
(configText)
207
Dim analyzerConfig2 = dir.CreateFile("analyzerconfig2").
WriteAllText
(configText)
230
Dim src = dir.CreateFile("temp.vb").
WriteAllText
("
253
Dim src = dir.CreateFile("temp.cs").
WriteAllText
("
283
Dim src As String = Temp.CreateFile().
WriteAllText
(<text>
326
Dim src As String = Temp.CreateFile().
WriteAllText
(<text>
348
Dim file = dir.CreateDirectory("Test Path (123)").CreateFile("hellovb.vb").
WriteAllText
(
385
file.
WriteAllText
(source)
404
file.
WriteAllText
(source)
423
file.
WriteAllText
(source)
467
Dim src As String = Temp.CreateFile().
WriteAllText
(<text>
508
Dim src As String = Temp.CreateFile().
WriteAllText
(<text>
526
Dim src As String = Temp.CreateFile().
WriteAllText
(<text>
544
Dim src As String = Temp.CreateFile().
WriteAllText
(<text>
585
Dim src As String = Temp.CreateFile().
WriteAllText
(<text>
751
Dim rsp As String = Temp.CreateFile().
WriteAllText
(<text>
776
Dim rsp As String = Temp.CreateFile().
WriteAllText
(<text>
919
Dim rsp As String = Temp.CreateFile().
WriteAllText
(<text>
1006
Dim source = Temp.CreateFile(prefix:="", extension:=".vb").
WriteAllText
("
2365
file1.
WriteAllText
("")
2366
file2.
WriteAllText
("")
2367
file3.
WriteAllText
("")
2368
file4.
WriteAllText
("")
2369
file5.
WriteAllText
("")
2413
file1.
WriteAllText
("")
2414
file2.
WriteAllText
("")
2415
file3.
WriteAllText
("")
2416
file4.
WriteAllText
("")
2417
file5.
WriteAllText
("")
2418
file6.
WriteAllText
("")
2601
file.
WriteAllText
(source)
2618
file.
WriteAllText
(source)
2791
file.
WriteAllText
(source)
3183
src.
WriteAllText
("
3190
sl.
WriteAllText
("{ ""documents"" : {} }")
3216
src.
WriteAllText
("
3223
sl.
WriteAllText
("{ ""documents"" : {} }")
3363
src.
WriteAllText
(embed_vb)
3364
src2.
WriteAllText
(embed2_vb)
3365
txt.
WriteAllText
(embed_xyz)
3619
file.
WriteAllText
(source)
3646
Dim src = dir.CreateFile("a.vb").
WriteAllText
(source.Value)
4135
xml.
WriteAllText
("EMPTY")
4187
xml.
WriteAllText
("EMPTY")
5013
src.
WriteAllText
("Imports System")
5035
src.
WriteAllText
("Imports System")
5052
src.
WriteAllText
("Imports System")
5374
file.
WriteAllText
("")
5906
file1.
WriteAllText
(source)
5958
file.
WriteAllText
(source.Value)
6011
file.
WriteAllText
(source.Value)
6098
file.
WriteAllText
(source.Value)
6142
file.
WriteAllText
(source.Value)
6190
file.
WriteAllText
(source.Value)
6236
file.
WriteAllText
(source.Value)
6278
file.
WriteAllText
(source.Value)
6313
file.
WriteAllText
(source.Value)
6345
file.
WriteAllText
(source.Value)
6379
file.
WriteAllText
(source.Value)
6413
file.
WriteAllText
(source.Value)
6445
file.
WriteAllText
(source.Value)
6887
Dim source As String = folder.CreateFile("src.vb").
WriteAllText
("").Path
6888
Dim ref As String = folder.CreateFile("ref.dll").
WriteAllText
("").Path
6912
Dim source As String = Temp.CreateFile().
WriteAllText
(<text>
6922
Dim rsp As String = Temp.CreateFile().
WriteAllText
(<text>
6961
Dim source As String = Temp.CreateFile().
WriteAllText
(<text>
6970
Dim rsp As String = Temp.CreateFile().
WriteAllText
(<text>
6995
Dim source As String = Temp.CreateFile().
WriteAllText
(<text>
7004
Dim rsp As String = Temp.CreateFile().
WriteAllText
(<text>
7029
Dim source As String = Temp.CreateFile().
WriteAllText
(<text>
7038
Dim rsp As String = Temp.CreateFile().
WriteAllText
(<text>
7063
Dim source As String = Temp.CreateFile().
WriteAllText
(<text>
7067
Dim rsp As String = Temp.CreateFile().
WriteAllText
(<text>
7087
Dim source As String = Temp.CreateFile().
WriteAllText
(<text>
7249
Dim source As String = Temp.CreateFile().
WriteAllText
(<text>
7273
Dim source As String = Temp.CreateFile().
WriteAllText
(<text>
7310
Dim source As String = Temp.CreateFile().
WriteAllText
(<text>
7465
Dim source As String = Temp.CreateFile().
WriteAllText
(<text>
7615
Dim file = dir.CreateFile("a.vb").
WriteAllText
(source)
7672
file.
WriteAllText
(<![CDATA[
7736
file.
WriteAllText
("
7993
file.
WriteAllText
(source)
8026
file.
WriteAllText
(source)
8291
file.
WriteAllText
(source)
8313
file.
WriteAllText
(source)
8531
file.
WriteAllText
(source)
8607
file.
WriteAllText
(source)
8716
Dim ruleSetFile = dir.CreateFile("Rules.ruleset").
WriteAllText
(ruleSetSource)
8736
Dim ruleSetFile = dir.CreateFile("Rules.ruleset").
WriteAllText
(ruleSetSource)
8757
Dim ruleSetFile = dir.CreateFile("Rules.ruleset").
WriteAllText
(ruleSetSource)
8778
Dim ruleSetFile = dir.CreateFile("Rules.ruleset").
WriteAllText
(ruleSetSource)
8799
Dim ruleSetFile = dir.CreateFile("Rules.ruleset").
WriteAllText
(ruleSetSource)
8820
Dim ruleSetFile = dir.CreateFile("Rules.ruleset").
WriteAllText
(ruleSetSource)
8841
Dim ruleSetFile = dir.CreateFile("Rules.ruleset").
WriteAllText
(ruleSetSource)
8863
Dim ruleSetFile = dir.CreateFile("Rules.ruleset").
WriteAllText
(ruleSetSource)
8884
Dim ruleSetFile = dir.CreateFile("Rules.ruleset").
WriteAllText
(ruleSetSource)
8907
Dim ruleSetFile = dir.CreateFile("Rules.ruleset").
WriteAllText
(ruleSetSource)
8930
Dim ruleSetFile = dir.CreateFile("Rules.ruleset").
WriteAllText
(ruleSetSource)
8951
Dim source As String = Temp.CreateFile().
WriteAllText
(<text>
9008
Dim source As String = Temp.CreateFile().
WriteAllText
(<text>
9031
Dim source As String = Temp.CreateFile().
WriteAllText
(<text>
9055
Dim source As String = Temp.CreateFile().
WriteAllText
(<text>
9076
Dim source As String = Temp.CreateFile().
WriteAllText
(<text>
9098
Dim source = dir.CreateFile("a.vb").
WriteAllText
(<text>
9103
Dim additionalFile = dir.CreateFile("AdditionalFile.txt").
WriteAllText
(<text>
9108
Dim nonCompilerInputFile = dir.CreateFile("DummyFile.txt").
WriteAllText
(<text>
9153
file.
WriteAllText
(source.Value)
9348
src.
WriteAllText
("
9424
src.
WriteAllText
(
9462
src.
WriteAllText
(
9568
sourceFile.
WriteAllText
(source.Value)
9738
Return Temp.CreateFile(directory:=directory, prefix:="", extension:=".vb").
WriteAllText
("
9748
Dim filePath = Temp.CreateFile().
WriteAllText
("").Path
9780
file.
WriteAllText
(source)
9824
file.
WriteAllText
(source)
9869
file.
WriteAllText
(source)
9894
file.
WriteAllText
(source)
9960
file.
WriteAllText
(source)
9998
file.
WriteAllText
(source)
10045
file.
WriteAllText
(source)
10051
Dim analyzerConfig = dir.CreateFile(".editorconfig").
WriteAllText
("
10097
file.
WriteAllText
(source)
10146
file.
WriteAllText
(source)
10182
Dim src = dir.CreateFile("test.vb").
WriteAllText
("
10220
Dim src = dir.CreateFile("test.cs").
WriteAllText
("
10285
Dim src = dir.CreateFile("test.vb").
WriteAllText
("
10295
analyzerConfig = dir.CreateFile(".globalconfig").
WriteAllText
($"
10299
analyzerConfig = dir.CreateFile(".editorconfig").
WriteAllText
($"
10332
Dim src = dir.CreateFile("temp.vb").
WriteAllText
("
10339
Dim globalConfig = dir.CreateFile(".globalconfig").
WriteAllText
("
10343
Dim analyzerConfig = dir.CreateFile(".editorconfig").
WriteAllText
("
10365
Dim src = dir.CreateFile("temp.vb").
WriteAllText
("
10374
Dim globalConfig = dir.CreateFile(".globalconfig").
WriteAllText
($"
10387
dir.CreateFile("Rules.ruleset").
WriteAllText
(ruleSetSource)
10398
Dim src = dir.CreateFile("temp.vb").
WriteAllText
("
10405
Dim globalConfig = dir.CreateFile(".globalconfig").
WriteAllText
("
10421
srcFile.
WriteAllText
(source)
10425
additionalFile.
WriteAllText
(additionalText)
10500
Dim src = dir.CreateFile("temp.vb").
WriteAllText
(source)
10504
Dim analyzerConfig = dir.CreateFile(".editorconfig").
WriteAllText
($"
10531
Dim src = directory.CreateFile("test.vb").
WriteAllText
("
10562
Dim src = dir.CreateFile("test.vb").
WriteAllText
("
10587
Dim src = dir.CreateFile("test.vb").
WriteAllText
("
10609
Dim src = dir.CreateFile("test.vb").
WriteAllText
("
10636
Dim src = dir.CreateFile("temp.vb").
WriteAllText
("
10699
Dim src = dir.CreateFile("temp.vb").
WriteAllText
("
10727
Dim src = dir.CreateFile("test.vb").
WriteAllText
("
10749
Dim analyzerConfig = dir.CreateFile(".editorconfig").
WriteAllText
("
10772
Dim src = dir.CreateFile("test.vb").
WriteAllText
("
10794
Dim analyzerConfig = dir.CreateFile(".editorconfig").
WriteAllText
("
10815
Dim src = dir.CreateFile("test.vb").
WriteAllText
("
10837
Dim analyzerConfig = dir.CreateFile(".editorconfig").
WriteAllText
("
SarifErrorLoggerTests.vb (4)
47
Dim hello = Temp.CreateFile().
WriteAllText
(helloWorldVB).Path
82
Dim sourceFilePath = Temp.CreateFile().
WriteAllText
(source).Path
123
Dim sourceFilePath = Temp.CreateFile().
WriteAllText
(source).Path
161
Dim sourceFilePath = Temp.CreateFile().
WriteAllText
(source).Path
TouchedFileLoggingTests.vb (3)
34
Dim hello = Temp.CreateFile().
WriteAllText
(_helloWorldCS).Path
64
Dim hello = Temp.CreateFile().
WriteAllText
(_helloWorldCS).Path
99
Dim sourcePath = Temp.CreateFile().
WriteAllText
(
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
WorkspaceTestBase.cs (1)
58
file.
WriteAllText
(s);
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
CommandLineProject\CommandLineProjectWorkspaceTests.cs (1)
24
tempFile.
WriteAllText
("class CSharpClass { }");
SolutionTests\SolutionTests.cs (2)
3306
file.
WriteAllText
(text2);
4505
var file = root.CreateFile(prefix: "massiveFile", extension: ".cs").
WriteAllText
("hello");
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (12)
PersistentStorage\AbstractPersistentStorageTests.cs (3)
978
var solutionFile = persistentFolder.CreateOrOpenFile("Solution1.sln").
WriteAllText
("");
987
var projectFile = persistentFolder.CreateOrOpenFile("Project1.csproj").
WriteAllText
("");
992
var documentFile = persistentFolder.CreateOrOpenFile("Document1.cs").
WriteAllText
("");
ProjectSystemShim\CPS\AnalyzersTests.cs (2)
26
var ruleSetFile = Temp.CreateFile().
WriteAllText
(
50
var ruleSetFile = Temp.CreateFile().
WriteAllText
(
ProjectSystemShim\LegacyProject\AnalyzersTests.cs (7)
30
var ruleSetFile = Temp.CreateFile().
WriteAllText
(
67
var ruleSetFile = Temp.CreateFile().
WriteAllText
(
95
var ruleSetFile = Temp.CreateFile().
WriteAllText
(
119
var ruleSetFile = Temp.CreateFile().
WriteAllText
(
161
var ruleSetFile = Temp.CreateFile().
WriteAllText
(
196
var ruleSetFile = Temp.CreateFile().
WriteAllText
(
232
var ruleSetFile = Temp.CreateFile().
WriteAllText
(ruleSetSource);
Roslyn.VisualStudio.Next.UnitTests (1)
Remote\SnapshotSerializationTests.cs (1)
568
tempCorlibXml.
WriteAllText
(@"<?xml version=""1.0"" encoding=""utf-8""?>
VBCSCompiler.UnitTests (17)
CompilerServerTests.cs (15)
115
file.
WriteAllText
(pair.Value);
223
var srcFile = tempDir.CreateFile("test.cs").
WriteAllText
(source).Path;
341
var srcFile = _tempDirectory.CreateFile("test.cs").
WriteAllText
("♕").Path;
363
var srcFile = _tempDirectory.CreateFile("test.vb").
WriteAllText
("♕").Path;
387
var srcFile = _tempDirectory.CreateFile("test.vb").
WriteAllText
("♕").Path;
1148
var srcFile = _tempDirectory.CreateFile("test.cs").
WriteAllText
("♕").Path;
1170
var srcFile = _tempDirectory.CreateFile("test.vb").
WriteAllText
(@"♕").Path;
1197
var srcFile = _tempDirectory.CreateFile("test.cs").
WriteAllText
("♕").Path;
1219
var srcFile = _tempDirectory.CreateFile("test.vb").
WriteAllText
(@"♕").Path;
1304
var srcFile = _tempDirectory.CreateFile("test.cs").
WriteAllText
("♕").Path;
1305
var rspFile = _tempDirectory.CreateFile("temp.rsp").
WriteAllText
(
1328
var srcFile = _tempDirectory.CreateFile("test.cs").
WriteAllText
("♕").Path;
1329
var rspFile = _tempDirectory.CreateFile("temp.rsp").
WriteAllText
(
1394
var srcFile = _tempDirectory.CreateFile("test.cs").
WriteAllText
("").Path;
1428
var srcFile = _tempDirectory.CreateFile("test.vb").
WriteAllText
("").Path;
TouchedFileLoggingTests.cs (2)
58
var source1 = Temp.CreateFile().
WriteAllText
(HelloWorldCS).Path;
109
var source1 = Temp.CreateFile().
WriteAllText
(HelloWorldVB).Path;