212 references to CreateFromImage
Microsoft.CodeAnalysis (2)
MetadataReference\MetadataReference.cs (2)
144
/// It is recommended to use <see cref="AssemblyMetadata.
CreateFromImage
(IEnumerable{byte})"/> or <see cref="ModuleMetadata.CreateFromImage(IEnumerable{byte})"/>
166
_ => AssemblyMetadata.
CreateFromImage
(peImage),
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
CodeActions\AddUsing\AddUsingTests.cs (1)
2052
{ "exprs", AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemCore).GetReference() }
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenTests.cs (1)
15134
var testReference = AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Metadata.BadDefaultParameterValue).GetReference();
Emit\CompilationEmitTests.cs (1)
894
var metadataRef = AssemblyMetadata.
CreateFromImage
(stream.ToArray()).GetReference();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\AccessCheckTests.cs (2)
952
var r1 = AssemblyMetadata.
CreateFromImage
(TestResources.General.C1).GetReference(filePath: @"c:\temp\a.dll", display: "R1");
953
var r2 = AssemblyMetadata.
CreateFromImage
(TestResources.General.C1).GetReference(filePath: @"c:\temp\a.dll", display: "R2");
Semantics\OverloadResolutionTestBase.cs (1)
30
var mscorlibRef = AssemblyMetadata.
CreateFromImage
(Net461.Resources.mscorlib).GetReference(display: "mscorlib");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (18)
Compilation\ReferenceManagerTests.cs (17)
41
var wimpl = AssemblyMetadata.
CreateFromImage
(TestResources.WinRt.WImpl).GetReference(display: "WImpl");
61
var v1 = AssemblyMetadata.
CreateFromImage
(TestResources.General.C1).GetReference(display: "C, V1");
64
var v2 = AssemblyMetadata.
CreateFromImage
(TestResources.General.C2).GetReference(display: "C, V2");
741
var r1 = AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemCore).GetReference(filePath: @"c:\temp\aa.dll", display: "System.Core.v4_0_30319.dll");
742
var r2 = AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemCore).GetReference(filePath: @"c:\temp\aa.dll", display: "System.Core.v4_0_30319.dll");
756
var r1 = AssemblyMetadata.
CreateFromImage
(TestResources.General.C1).GetReference(filePath: @"c:\temp\a.dll", display: "R1");
757
var r2 = AssemblyMetadata.
CreateFromImage
(TestResources.General.C1).GetReference(filePath: @"c:\temp\a.dll", display: "R2");
959
var ref1 = AssemblyMetadata.
CreateFromImage
(TestResources.General.C2).GetReference(embedInteropTypes: true, filePath: @"R:\A\MTTestLib1.dll");
960
var ref2 = AssemblyMetadata.
CreateFromImage
(TestResources.General.C2).GetReference(embedInteropTypes: false, filePath: @"R:\B\MTTestLib1.dll");
1126
using (AssemblyMetadata metadataLib1 = AssemblyMetadata.
CreateFromImage
(TestResources.WinRt.W1),
1127
metadataLib2 = AssemblyMetadata.
CreateFromImage
(TestResources.WinRt.W2))
1161
using (AssemblyMetadata metadataLib1 = AssemblyMetadata.
CreateFromImage
(TestResources.WinRt.W1),
1162
metadataLib2 = AssemblyMetadata.
CreateFromImage
(TestResources.WinRt.WB))
1191
using (AssemblyMetadata metadataLib1 = AssemblyMetadata.
CreateFromImage
(TestResources.WinRt.WB),
1192
metadataLib2 = AssemblyMetadata.
CreateFromImage
(TestResources.WinRt.WB_Version1))
2127
var c = CreateCompilation(source, new[] { AssemblyMetadata.
CreateFromImage
(new byte[0]).GetReference(display: "Empty.dll") });
2136
var md = AssemblyMetadata.
CreateFromImage
(TestResources.NetFX.Minimal.mincorlib);
Symbols\SymbolErrorTests.cs (1)
15031
var ref1 = AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.netModule.netModule1).GetReference(display: "NetModule.mod");
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (3)
CodeGen\WinRTCollectionTests.cs (2)
24
AssemblyMetadata.
CreateFromImage
(TestResources.WinRt.Windows_Languages_WinRTTest).GetReference(display: "WinRTTest"),
25
AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemCore).GetReference(display: "SystemCore")
Metadata\WinMdMetadataTests.cs (1)
234
WinRtRefs.Concat(new[] { AssemblyMetadata.
CreateFromImage
(TestResources.WinRt.W1).GetReference() }),
Microsoft.CodeAnalysis.Test.Utilities (153)
Mocks\TestReferences.cs (121)
22
() => AssemblyMetadata.
CreateFromImage
(TestResources.MetadataTests.NetModule01.AppCS).GetReference(display: "AppCS"),
45
() => AssemblyMetadata.
CreateFromImage
(TestResources.MetadataTests.InterfaceAndClass.CSClasses01).GetReference(display: "CSClasses01.dll"),
50
() => AssemblyMetadata.
CreateFromImage
(TestResources.MetadataTests.InterfaceAndClass.CSInterfaces01).GetReference(display: "CSInterfaces01.dll"),
55
() => AssemblyMetadata.
CreateFromImage
(TestResources.MetadataTests.InterfaceAndClass.VBClasses01).GetReference(display: "VBClasses01.dll"),
60
() => AssemblyMetadata.
CreateFromImage
(TestResources.MetadataTests.InterfaceAndClass.VBClasses02).GetReference(display: "VBClasses02.dll"),
65
() => AssemblyMetadata.
CreateFromImage
(TestResources.MetadataTests.InterfaceAndClass.VBInterfaces01).GetReference(display: "VBInterfaces01.dll"),
76
() => AssemblyMetadata.
CreateFromImage
(TestResources.NetFX.Minimal.mincorlib).GetReference(display: "mincorlib.dll"),
81
() => AssemblyMetadata.
CreateFromImage
(TestResources.NetFX.Minimal.minasync).GetReference(display: "minasync.dll"),
86
() => AssemblyMetadata.
CreateFromImage
(TestResources.NetFX.Minimal.minasynccorlib).GetReference(display: "minasynccorlib.dll"),
94
() => AssemblyMetadata.
CreateFromImage
(TestResources.NetFX.ValueTuple.tuplelib).GetReference(display: "System.ValueTuple.dll"),
102
() => AssemblyMetadata.
CreateFromImage
(Silverlight.System).GetReference(display: "System.v5.0.5.0_silverlight.dll"),
113
() => AssemblyMetadata.
CreateFromImage
(TestResources.DiagnosticTests.ErrTestLib01).GetReference(display: "ErrTestLib01.dll"),
121
() => AssemblyMetadata.
CreateFromImage
(TestResources.DiagnosticTests.ErrTestLib02).GetReference(display: "ErrTestLib02.dll"),
129
() => AssemblyMetadata.
CreateFromImage
(TestResources.DiagnosticTests.ErrTestLib11).GetReference(display: "ErrTestLib11.dll"),
137
() => AssemblyMetadata.
CreateFromImage
(TestResources.DiagnosticTests.ErrTestMod01).GetReference(display: "ErrTestMod01.dll"),
145
() => AssemblyMetadata.
CreateFromImage
(TestResources.DiagnosticTests.ErrTestMod02).GetReference(display: "ErrTestMod02.dll"),
153
() => AssemblyMetadata.
CreateFromImage
(TestResources.DiagnosticTests.badresfile).GetReference(display: "badresfile.res"),
162
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.MDTestLib1).GetReference(display: "MDTestLib1.dll"),
167
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.MDTestLib2).GetReference(display: "MDTestLib2.dll"),
172
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.VBConversions).GetReference(display: "VBConversions.dll"),
177
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.With_Spaces).GetReference(display: "With Spaces.dll"),
187
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.InheritIComparable).GetReference(display: "InheritIComparable.dll"),
192
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.BigVisitor).GetReference(display: "BigVisitor.dll"),
197
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.Properties).GetReference(display: "Properties.dll"),
202
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.PropertiesWithByRef).GetReference(display: "PropertiesWithByRef.dll"),
207
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.Indexers).GetReference(display: "Indexers.dll"),
212
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.Events).GetReference(display: "Events.dll"),
262
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.V1.MTTestLib1).GetReference(display: "MTTestLib1.dll"),
278
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.V1.MTTestLib2).GetReference(display: "MTTestLib2.dll"),
297
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.V2.MTTestLib1).GetReference(display: "MTTestLib1.dll"),
305
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.V2.MTTestModule1).GetReference(display: "MTTestModule1.netmodule"),
313
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.V2.MTTestLib3).GetReference(display: "MTTestLib3.dll"),
332
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.V3.MTTestLib1).GetReference(display: "MTTestLib1.dll"),
340
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.V3.MTTestModule1).GetReference(display: "MTTestModule1.netmodule"),
348
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.V3.MTTestLib4).GetReference(display: "MTTestLib4.dll"),
373
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.MultiModule.mod2).GetReference(display: "mod2.netmodule"),
378
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.MultiModule.mod3).GetReference(display: "mod3.netmodule"),
383
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.MultiModule.Consumer).GetReference(display: "Consumer.dll"),
391
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.DifferByCase.TypeAndNamespaceDifferByCase).GetReference(display: "TypeAndNamespaceDifferByCase.dll"),
396
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.DifferByCase.Consumer).GetReference(display: "Consumer.dll"),
401
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.DifferByCase.Consumer).GetReference(display: "CsharpCaseSen.dll"),
406
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.DifferByCase.CSharpDifferCaseOverloads).GetReference(display: "CSharpDifferCaseOverloads.dll"),
416
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.CorLibrary.GuidTest2).GetReference(display: "GuidTest2.exe"),
422
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.CorLibrary.NoMsCorLibRef).GetReference(display: "NoMsCorLibRef.dll"),
429
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.CorLibrary.FakeMsCorLib).GetReference(display: "FakeMsCorLib.dll"),
440
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.CustomModifiers.Modifiers).GetReference(display: "Modifiers.dll"),
451
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.CustomModifiers.ModoptTests).GetReference(display: "ModoptTests.dll"),
458
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.CustomModifiers.CppCli).GetReference(display: "CppCli.dll"),
466
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.CustomModifiers.GenericMethodWithModifiers).GetReference(display: "GenericMethodWithModifiers.dll"),
477
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Cyclic.Cyclic1).GetReference(display: "Cyclic1.dll"),
485
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Cyclic.Cyclic2).GetReference(display: "Cyclic2.dll"),
494
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.CyclicInheritance.Class1).GetReference(display: "Class1.dll"),
499
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.CyclicInheritance.Class2).GetReference(display: "Class2.dll"),
504
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.CyclicInheritance.Class3).GetReference(display: "Class3.dll"),
510
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.CyclicStructure.cycledstructs).GetReference(display: "cycledstructs.dll"),
521
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.RetargetingCycle.RetV1.ClassA).GetReference(display: "ClassA.dll"),
540
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.RetargetingCycle.RetV2.ClassA).GetReference(display: "ClassA.dll"),
548
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.RetargetingCycle.RetV2.ClassB).GetReference(display: "ClassB.dll"),
558
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Methods.CSMethods).GetReference(display: "CSMethods.Dll"),
563
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Methods.VBMethods).GetReference(display: "VBMethods.Dll"),
568
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Methods.ILMethods).GetReference(display: "ILMethods.Dll"),
573
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Methods.ByRefReturn).GetReference(display: "ByRefReturn.Dll"),
583
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Fields.CSFields).GetReference(display: "CSFields.Dll"),
591
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Fields.VBFields).GetReference(display: "VBFields.Dll"),
597
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Fields.ConstantFields).GetReference(display: "ConstantFields.Dll"),
605
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.MissingTypes.MDMissingType).GetReference(display: "MDMissingType.Dll"),
610
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.MissingTypes.MDMissingTypeLib).GetReference(display: "MDMissingTypeLib.Dll"),
615
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.MissingTypes.MissingTypesEquality1).GetReference(display: "MissingTypesEquality1.Dll"),
620
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.MissingTypes.MissingTypesEquality2).GetReference(display: "MissingTypesEquality2.Dll"),
625
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.MissingTypes.CL2).GetReference(display: "CL2.Dll"),
630
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.MissingTypes.CL3).GetReference(display: "CL3.Dll"),
640
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.TypeForwarders.TypeForwarder).GetReference(display: "TypeForwarder.Dll"),
648
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.TypeForwarders.TypeForwarderLib).GetReference(display: "TypeForwarderLib.Dll"),
656
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.TypeForwarders.TypeForwarderBase).GetReference(display: "TypeForwarderBase.Dll"),
701
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.Pia1).GetReference(display: "Pia1.dll"),
706
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.Pia1Copy).GetReference(display: "Pia1Copy.dll"),
711
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.Pia2).GetReference(display: "Pia2.dll"),
716
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.Pia3).GetReference(display: "Pia3.dll"),
721
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.Pia4).GetReference(display: "Pia4.dll"),
726
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.Pia5).GetReference(display: "Pia5.dll"),
731
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.GeneralPia).GetReference(display: "GeneralPia.dll"),
736
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.GeneralPiaCopy).GetReference(display: "GeneralPiaCopy.dll"),
741
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.NoPIAGenerics1_Asm1).GetReference(display: "NoPIAGenerics1-Asm1.dll"),
746
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.ExternalAsm1).GetReference(display: "ExternalAsm1.dll"),
751
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.Library1).GetReference(display: "Library1.dll"),
756
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.Library2).GetReference(display: "Library2.dll"),
761
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.LocalTypes1).GetReference(display: "LocalTypes1.dll"),
766
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.LocalTypes2).GetReference(display: "LocalTypes2.dll"),
771
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.LocalTypes3).GetReference(display: "LocalTypes3.dll"),
776
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.A).GetReference(display: "A.dll"),
781
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.B).GetReference(display: "B.dll"),
786
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.C).GetReference(display: "C.dll"),
791
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.D).GetReference(display: "D.dll"),
800
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.MissingPIAAttributes).GetReference(display: "MicrosoftPIAAttributes.dll"),
810
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Interface.StaticMethodInInterface).GetReference(display: "StaticMethodInInterface.dll"),
815
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Interface.MDInterfaceMapping).GetReference(display: "MDInterfaceMapping.dll"),
823
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.MDTestLib1).GetReference(display: "MDTestLib1.dll"),
838
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.CSharpExplicitInterfaceImplementation).GetReference(display: "CSharpExplicitInterfaceImplementation.dll"),
843
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.ILExplicitInterfaceImplementation).GetReference(display: "ILExplicitInterfaceImplementation.dll"),
851
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.CSharpExplicitInterfaceImplementationProperties).GetReference(display: "CSharpExplicitInterfaceImplementationProperties.dll"),
856
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.ILExplicitInterfaceImplementationProperties).GetReference(display: "ILExplicitInterfaceImplementationProperties.dll"),
864
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.CSharpExplicitInterfaceImplementationEvents).GetReference(display: "CSharpExplicitInterfaceImplementationEvents.dll"),
871
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.Regress40025DLL).GetReference(display: "Regress40025DLL.dll"),
878
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.WithEvents.SimpleWithEvents).GetReference(display: "SimpleWithEvents.dll"),
886
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.DelegatesWithoutInvoke).GetReference(display: "DelegatesWithoutInvoke.dll"),
891
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.DelegateByRefParamArray).GetReference(display: "DelegateByRefParamArray.dll"),
899
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Metadata.InvalidCharactersInAssemblyName).GetReference(display: "InvalidCharactersInAssemblyName.dll"),
904
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Metadata.MDTestAttributeDefLib).GetReference(display: "MDTestAttributeDefLib.dll"),
909
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Metadata.MDTestAttributeApplicationLib).GetReference(display: "MDTestAttributeApplicationLib.dll"),
914
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Metadata.AttributeInterop01).GetReference(display: "AttributeInterop01.dll"),
919
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Metadata.AttributeInterop02).GetReference(display: "AttributeInterop02.dll"),
924
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Metadata.AttributeTestLib01).GetReference(display: "AttributeTestLib01.dll"),
929
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Metadata.AttributeTestDef01).GetReference(display: "AttributeTestDef01.dll"),
934
() => AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Metadata.DynamicAttribute).GetReference(display: "DynamicAttribute.dll"),
942
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.Unavailable).GetReference(display: "Unavailable.dll"),
947
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.CSharpErrors).GetReference(display: "CSharpErrors.dll"),
952
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.ILErrors).GetReference(display: "ILErrors.dll"),
960
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.Culture_AR_SA).GetReference(display: "AR-SA"),
965
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.Culture_EN_US).GetReference(display: "EN-US"),
970
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.C1).GetReference(display: "C1"),
975
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.C2).GetReference(display: "C2"),
TestBase.cs (32)
102
var winmd = AssemblyMetadata.
CreateFromImage
(TestResources.WinRt.Windows).GetReference(display: "Windows");
105
AssemblyMetadata.
CreateFromImage
(TestResources.NetFX.WinRt.SystemRuntimeWindowsRuntime).GetReference(display: "System.Runtime.WindowsRuntime.dll");
108
AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemRuntime).GetReference(display: "System.Runtime.dll");
111
AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemObjectModel).GetReference(display: "System.ObjectModel.dll");
113
var uixaml = AssemblyMetadata.
CreateFromImage
(TestResources.NetFX.WinRt.SystemRuntimeWindowsRuntimeUIXaml).
116
var interop = AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemRuntimeInteropServicesWindowsRuntime).
120
var system = AssemblyMetadata.
CreateFromImage
(Net461.Resources.System).GetReference(display: "System.dll");
122
var mscor = AssemblyMetadata.
CreateFromImage
(Net461.Resources.mscorlib).GetReference(display: "mscorlib");
149
() => AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemCore).GetReference(display: "System.Core.v4_0_30319.dll"),
154
() => AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemCore).GetReference(display: "System.Core.v4_0_30319_17929.dll"),
159
() => AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemRuntimeSerialization).GetReference(display: "System.Runtime.Serialization.v4_0_30319_17929.dll"),
164
() => AssemblyMetadata.
CreateFromImage
(Net461.ReferenceInfos.SystemCore.ImageBytes).GetReference(display: "System.Core.v4_6_1038_0.dll"),
169
() => AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemWindowsForms).GetReference(display: "System.Windows.Forms.v4_0_30319.dll"),
174
() => AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemDrawing).GetReference(display: "System.Drawing.v4_0_30319.dll"),
179
() => AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemData).GetReference(display: "System.Data.v4_0_30319.dll"),
184
() => AssemblyMetadata.
CreateFromImage
(Net461.Resources.mscorlib).GetReference(display: "mscorlib.v4_0_30319.dll"),
216
() => AssemblyMetadata.
CreateFromImage
(Net461.ReferenceInfos.mscorlib.ImageBytes).GetReference(display: "mscorlib.v4_6_1038_0.dll", filePath: @"Z:\FxReferenceAssembliesUri"),
246
() => AssemblyMetadata.
CreateFromImage
(Net461.Resources.MicrosoftCSharp).GetReference(display: "Microsoft.CSharp.v4.0.30319.dll"),
251
() => AssemblyMetadata.
CreateFromImage
(NetStandard20.Resources.netstandard).GetReference(display: "netstandard20.netstandard.dll"),
257
() => AssemblyMetadata.
CreateFromImage
(Net461.Resources.System).GetReference(display: "System.v4_0_30319.dll"),
262
() => AssemblyMetadata.
CreateFromImage
(Net461.ReferenceInfos.System.ImageBytes).GetReference(display: "System.v4_6_1038_0.dll"),
267
() => AssemblyMetadata.
CreateFromImage
(Net461.Resources.System).GetReference(display: "System.v4_0_30319_17929.dll"),
272
() => AssemblyMetadata.
CreateFromImage
(Net20.Resources.System).GetReference(display: "System.v2_0_50727.dll"),
277
() => AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemXml).GetReference(display: "System.Xml.v4_0_30319.dll"),
282
() => AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemXmlLinq).GetReference(display: "System.Xml.Linq.v4_0_30319.dll"),
287
() => AssemblyMetadata.
CreateFromImage
(Net461.Resources.mscorlib).GetReference(display: "mscorlib.dll"),
292
() => AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemRuntime).GetReference(display: "System.Runtime.dll"),
297
() => AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemThreading).GetReference(display: "System.Threading.dll"),
302
() => AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemThreadingTasks).GetReference(display: "System.Threading.Tasks.dll"),
307
() => AssemblyMetadata.
CreateFromImage
(TestResources.NetFX.PortableProfile7.Mscorlib).GetReference(display: "mscorlib.dll"),
312
() => AssemblyMetadata.
CreateFromImage
(TestResources.NetFX.PortableProfile7.SystemRuntime).GetReference(display: "System.Runtime.dll"),
317
() => AssemblyMetadata.
CreateFromImage
(TestResources.General.FSharpTestLibrary).GetReference(display: "FSharpTestLibrary.dll"),
Microsoft.CodeAnalysis.UnitTests (14)
MetadataReferences\AssemblyMetadataTests.cs (4)
23
Assert.Throws<ArgumentNullException>(() => AssemblyMetadata.
CreateFromImage
(enumerableImage));
26
Assert.Throws<ArgumentNullException>(() => AssemblyMetadata.
CreateFromImage
(arrayImage));
47
using (var a = AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.MultiModule.MultiModuleDll))
149
var metadata = AssemblyMetadata.
CreateFromImage
(TestResources.MetadataTests.Invalid.IncorrectCustomAssemblyTableSize_TooManyMethodSpecs);
MetadataReferences\MetadataReferenceTests.cs (7)
288
var assembly = AssemblyMetadata.
CreateFromImage
(TestResources.General.C1);
416
var assembly = AssemblyMetadata.
CreateFromImage
(TestResources.General.C1);
442
r = AssemblyMetadata.
CreateFromImage
(TestResources.General.C1).GetReference(display: @"dddd");
445
r = AssemblyMetadata.
CreateFromImage
(TestResources.General.C1).GetReference(filePath: @"c:\blah", display: @"dddd");
529
var i1 = AssemblyMetadata.
CreateFromImage
(Net461.Resources.mscorlib).GetReference(display: "i1");
530
var i2 = AssemblyMetadata.
CreateFromImage
(Net461.Resources.mscorlib).GetReference(display: "i2");
568
var corlib = AssemblyMetadata.
CreateFromImage
(Net461.Resources.mscorlib).
MetadataReferences\ModuleNoPiaTests.cs (3)
17
using (AssemblyMetadata piaMetadata = AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.Pia1),
18
metadata1 = AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.LocalTypes1),
19
metadata2 = AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.LocalTypes2))
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (5)
CodeGen\CodeGenTests.vb (1)
13657
Dim testReference = AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.Metadata.BadDefaultParameterValue).GetReference()
CodeGen\WinRTCollectionTests.vb (2)
21
listRefs.Add(AssemblyMetadata.
CreateFromImage
(TestResources.WinRt.Windows_Languages_WinRTTest).GetReference(display:="WinRTTest"))
22
listRefs.Add(AssemblyMetadata.
CreateFromImage
(Net461.Resources.SystemCore).GetReference(display:="SystemCore"))
Emit\CompilationEmitTests.vb (1)
649
Dim metadataRef = AssemblyMetadata.
CreateFromImage
(stream.ToArray()).GetReference()
Emit\NoPiaEmbedTypes.vb (1)
4537
AssemblyMetadata.
CreateFromImage
(TestResources.SymbolsTests.NoPia.ParametersWithoutNames).
Microsoft.CodeAnalysis.VisualBasic.Scripting.UnitTests (1)
ScriptTests.vb (1)
22
Private Shared ReadOnly s_msvbReference As PortableExecutableReference = AssemblyMetadata.
CreateFromImage
(Net461.Resources.MicrosoftVisualBasic).GetReference()
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (6)
Binding\LookupTests.vb (1)
944
Dim nonSharedMscorlibReference = AssemblyMetadata.
CreateFromImage
(Net461.Resources.mscorlib).GetReference(display:="mscorlib.v4_0_30319.dll")
Compilation\CompilationAPITests.vb (1)
1166
Dim comp = VisualBasicCompilation.Create("Compilation", references:={AssemblyMetadata.
CreateFromImage
(TestResources.MetadataTests.NetModule01.ModuleVB01).GetReference()})
Compilation\ReferenceManagerTests.vb (4)
671
Dim r1 = AssemblyMetadata.
CreateFromImage
(TestResources.General.C1).GetReference(filePath:="c:\temp\a.dll", display:="R1")
672
Dim r2 = AssemblyMetadata.
CreateFromImage
(TestResources.General.C1).GetReference(filePath:="c:\temp\a.dll", display:="R2")
1644
Dim c = CreateCompilationWithMscorlib40AndReferences(source, {AssemblyMetadata.
CreateFromImage
({}).GetReference(display:="Empty.dll")}, TestOptions.ReleaseDll)
1651
Dim md = AssemblyMetadata.
CreateFromImage
(TestResources.NetFX.Minimal.mincorlib)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (4)
SymbolsTests\Metadata\WinMdTypeTests.vb (1)
68
Dim comp = CreateCompilationWithWinRt(source).AddReferences(AssemblyMetadata.
CreateFromImage
(TestResources.WinRt.W1).GetReference())
SymbolsTests\MetadataFileReferenceCompilationTests.vb (3)
60
Dim mscorlibMetadata = AssemblyMetadata.
CreateFromImage
(Net461.Resources.mscorlib)
86
Dim metadata1 = AssemblyMetadata.
CreateFromImage
(TestResources.General.C1)
87
Dim metadata2 = AssemblyMetadata.
CreateFromImage
(TestResources.General.C2)