87 references to EmitToStream
IdeCoreBenchmarks (1)
SwitchStatementBenchmarks.cs (1)
76return compilation.EmitToStream();
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (50)
CodeGen\CodeGenMscorlib.cs (6)
248var reference1 = MetadataReference.CreateFromStream(compilation1.EmitToStream()); 282var reference1 = MetadataReference.CreateFromStream(compilation1.EmitToStream()); 319var reference1 = MetadataReference.CreateFromStream(compilation1.EmitToStream()); 357var reference1 = MetadataReference.CreateFromStream(compilation1.EmitToStream()); 416var reference1 = MetadataReference.CreateFromStream(compilation1.EmitToStream()); 478var reference1 = MetadataReference.CreateFromStream(compilation1.EmitToStream());
CodeGen\CodeGenTupleTest.cs (2)
22773using (ModuleMetadata block = ModuleMetadata.CreateFromStream(comp.EmitToStream())) 22813using (ModuleMetadata block = ModuleMetadata.CreateFromStream(comp.EmitToStream()))
CodeGen\EventTests.cs (1)
647var reference1 = MetadataReference.CreateFromStream(compilation1.EmitToStream());
CodeGen\FixedSizeBufferTests.cs (1)
573references: new MetadataReference[] { MetadataReference.CreateFromStream(comp1.EmitToStream()) },
Emit\CompilationEmitTests.cs (30)
1206var image1 = comp1.EmitToStream(EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(includePrivateMembers)); 1210var image2 = comp2.EmitToStream(EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(includePrivateMembers)); 3469var metadataReader = ModuleMetadata.CreateFromStream(compilation.EmitToStream()).MetadataReader; 3486peHeaders = new PEHeaders(compilation.EmitToStream()); 3490peHeaders = new PEHeaders(compilation.EmitToStream()); 3494peHeaders = new PEHeaders(compilation.EmitToStream()); 3500peHeaders = new PEHeaders(compilation.EmitToStream()); 3506peHeaders = new PEHeaders(compilation.EmitToStream()); 3525var peHeaders = new PEHeaders(compilation.EmitToStream()); 3559var peHeaders = new PEHeaders(compilation.EmitToStream()); 3609var peHeaders = new PEHeaders(compilation.EmitToStream()); 3649var peHeaders = new PEHeaders(compilation.EmitToStream()); 3689var peHeaders = new PEHeaders(compilation.EmitToStream()); 3721var peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(highEntropyVirtualAddressSpace: true))); 3739var peHeaders = new PEHeaders(compilation.EmitToStream()); 3757var peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(baseAddress: 0x0000000010111111))); 3762peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(baseAddress: 0x8000))); 3767peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(baseAddress: 0x7fff))); 3772peHeaders = new PEHeaders(compilation.EmitToStream(options: EmitOptions.Default)); 3777peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(baseAddress: 0xffff7fff))); 3782peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(baseAddress: 0xffff8000))); 3786peHeaders = new PEHeaders(compilation.EmitToStream(options: EmitOptions.Default)); 3791peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(baseAddress: 0xffffffffffff7fff))); 3796peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(baseAddress: 0xffffffffffff8000))); 3811var peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(fileAlignment: 1024))); 4213using (ModuleMetadata block = ModuleMetadata.CreateFromStream(compilation.EmitToStream())) 4611CompileAndVerify(p2, new[] { MetadataReference.CreateFromStream(c1.EmitToStream()) }, expectedOutput: "0"); 4621var metadataRef = ModuleMetadata.CreateFromStream(comp.EmitToStream()).GetReference(); 5070var peReader = ModuleMetadata.CreateFromStream(compilation.EmitToStream()).Module.GetMetadataReader(); 5142using (var stream = compilation.EmitToStream())
Emit\DeterministicTests.cs (1)
343using (var stream = forwardingCompilation.EmitToStream())
Emit\EmitMetadataTests.cs (2)
2235assemblyName: "46B9C2B2-B7A0-45C5-9EF9-28DDF739FD9E").EmitToStream(options); 2424assemblyName: "B37A4FCD-ED76-4924-A2AD-298836056E00").EmitToStream(options);
Emit\NoPiaEmbedTypes.cs (6)
4814references: new MetadataReference[] { MetadataReference.CreateFromStream(piaCompilation2.EmitToStream()) }); 4901references: new MetadataReference[] { MetadataReference.CreateFromStream(piaCompilation2.EmitToStream()) }); 5217references: new MetadataReference[] { MetadataReference.CreateFromStream(piaCompilation2.EmitToStream()) }); 5378references: new MetadataReference[] { MetadataReference.CreateFromStream(piaCompilation2.EmitToStream()) }); 5534var NetImpl_1_Image = NetImpl_1_Compilation.EmitToStream(); 5539var NetImpl_2_Image = NetImpl_2_Compilation.EmitToStream();
Emit\OptionalArgumentsTests.cs (1)
184references: new[] { MetadataReference.CreateFromStream(comp1.EmitToStream()) },
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Emit\EditAndContinue\AssemblyReferencesTests.cs (2)
68var md1 = AssemblyMetadata.CreateFromStream(compilation0.EmitToStream()); 137var md1 = AssemblyMetadata.CreateFromStream(CreateEmptyCompilation(srcPE, parseOptions: parseOptions, references: new[] { MscorlibRef, SystemRef }).EmitToStream());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (16)
Attributes\AttributeTests.cs (2)
4883syntaxTrees: new[] { Parse("public enum Bar { Baz }") }).EmitToStream(options: new EmitOptions(metadataOnly: true)); 4892"public class Goo { }") }).EmitToStream(options: new EmitOptions(metadataOnly: true));
Attributes\AttributeTests_WellKnownAttributes.cs (3)
3142var image = compilation.EmitToStream(); 6230var peReference = MetadataReference.CreateFromStream(CreateCompilation(peSource).EmitToStream()); 10696var metadata = ModuleMetadata.CreateFromStream(comp.EmitToStream());
Attributes\InternalsVisibleToAndStrongNameTests.cs (7)
590using (var outStream = comp.EmitToStream()) 849var otherStream = CreateCompilation(s, options: TestOptions.SigningReleaseDll, parseOptions: parseOptions).EmitToStream(); 1578var outStrm = other.EmitToStream(); 1590var outStrm = other.EmitToStream(); 1740var stream = compilation.EmitToStream(emitOptions); 2417CompileAndVerify(other.WithReferences(new[] { other.References.ElementAt(0), MetadataReference.CreateFromStream(unsigned.EmitToStream()) })).VerifyDiagnostics(); 2444other.WithReferences(new []{other.References.ElementAt(0), MetadataReference.CreateFromStream(unsigned.EmitToStream()) })};
FlowAnalysis\StructTests.cs (4)
545var metadataReference = MetadataReference.CreateFromStream(comp1.EmitToStream()); 605var metadataReference = MetadataReference.CreateFromStream(comp1.EmitToStream()); 638var metadataReference = MetadataReference.CreateFromStream(comp1.EmitToStream()); 683var metadataReference = MetadataReference.CreateFromStream(comp1.EmitToStream());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (7)
Semantics\ColorColorTests.cs (4)
1581var ref1 = MetadataReference.CreateFromStream(comp1.EmitToStream()); 1622var ref1 = MetadataReference.CreateFromStream(comp1.EmitToStream()); 1660var ref1 = MetadataReference.CreateFromStream(comp1.EmitToStream()); 1701var ref1 = MetadataReference.CreateFromStream(comp1.EmitToStream());
Semantics\ForEachTests.cs (1)
3071var reference1 = MetadataReference.CreateFromStream(compilation1.EmitToStream());
Semantics\SuppressAccessibilityChecksTests.cs (2)
31var referenceA = MetadataReference.CreateFromStream(compilationA.EmitToStream()); 153var referenceA = MetadataReference.CreateFromStream(compilationA.EmitToStream());
Microsoft.CodeAnalysis.Test.Utilities (3)
Mocks\Silverlight.cs (2)
94var mscorlib = mscorlibCompilation.EmitToStream(EmitOptions.Default.WithRuntimeMetadataVersion("v4.0.30319")); 102var system = systemCompilation.EmitToStream();
PDB\TestMetadataReferenceInfo.cs (1)
54var emitStream = compilation.EmitToStream(emitOptions);
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
6498Dim peHeaders = New PEHeaders(comp.EmitToStream(New EmitOptions(subsystemVersion:=SubsystemVersion.Create(5, 1))))
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (5)
Attributes\InternalsVisibleToAndStrongNameTests.vb (5)
56Using outStream = comp.EmitToStream() 1186Dim peHeaders = New PEHeaders(other.EmitToStream()) 1366Dim peHeaders = New PEHeaders(other.EmitToStream()) 1556other.EmitToStream(), 1758Dim peHeaders = New PEHeaders(other.EmitToStream())
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Compilation\SuppressAccessibilityChecksTests.vb (2)
32Dim referenceA = MetadataReference.CreateFromStream(compilationA.EmitToStream()) 172Dim referenceA = MetadataReference.CreateFromStream(compilationA.EmitToStream())