100 references to WriteAllBytes
InteractiveHost.UnitTests (7)
InteractiveHostCoreInitTests.cs (1)
55var dll = Temp.CreateFile(extension: ".dll").WriteAllBytes(TestResources.MetadataTests.InterfaceAndClass.CSInterfaces01);
InteractiveHostDesktopInitTests.cs (1)
28var dll = Temp.CreateFile(extension: ".dll").WriteAllBytes(TestResources.MetadataTests.InterfaceAndClass.CSInterfaces01);
InteractiveHostDesktopTests.cs (5)
458var file1 = dir1.CreateFile("c.dll").WriteAllBytes(TestResources.General.C1); 461var file2 = dir2.CreateFile("c.dll").WriteAllBytes(TestResources.General.C2); 910var dll = dir.CreateFile("MultiModule.dll").WriteAllBytes(TestResources.SymbolsTests.MultiModule.MultiModuleDll); 911dir.CreateFile("mod2.netmodule").WriteAllBytes(TestResources.SymbolsTests.MultiModule.mod2); 912dir.CreateFile("mod3.netmodule").WriteAllBytes(TestResources.SymbolsTests.MultiModule.mod3);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (7)
CommandLineTests.cs (4)
398var src = dir.CreateFile("sjis.cs").WriteAllBytes(TestResources.General.ShiftJisSource); 418var src = dir.CreateFile("sjis.cs").WriteAllBytes(TestResources.General.ShiftJisSource); 875string tmpFileName = Temp.CreateFile().WriteAllBytes(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }).Path; 2308sl.WriteAllBytes(slContent);
TouchedFileLoggingTests.cs (3)
79var silverlight = Temp.CreateFile().WriteAllBytes(Silverlight.System).Path; 80var net4_0dll = Temp.CreateFile().WriteAllBytes(Net461.Resources.System).Path; 113var snkPath = Temp.CreateFile("TestKeyPair_", ".snk").WriteAllBytes(TestResources.General.snKey).Path;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
Emit\CompilationEmitTests.cs (1)
1996var snk = Temp.CreateFile().WriteAllBytes(TestResources.General.snKey);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (8)
Attributes\EmitTestStrongNameProvider.cs (1)
32var keyFile = Temp.CreateFile().WriteAllBytes(TestResources.General.snKey).Path;
Attributes\InternalsVisibleToAndStrongNameTests.cs (7)
380var tempFile = Temp.CreateFile().WriteAllBytes(new byte[] { 1, 2, 3, 4 }); 533var snk = Temp.CreateFile().WriteAllBytes(TestResources.General.snKey); 606var snk = Temp.CreateFile().WriteAllBytes(TestResources.General.snKey); 628var pubKeyFile = Temp.CreateFile().WriteAllBytes(TestResources.General.snPublicKey); 650var pubKeyFile = Temp.CreateFile().WriteAllBytes(TestResources.General.snPublicKey); 715var snk = Temp.CreateFile().WriteAllBytes(TestResources.General.snKey); 736var snk = Temp.CreateFile().WriteAllBytes(TestResources.General.snKey);
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (4)
InteractiveSessionReferencesTests.cs (4)
343var c1 = Temp.CreateFile(extension: ".dll").WriteAllBytes(TestResources.General.C1); 344var c2 = Temp.CreateFile(extension: ".dll").WriteAllBytes(TestResources.General.C2); 359var c1 = Temp.CreateFile(extension: ".dll").WriteAllBytes(TestResources.General.C1); 360var c2 = Temp.CreateFile(extension: ".dll").WriteAllBytes(TestResources.General.C2);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (2)
CommandLineRunnerTests.cs (2)
632var main = dir.CreateFile("C.dll").WriteAllBytes(TestResources.General.C1); 724var reference = Temp.CreateFile(extension: ".dll").WriteAllBytes(TestResources.General.C1);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (17)
Compilation\GetUnusedImportDirectivesTests.cs (1)
212var snkPath = Temp.CreateFile().WriteAllBytes(TestResources.General.snKey).Path;
Compilation\ReferenceManagerTests.cs (7)
852string p1 = Temp.CreateFile().WriteAllBytes(TestResources.General.MDTestLib1).Path; 924string p1 = dir.CreateFile("netModule1.netmodule").WriteAllBytes(TestResources.SymbolsTests.netModule.netModule1).Path; 993string p1 = Temp.CreateFile().WriteAllBytes(Net461.Resources.SystemCore).Path; 1013var p1 = Temp.CreateFile().WriteAllBytes(Net461.Resources.System).Path; 1014var p2 = Temp.CreateFile().WriteAllBytes(Net20.Resources.System).Path; 1270var path1 = Temp.CreateFile().WriteAllBytes(TestResources.General.MDTestLib1).Path; 1271var path2 = Temp.CreateFile().WriteAllBytes(TestResources.General.MDTestLib2).Path;
Symbols\CompilationCreationTests.cs (9)
2677var data = Temp.CreateFile().WriteAllBytes(Net461.Resources.SystemData).Path; 2678var core = Temp.CreateFile().WriteAllBytes(Net461.Resources.SystemCore).Path; 2679var xml = Temp.CreateFile().WriteAllBytes(Net461.Resources.SystemXml).Path; 2680var system = Temp.CreateFile().WriteAllBytes(Net461.Resources.System).Path; 2722var data = Temp.CreateFile().WriteAllBytes(Net461.Resources.SystemData).Path; 2723var core = Temp.CreateFile().WriteAllBytes(Net461.Resources.SystemCore).Path; 2724var system = Temp.CreateFile().WriteAllBytes(Net461.Resources.System).Path; 2774var csClasses01 = Temp.CreateFile().WriteAllBytes(TestResources.MetadataTests.InterfaceAndClass.CSClasses01).Path; 2775var csInterfaces01 = Temp.CreateFile().WriteAllBytes(TestResources.MetadataTests.InterfaceAndClass.CSInterfaces01).Path;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Emit\CompilationOutputFilesTests.cs (1)
38var pdbFile = dir.CreateFile("a.pdb").WriteAllBytes(pdbStream.ToArray());
Microsoft.CodeAnalysis.Features.UnitTests (7)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (7)
62var sourceFileA = dir.CreateFile("A.cs").WriteAllBytes(sourceBytesA1); 63var sourceFileB = dir.CreateFile("B.cs").WriteAllBytes(sourceBytesB1); 64var sourceFileC = dir.CreateFile("C.cs").WriteAllBytes(sourceBytesC1); 65var sourceFileD = dir.CreateFile("dummy").WriteAllBytes(sourceBytesD1); 66var sourceFileE = dir.CreateFile("E.cs").WriteAllBytes(sourceBytesE1); 196var moduleFile = Temp.CreateFile().WriteAllBytes(TestResources.Basic.Members); 306var moduleFile = Temp.CreateFile().WriteAllBytes(TestResources.Basic.Members);
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (9)
MetadataShadowCopyProviderTests.cs (9)
85var dll = dir.CreateFile("a.dll").WriteAllBytes(TestResources.MetadataTests.InterfaceAndClass.CSClasses01); 124var dll = Temp.CreateFile("a.dll").WriteAllBytes(TestResources.MetadataTests.InterfaceAndClass.CSClasses01); 140string path0 = dir.CreateFile("MultiModule.dll").WriteAllBytes(TestResources.SymbolsTests.MultiModule.MultiModuleDll).Path; 141string path1 = dir.CreateFile("mod2.netmodule").WriteAllBytes(TestResources.SymbolsTests.MultiModule.mod2).Path; 142string path2 = dir.CreateFile("mod3.netmodule").WriteAllBytes(TestResources.SymbolsTests.MultiModule.mod3).Path; 189string f1 = Temp.CreateFile().WriteAllBytes(TestResources.SymbolsTests.MultiModule.MultiModuleDll).Path; 197var dll = dir.CreateFile("a.dll").WriteAllBytes(TestResources.MetadataTests.InterfaceAndClass.CSClasses01); 210var dll2 = dir2.CreateFile("a2.dll").WriteAllBytes(TestResources.MetadataTests.InterfaceAndClass.CSClasses01); 224var dll = dir.CreateFile("a.dll").WriteAllBytes(TestResources.MetadataTests.InterfaceAndClass.CSClasses01);
Microsoft.CodeAnalysis.Test.Utilities (1)
TempFiles\TempFile.cs (1)
121return WriteAllBytes(File.ReadAllBytes(path));
Microsoft.CodeAnalysis.UnitTests (10)
Analyzers\AnalyzerFileReferenceTests.cs (2)
311corlib.WriteAllBytes(TestResources.NetFX.Minimal.mincorlib); 340corlib.WriteAllBytes(TestResources.NetFX.Minimal.mincorlib);
MetadataReferences\AssemblyMetadataTests.cs (4)
59var mm = dir.CreateFile("MultiModule.dll").WriteAllBytes(TestResources.SymbolsTests.MultiModule.MultiModuleDll).Path; 60dir.CreateFile("mod2.netmodule").WriteAllBytes(TestResources.SymbolsTests.MultiModule.mod2); 61dir.CreateFile("mod3.netmodule").WriteAllBytes(TestResources.SymbolsTests.MultiModule.mod3); 141var invalidModuleName = Temp.CreateFile().WriteAllBytes(TestResources.MetadataTests.Invalid.InvalidModuleName);
MetadataReferences\MetadataReferenceTests.cs (3)
95var file = Temp.CreateFile().WriteAllBytes(Net461.Resources.mscorlib); 161var file = Temp.CreateFile().WriteAllBytes(peImage); 185var file = Temp.CreateFile().WriteAllBytes(peImage);
Text\StringTextDecodingTests.cs (1)
218string path = Temp.CreateFile().WriteAllBytes(encoding.GetBytes(expectedText)).Path;
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (10)
CommandLineTests.vb (9)
991Dim tmpFileName As String = Temp.CreateFile().WriteAllBytes(New Byte() {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}).Path 1011Dim badres = Temp.CreateFile().WriteAllBytes(New Byte() {0, 0}).Path 4948Dim binaryPath = Temp.CreateFile().WriteAllBytes(Net461.Resources.mscorlib).Path 5154newVbCore.WriteAllBytes(File.ReadAllBytes(Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(), "Microsoft.VisualBasic.dll"))) 5245sysRuntime.WriteAllBytes(File.ReadAllBytes(Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(), "System.Runtime.dll"))) 5254sysRuntime.WriteAllBytes({0, 1, 2, 3, 4, 5}) 5264msCorLib.WriteAllBytes(File.ReadAllBytes(Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(), "mscorlib.dll"))) 5310msCorLib.WriteAllBytes(File.ReadAllBytes(Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(), "mscorlib.dll"))) 6469file.WriteAllBytes(source)
TouchedFileLoggingTests.vb (1)
65Dim snkPath = Temp.CreateFile("TestKeyPair_", ".snk").WriteAllBytes(TestResources.General.snKey).Path
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (10)
Attributes\InternalsVisibleToAndStrongNameTests.vb (10)
444Dim snk = Temp.CreateFile().WriteAllBytes(TestResources.General.snKey) 493Dim tmp = Temp.CreateFile().WriteAllBytes(New Byte() {1, 2, 3, 4}) 2041Dim snk = Temp.CreateFile().WriteAllBytes(TestResources.General.snKey) 2049Dim snk = Temp.CreateFile().WriteAllBytes(TestResources.General.snPublicKey) 2057Dim snk = Temp.CreateFile().WriteAllBytes(TestResources.General.snKey2) 2065Dim snk = Temp.CreateFile().WriteAllBytes(TestResources.General.snPublicKey2) 2103Dim snk = Temp.CreateFile().WriteAllBytes(TestResources.General.snKey) 2128Dim snk = Temp.CreateFile().WriteAllBytes(TestResources.General.snKey) 2142Dim snk = Temp.CreateFile().WriteAllBytes(TestResources.General.snKey) 2167Dim snk = Temp.CreateFile().WriteAllBytes(TestResources.General.snKey)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
WorkspaceTestBase.cs (1)
62file.WriteAllBytes((byte[])fileContent);
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SolutionTests\SolutionTests.cs (1)
1606fileD.WriteAllBytes(bytes);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
ProjectSystemShim\VisualStudioCompilationOutputFilesTests.cs (1)
47pdbFile.WriteAllBytes(pdbStream.ToArray());
VBCSCompiler.UnitTests (3)
AnalyzerConsistencyCheckerTests.cs (1)
202dllFile.WriteAllBytes(NetStandard20.Resources.SystemCore);
CompilerServerTests.cs (2)
1246_tempDirectory.CreateFile("mscorlib20.dll").WriteAllBytes(Net20.Resources.mscorlib); 1247_tempDirectory.CreateFile("mscorlib40.dll").WriteAllBytes(Net40.Resources.mscorlib);