246 references to MetadataImageKind
BuildValidator (1)
LocalReferenceResolver.cs (1)
138kind: MetadataImageKind.Assembly,
Microsoft.CodeAnalysis (62)
CommandLine\CommonCompiler.ExistingReferencesResolver.cs (1)
53if (peReference == null || peReference.Properties.Kind != MetadataImageKind.Assembly)
MetadataReference\AssemblyMetadata.cs (4)
431/// Returns the metadata kind. <see cref="MetadataImageKind"/> 433public override MetadataImageKind Kind 435get { return MetadataImageKind.Assembly; } 454return new MetadataImageReference(this, new MetadataReferenceProperties(MetadataImageKind.Assembly, aliases, embedInteropTypes), documentation, filePath, display);
MetadataReference\CompilationReference.cs (4)
24Debug.Assert(properties.Kind != MetadataImageKind.Module); 44return new MetadataReferenceProperties(MetadataImageKind.Assembly, aliases, embedInteropTypes); 89if (properties.Kind == MetadataImageKind.Module) 99if (properties.Kind == MetadataImageKind.Module)
MetadataReference\Metadata.cs (2)
46/// Retrieves the <see cref="MetadataImageKind"/> for this instance. 48public abstract MetadataImageKind Kind { get; }
MetadataReference\MetadataImageKind.cs (3)
25internal static bool IsValid(this MetadataImageKind kind) 27return kind >= MetadataImageKind.Assembly && kind <= MetadataImageKind.Module;
MetadataReference\MetadataImageReference.cs (2)
53return _display ?? FilePath ?? (Properties.Kind == MetadataImageKind.Assembly ? CodeAnalysisResources.InMemoryAssembly : CodeAnalysisResources.InMemoryModule); 60sb.Append(Properties.Kind == MetadataImageKind.Module ? "Module" : "Assembly");
MetadataReference\MetadataReference.cs (10)
96/// <param name="properties">Reference properties (extern aliases, type embedding, <see cref="MetadataImageKind"/>).</param> 127MetadataImageKind.Module => ModuleMetadata.CreateFromImage(peImage), 138/// <param name="properties">Reference properties (extern aliases, type embedding, <see cref="MetadataImageKind"/>).</param> 165MetadataImageKind.Module => ModuleMetadata.CreateFromImage(peImage), 177/// <param name="properties">Reference properties (extern aliases, type embedding, <see cref="MetadataImageKind"/>).</param> 208MetadataImageKind.Module => ModuleMetadata.CreateFromStream(peStream, PEStreamOptions.PrefetchEntireImage), 220/// <param name="properties">Reference properties (extern aliases, type embedding, <see cref="MetadataImageKind"/>).</param> 274if (properties.Kind == MetadataImageKind.Module) 316/// <exception cref="ArgumentException"><paramref name="properties"/>.<see cref="MetadataReferenceProperties.Kind"/> is not <see cref="MetadataImageKind.Assembly"/>.</exception> 349if (properties.Kind != MetadataImageKind.Assembly)
MetadataReference\MetadataReferenceProperties.cs (11)
18private readonly MetadataImageKind _kind; 25public static MetadataReferenceProperties Module => new MetadataReferenceProperties(MetadataImageKind.Module); 30public static MetadataReferenceProperties Assembly => new MetadataReferenceProperties(MetadataImageKind.Assembly); 38public MetadataReferenceProperties(MetadataImageKind kind = MetadataImageKind.Assembly, ImmutableArray<string> aliases = default, bool embedInteropTypes = false) 45if (kind == MetadataImageKind.Module) 75internal MetadataReferenceProperties(MetadataImageKind kind, ImmutableArray<string> aliases, bool embedInteropTypes, bool hasRecursiveAliases) 85/// <see cref="Kind"/> is <see cref="MetadataImageKind.Module"/>, as modules can't be aliased. 96/// <see cref="Kind"/> is <see cref="MetadataImageKind.Module"/>, as modules can't be aliased. 106/// <exception cref="ArgumentException"><see cref="Kind"/> is <see cref="MetadataImageKind.Module"/>, as interop types can't be embedded from modules.</exception> 123public MetadataImageKind Kind => _kind;
MetadataReference\ModuleMetadata.cs (3)
350/// Returns the <see cref="MetadataImageKind"/> for this instance. 352public override MetadataImageKind Kind 354get { return MetadataImageKind.Module; }
MetadataReference\PortableExecutableReference.cs (3)
186internal static Diagnostic ExceptionToDiagnostic(Exception e, CommonMessageProvider messageProvider, Location location, string display, MetadataImageKind kind) 190int errorCode = (kind == MetadataImageKind.Assembly) ? messageProvider.ERR_InvalidAssemblyMetadata : messageProvider.ERR_InvalidModuleMetadata; 201int errorCode = (kind == MetadataImageKind.Assembly) ? messageProvider.ERR_ErrorOpeningAssemblyFile : messageProvider.ERR_ErrorOpeningModuleFile;
PEWriter\MetadataWriter.PortablePdb.cs (2)
995MetadataImageKind.Assembly => 1, 996MetadataImageKind.Module => 0,
ReferenceManager\CommonReferenceManager.Binding.cs (3)
423if (explicitReferenceMapping.IsSkipped || explicitReferenceMapping.Kind == MetadataImageKind.Module) 451if (!resolvedReference.IsSkipped && resolvedReference.Kind == MetadataImageKind.Module) 469result.Add(GetResolvedReferenceAndFreePropertyMapEntry(references[i], explicitAssemblyCount - 1 + i, MetadataImageKind.Assembly, propertyMapOpt));
ReferenceManager\CommonReferenceManager.Resolution.cs (12)
59private readonly MetadataImageKind _kind; 66public ResolvedReference(int index, MetadataImageKind kind) 77public ResolvedReference(int index, MetadataImageKind kind, ImmutableArray<string> aliasesOpt, ImmutableArray<string> recursiveAliasesOpt, ImmutableArray<MetadataReference> mergedReferences) 139public MetadataImageKind Kind 162return IsSkipped ? "<skipped>" : $"{(_kind == MetadataImageKind.Assembly ? "A" : "M")}[{Index}]:{DisplayAliases(_aliasesOpt, "aliases")}{DisplayAliases(_recursiveAliasesOpt, "recursive-aliases")}"; 287case MetadataImageKind.Assembly: 328case MetadataImageKind.Assembly: 370case MetadataImageKind.Module: 416int count = (referenceMap[i].Kind == MetadataImageKind.Assembly) ? assembliesBuilder.Count : lazyModulesBuilder?.Count ?? 0; 439private static ResolvedReference GetResolvedReferenceAndFreePropertyMapEntry(MetadataReference reference, int index, MetadataImageKind kind, Dictionary<MetadataReference, MergedAliases>? propertyMapOpt) 639referenceMap[referenceIndex] = new ResolvedReference(assemblies.Count, MetadataImageKind.Assembly); 653referenceMap[referenceIndex] = new ResolvedReference(modules.Count, MetadataImageKind.Module);
ReferenceManager\CommonReferenceManager.State.cs (2)
486if (referenceMap[i].Kind == MetadataImageKind.Module) 630Debug.Assert(reference.Kind == MetadataImageKind.Assembly);
Microsoft.CodeAnalysis.CSharp (4)
CommandLine\CSharpCommandLineParser.cs (1)
1955var properties = new MetadataReferenceProperties(MetadataImageKind.Assembly, aliases, embedInteropTypes);
Compilation\CSharpCompilation.cs (2)
1195if (reference.Properties.Kind == MetadataImageKind.Assembly) 1201Debug.Assert(reference.Properties.Kind == MetadataImageKind.Module);
Symbols\Compilation_UsedAssemblies.cs (1)
37if (reference.Properties.Kind == MetadataImageKind.Assembly)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (4)
CommandLineTests.cs (4)
5866Assert.Equal(MetadataImageKind.Module, parsedArgs.MetadataReferences[0].Properties.Kind); 5872Assert.Equal(MetadataImageKind.Module, parsedArgs.MetadataReferences[0].Properties.Kind); 5874Assert.Equal(MetadataImageKind.Module, parsedArgs.MetadataReferences[1].Properties.Kind); 5876Assert.Equal(MetadataImageKind.Module, parsedArgs.MetadataReferences[2].Properties.Kind);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (17)
Compilation\CompilationAPITests.cs (5)
504Assert.Equal(MetadataImageKind.Assembly, comp.ExternalReferences[0].Properties.Kind); 510Assert.Equal(MetadataImageKind.Assembly, comp.ExternalReferences[0].Properties.Kind); 1293Assert.Equal(MetadataImageKind.Module, comp.ExternalReferences[2].Properties.Kind); 1418Assert.Equal(MetadataImageKind.Assembly, comp.ExternalReferences[0].Properties.Kind); 1426Assert.Equal(MetadataImageKind.Assembly, comp.ExternalReferences[0].Properties.Kind);
Compilation\ReferenceManagerTests.cs (5)
902Assert.Equal(MetadataImageKind.Assembly, dr1.Properties.Kind); 903Assert.Equal(MetadataImageKind.Assembly, dr2.Properties.Kind); 904Assert.Equal(MetadataImageKind.Assembly, dr3.Properties.Kind); 927var m1 = MetadataReference.CreateFromFile(p1, new MetadataReferenceProperties(MetadataImageKind.Module)); 928var m2 = MetadataReference.CreateFromFile(p2, new MetadataReferenceProperties(MetadataImageKind.Module));
Compilation\UsedAssembliesTests.cs (7)
105Assert.Empty(used.Where(r => r.Properties.Kind == MetadataImageKind.Module)); 107var comp2 = comp.RemoveAllReferences().AddReferences(used.Concat(comp.References.Where(r => r.Properties.Kind == MetadataImageKind.Module))); 115var tryRemove = specificReferencesToAssert.Where(reference => reference.Properties.Kind == MetadataImageKind.Assembly && !used.Contains(reference)); 283AssertEx.Equal(comp.References.Where(r => r.Properties.Kind == MetadataImageKind.Assembly), comp.GetUsedAssemblyReferences()); 329Assert.Empty(used.Where(r => r.Properties.Kind == MetadataImageKind.Module)); 333var tryRemove = specificReferencesToAssert.Where(reference => reference.Properties.Kind == MetadataImageKind.Assembly && !used.Contains(reference)); 344var comp2 = comp.RemoveAllReferences().AddReferences(used.Concat(comp.References.Where(r => r.Properties.Kind == MetadataImageKind.Module)));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CSharpTestBase.cs (2)
1363var resolvedReferences = comp.References.Where(r => r.Properties.Kind == MetadataImageKind.Assembly); 1374var comp2 = comp.RemoveAllReferences().AddReferences(used.Concat(comp.References.Where(r => r.Properties.Kind == MetadataImageKind.Module)));
Microsoft.CodeAnalysis.InteractiveHost (1)
Interactive\Core\InteractiveHost.Service.cs (1)
552Debug.Assert(cmdLineReference.Properties.Kind == MetadataImageKind.Assembly && !cmdLineReference.Properties.EmbedInteropTypes);
Microsoft.CodeAnalysis.Rebuild (4)
CompilationOptionsReader.cs (3)
388var kind = (embedInteropTypesAndKind & 0b1) == 0b1 389? MetadataImageKind.Assembly 390: MetadataImageKind.Module;
Records.cs (1)
29MetadataImageKind ImageKind,
Microsoft.CodeAnalysis.Scripting (9)
Hosting\AssemblyLoader\InteractiveAssemblyLoader.cs (1)
120copy = _shadowCopyProvider.GetMetadataShadowCopy(reference, MetadataImageKind.Assembly);
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (8)
230public Metadata GetMetadata(string fullPath, MetadataImageKind kind) 249if (kind == MetadataImageKind.Assembly) 288public MetadataShadowCopy GetMetadataShadowCopy(string fullPath, MetadataImageKind kind) 293private MetadataShadowCopy GetMetadataShadowCopyNoCheck(string fullPath, MetadataImageKind kind) 295if (kind is < MetadataImageKind.Assembly or > MetadataImageKind.Module) 397private CacheEntry<MetadataShadowCopy> CreateMetadataShadowCopy(string originalPath, MetadataImageKind kind) 418if (kind == MetadataImageKind.Assembly)
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (29)
MetadataShadowCopyProviderTests.cs (29)
69Assert.Throws<ArgumentOutOfRangeException>(() => _provider.GetMetadataShadowCopy(IsRunningOnMono ? "/goo.dll" : @"c:\goo.dll", (MetadataImageKind)Byte.MaxValue)); 70Assert.Throws<ArgumentNullException>(() => _provider.GetMetadataShadowCopy(null, MetadataImageKind.Assembly)); 71Assert.Throws<ArgumentException>(() => _provider.GetMetadataShadowCopy("c:goo.dll", MetadataImageKind.Assembly)); 72Assert.Throws<ArgumentException>(() => _provider.GetMetadataShadowCopy("bar.dll", MetadataImageKind.Assembly)); 73Assert.Throws<ArgumentException>(() => _provider.GetMetadataShadowCopy(@"\bar.dll", MetadataImageKind.Assembly)); 74Assert.Throws<ArgumentException>(() => _provider.GetMetadataShadowCopy(@"../bar.dll", MetadataImageKind.Assembly)); 76Assert.Throws<ArgumentOutOfRangeException>(() => _provider.GetMetadata(IsRunningOnMono ? "/goo.dll" : @"c:\goo.dll", (MetadataImageKind)Byte.MaxValue)); 77Assert.Throws<ArgumentNullException>(() => _provider.GetMetadata(null, MetadataImageKind.Assembly)); 78Assert.Throws<ArgumentException>(() => _provider.GetMetadata("c:goo.dll", MetadataImageKind.Assembly)); 88var sc1 = _provider.GetMetadataShadowCopy(dll.Path, MetadataImageKind.Assembly); 89var sc2 = _provider.GetMetadataShadowCopy(dll.Path, MetadataImageKind.Assembly); 107var sc1 = _provider.GetMetadataShadowCopy(dll.Path, MetadataImageKind.Assembly); 116var sc2 = _provider.GetMetadataShadowCopy(mscorlib, MetadataImageKind.Assembly); 127var sc1 = _provider.GetMetadataShadowCopy(dll.Path, MetadataImageKind.Assembly); 131var sc2 = _provider.GetMetadataShadowCopy(sc1.PrimaryModule.FullPath, MetadataImageKind.Assembly); 144var metadata1 = _provider.GetMetadata(path0, MetadataImageKind.Assembly) as AssemblyMetadata; 166var metadata2 = _provider.GetMetadata(path0, MetadataImageKind.Assembly) as AssemblyMetadata; 173var modifiedMetadata3 = _provider.GetMetadata(path0, MetadataImageKind.Assembly) as AssemblyMetadata; 187Assert.Throws<BadImageFormatException>(() => _provider.GetMetadata(f0, MetadataImageKind.Assembly)); 190Assert.Throws<FileNotFoundException>(() => _provider.GetMetadata(f1, MetadataImageKind.Assembly)); 200var sc1 = _provider.GetMetadataShadowCopy(dll.Path, MetadataImageKind.Assembly); 201var sc2 = _provider.GetMetadataShadowCopy(dll.Path, MetadataImageKind.Assembly); 203var md1 = _provider.GetMetadata(dll.Path, MetadataImageKind.Assembly); 205Assert.Equal(MetadataImageKind.Assembly, md1.Kind); 213var sc3a = _provider.GetMetadataShadowCopy(dll2.Path, MetadataImageKind.Module); 230var sc = provider.GetMetadataShadowCopy(dll.Path, MetadataImageKind.Assembly); 236sc = provider.GetMetadataShadowCopy(dll.Path, MetadataImageKind.Assembly); 242sc = provider.GetMetadataShadowCopy(dll.Path, MetadataImageKind.Assembly); 248sc = provider.GetMetadataShadowCopy(dll.Path, MetadataImageKind.Assembly);
Microsoft.CodeAnalysis.Test.Utilities (11)
CommonTestBase.cs (2)
158Assert.Equal(MetadataImageKind.Assembly, emittedMetadata.Kind); 166var reference = emittedMetadata.Kind == MetadataImageKind.Assembly
Compilation\IRuntimeEnvironment.cs (2)
87return (metadata.Kind == MetadataImageKind.Assembly) ? ((AssemblyMetadata)metadata).GetModules().AsEnumerable() : SpecializedCollections.SingletonEnumerable((ModuleMetadata)metadata); 105var isManifestModule = peRef.Properties.Kind == MetadataImageKind.Assembly;
CompilationVerifier.cs (1)
698if (metadataReference.Properties.Kind == MetadataImageKind.Assembly)
PDB\DeterministicBuildCompilationTestHelpers.cs (3)
132var kind = (embedInteropTypesAndKind & 0b1) == 0b1 133? MetadataImageKind.Assembly 134: MetadataImageKind.Module;
PDB\MetadataReferenceInfo.cs (2)
21public readonly MetadataImageKind Kind; 30MetadataImageKind kind,
Platform\Desktop\DesktopRuntimeUtil.cs (1)
36/// <param name="properties">Reference properties (extern aliases, type embedding, <see cref="MetadataImageKind"/>).</param>
Microsoft.CodeAnalysis.UnitTests (58)
MetadataReferences\MetadataReferencePropertiesTests.cs (23)
23Assert.Equal(MetadataImageKind.Assembly, m.Kind); 25m = new MetadataReferenceProperties(MetadataImageKind.Assembly, aliases: ImmutableArray.Create("\\/[.'\":_)??\t\n*#$@^%*&)", "goo"), embedInteropTypes: true); 28Assert.Equal(MetadataImageKind.Assembly, m.Kind); 30m = new MetadataReferenceProperties(MetadataImageKind.Module); 33Assert.Equal(MetadataImageKind.Module, m.Kind); 35Assert.Equal(MetadataReferenceProperties.Module, new MetadataReferenceProperties(MetadataImageKind.Module, ImmutableArray<string>.Empty, false)); 36Assert.Equal(MetadataReferenceProperties.Assembly, new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray<string>.Empty, false)); 42Assert.Throws<ArgumentOutOfRangeException>(() => new MetadataReferenceProperties((MetadataImageKind)byte.MaxValue)); 43Assert.Throws<ArgumentException>(() => new MetadataReferenceProperties(MetadataImageKind.Module, ImmutableArray.Create("blah"))); 44Assert.Throws<ArgumentException>(() => new MetadataReferenceProperties(MetadataImageKind.Module, embedInteropTypes: true)); 45Assert.Throws<ArgumentException>(() => new MetadataReferenceProperties(MetadataImageKind.Module, ImmutableArray.Create(""))); 46Assert.Throws<ArgumentException>(() => new MetadataReferenceProperties(MetadataImageKind.Module, ImmutableArray.Create("x\0x"))); 56var a = new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("a"), embedInteropTypes: true); 58Assert.Equal(a.WithAliases(null), new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray<string>.Empty, embedInteropTypes: true)); 59Assert.Equal(a.WithAliases(default(ImmutableArray<string>)), new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray<string>.Empty, embedInteropTypes: true)); 60Assert.Equal(a.WithAliases(ImmutableArray<string>.Empty), new MetadataReferenceProperties(MetadataImageKind.Assembly, default(ImmutableArray<string>), embedInteropTypes: true)); 61Assert.Equal(a.WithAliases(new string[0]), new MetadataReferenceProperties(MetadataImageKind.Assembly, default(ImmutableArray<string>), embedInteropTypes: true)); 62Assert.Equal(a.WithAliases(new[] { "goo", "aaa" }), new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("goo", "aaa"), embedInteropTypes: true)); 63Assert.Equal(a.WithEmbedInteropTypes(false), new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("a"), embedInteropTypes: false)); 64Assert.Equal(a.WithRecursiveAliases(true), new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("a"), embedInteropTypes: true, hasRecursiveAliases: true)); 66var m = new MetadataReferenceProperties(MetadataImageKind.Module); 67Assert.Equal(m.WithAliases(default(ImmutableArray<string>)), new MetadataReferenceProperties(MetadataImageKind.Module, default(ImmutableArray<string>), embedInteropTypes: false)); 68Assert.Equal(m.WithEmbedInteropTypes(false), new MetadataReferenceProperties(MetadataImageKind.Module, default(ImmutableArray<string>), embedInteropTypes: false));
MetadataReferences\MetadataReferenceTests.cs (35)
52Assert.Throws<ArgumentException>(() => MetadataReference.CreateFromAssemblyInternal(typeof(object).Assembly, new MetadataReferenceProperties(MetadataImageKind.Module))); 71Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 87Assert.Equal(MetadataImageKind.Module, r.Properties.Kind); 105Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 136Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 152Assert.Equal(MetadataImageKind.Module, r.Properties.Kind); 168Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 172var props = new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("a", "b"), embedInteropTypes: true, hasRecursiveAliases: true); 191Assert.Equal(MetadataImageKind.Module, r.Properties.Kind); 195var props = new MetadataReferenceProperties(MetadataImageKind.Module); 211Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 216var props = new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("a", "b"), embedInteropTypes: true, hasRecursiveAliases: true); 225var r = (PortableExecutableReference)MetadataReference.CreateFromAssemblyInternal(assembly, new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("a", "b"), embedInteropTypes: true), documentation: doc); 228Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 262Assert.Equal(MetadataImageKind.Module, r.Properties.Kind); 274var r3 = r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Module)); 277var r4 = r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Assembly)); 278Assert.Equal(MetadataImageKind.Assembly, r4.Properties.Kind); 301Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 325var r5 = r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Module)); 326Assert.Equal(MetadataImageKind.Module, r5.Properties.Kind); 330var r6 = r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("x"), embedInteropTypes: true)); 331Assert.Equal(MetadataImageKind.Assembly, r6.Properties.Kind); 344Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 350Assert.Equal(MetadataImageKind.Assembly, r1.Properties.Kind); 356Assert.Equal(MetadataImageKind.Assembly, r2.Properties.Kind); 358var r3 = r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("x"), embedInteropTypes: true)); 362Assert.Equal(MetadataImageKind.Assembly, r3.Properties.Kind); 364Assert.Throws<ArgumentException>(() => r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Module))); 375Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 381Assert.Equal(MetadataImageKind.Assembly, r1.Properties.Kind); 387Assert.Equal(MetadataImageKind.Assembly, r2.Properties.Kind); 389var r3 = r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("x"), embedInteropTypes: true)); 393Assert.Equal(MetadataImageKind.Assembly, r3.Properties.Kind); 395Assert.Throws<ArgumentException>(() => r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Module)));
Microsoft.CodeAnalysis.VisualBasic (14)
CommandLine\VisualBasicCommandLineArguments.vb (1)
86If Not refProps.EmbedInteropTypes AndAlso refProps.Kind = MetadataImageKind.Assembly Then
CommandLine\VisualBasicCommandLineParser.vb (9)
678Function(path) New CommandLineReference(path, New MetadataReferenceProperties(MetadataImageKind.Module)))) 1330New CommandLineReference(systemDllPath, New MetadataReferenceProperties(MetadataImageKind.Assembly))) 1343New CommandLineReference(msVbDllPath, New MetadataReferenceProperties(MetadataImageKind.Assembly))) 1346metadataReferences.Add(New CommandLineReference(vbRuntimePath, New MetadataReferenceProperties(MetadataImageKind.Assembly))) 1546Return New CommandLineReference(systemRuntimePath, New MetadataReferenceProperties(MetadataImageKind.Assembly)) 1555Return New CommandLineReference(systemRuntimePath, New MetadataReferenceProperties(MetadataImageKind.Assembly)) 1563Return New CommandLineReference(msCorLibPath, New MetadataReferenceProperties(MetadataImageKind.Assembly)) 1568Return New CommandLineReference(msCorLibPath, New MetadataReferenceProperties(MetadataImageKind.Assembly)) 1690Select(Function(path) New CommandLineReference(path, New MetadataReferenceProperties(MetadataImageKind.Assembly, embedInteropTypes:=embedInteropTypes)))
CommandLine\VisualBasicCompiler.vb (1)
185If reference.Properties.Kind = MetadataImageKind.Module Then
Compilation\VisualBasicCompilation.vb (2)
1321If reference.Properties.Kind = MetadataImageKind.Assembly Then 1324Debug.Assert(reference.Properties.Kind = MetadataImageKind.Module)
Symbols\UsedAssemblies.vb (1)
29If reference.Properties.Kind = MetadataImageKind.Assembly Then
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (4)
CommandLineTests.vb (4)
4963Assert.Equal(MetadataImageKind.Module, parsedArgs.MetadataReferences(0).Properties.Kind) 4965Assert.Equal(MetadataImageKind.Module, parsedArgs.MetadataReferences(1).Properties.Kind) 4967Assert.Equal(MetadataImageKind.Module, parsedArgs.MetadataReferences(2).Properties.Kind) 4972Assert.Equal(MetadataImageKind.Assembly, parsedArgs.DefaultCoreLibraryReference.Value.Properties.Kind)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (5)
Compilation\CompilationAPITests.vb (5)
548Assert.Equal(MetadataImageKind.Assembly, comp.References(0).Properties.Kind) 554Assert.Equal(MetadataImageKind.Assembly, comp.References(0).Properties.Kind) 1064Assert.Equal(MetadataImageKind.Assembly, comp.References(0).Properties.Kind) 1132Assert.Equal(MetadataImageKind.Assembly, comp.References(2).Properties.Kind) 1139Assert.Equal(MetadataImageKind.Module, comp.References(2).Properties.Kind)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (7)
UsedAssembliesTests.vb (7)
93Assert.Empty(used.Where(Function(r) r.Properties.Kind = MetadataImageKind.Module)) 95Dim comp2 = comp.RemoveAllReferences().AddReferences(used.Concat(comp.References.Where(Function(r) r.Properties.Kind = MetadataImageKind.Module))) 100Dim tryRemove = specificReferencesToAssert.Where(Function(reference) reference.Properties.Kind = MetadataImageKind.Assembly AndAlso Not used.Contains(reference)) 134AssertEx.Equal(comp.References.Where(Function(r) r.Properties.Kind = MetadataImageKind.Assembly), comp.GetUsedAssemblyReferences()) 153Assert.Empty(used.Where(Function(r) r.Properties.Kind = MetadataImageKind.Module)) 156Dim tryRemove = specificReferencesToAssert.Where(Function(reference) reference.Properties.Kind = MetadataImageKind.Assembly AndAlso Not used.Contains(reference)) 166Dim comp2 = comp.RemoveAllReferences().AddReferences(used.Concat(comp.References.Where(Function(r) r.Properties.Kind = MetadataImageKind.Module)))
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
CompilationTestUtils.vb (2)
94Dim resolvedReferences = comp.References.Where(Function(r) r.Properties.Kind = MetadataImageKind.Assembly) 102Dim comp2 = comp.RemoveAllReferences().AddReferences(used.Concat(comp.References.Where(Function(r) r.Properties.Kind = MetadataImageKind.Module)))
Microsoft.CodeAnalysis.Workspaces (10)
Serialization\SerializerService_Reference.cs (10)
314var kind = (MetadataImageKind)reader.ReadInt32(); 360writer.WriteInt32((int)MetadataImageKind.Assembly); 365writer.WriteInt32((int)MetadataImageKind.Module); 382var metadataKind = (MetadataImageKind)imageKind; 383if (metadataKind == MetadataImageKind.Assembly) 392metadataKind = (MetadataImageKind)reader.ReadInt32(); 393Contract.ThrowIfFalse(metadataKind == MetadataImageKind.Module); 405Contract.ThrowIfFalse(metadataKind == MetadataImageKind.Module);
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\MetadataReferences\VisualStudioPortableExecutableReference.cs (1)
46Debug.Assert(Properties.Kind == MetadataImageKind.Assembly);
VBCSCompiler (1)
src\Compilers\Server\VBCSCompiler\MetadataCache.cs (1)
67if (properties.Kind == MetadataImageKind.Module)