132 references to Assembly
BuildValidator (1)
LocalReferenceResolver.cs (1)
138kind: MetadataImageKind.Assembly,
Microsoft.CodeAnalysis (20)
CommandLine\CommonCompiler.ExistingReferencesResolver.cs (1)
53if (peReference == null || peReference.Properties.Kind != MetadataImageKind.Assembly)
MetadataReference\AssemblyMetadata.cs (2)
435get { return MetadataImageKind.Assembly; } 454return new MetadataImageReference(this, new MetadataReferenceProperties(MetadataImageKind.Assembly, aliases, embedInteropTypes), documentation, filePath, display);
MetadataReference\CompilationReference.cs (1)
44return new MetadataReferenceProperties(MetadataImageKind.Assembly, aliases, embedInteropTypes);
MetadataReference\MetadataImageKind.cs (1)
27return kind >= MetadataImageKind.Assembly && kind <= MetadataImageKind.Module;
MetadataReference\MetadataImageReference.cs (1)
53return _display ?? FilePath ?? (Properties.Kind == MetadataImageKind.Assembly ? CodeAnalysisResources.InMemoryAssembly : CodeAnalysisResources.InMemoryModule);
MetadataReference\MetadataReference.cs (2)
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 (2)
30public static MetadataReferenceProperties Assembly => new MetadataReferenceProperties(MetadataImageKind.Assembly); 38public MetadataReferenceProperties(MetadataImageKind kind = MetadataImageKind.Assembly, ImmutableArray<string> aliases = default, bool embedInteropTypes = false)
MetadataReference\PortableExecutableReference.cs (2)
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 (1)
995MetadataImageKind.Assembly => 1,
ReferenceManager\CommonReferenceManager.Binding.cs (1)
469result.Add(GetResolvedReferenceAndFreePropertyMapEntry(references[i], explicitAssemblyCount - 1 + i, MetadataImageKind.Assembly, propertyMapOpt));
ReferenceManager\CommonReferenceManager.Resolution.cs (5)
162return IsSkipped ? "<skipped>" : $"{(_kind == MetadataImageKind.Assembly ? "A" : "M")}[{Index}]:{DisplayAliases(_aliasesOpt, "aliases")}{DisplayAliases(_recursiveAliasesOpt, "recursive-aliases")}"; 287case MetadataImageKind.Assembly: 328case MetadataImageKind.Assembly: 416int count = (referenceMap[i].Kind == MetadataImageKind.Assembly) ? assembliesBuilder.Count : lazyModulesBuilder?.Count ?? 0; 639referenceMap[referenceIndex] = new ResolvedReference(assemblies.Count, MetadataImageKind.Assembly);
ReferenceManager\CommonReferenceManager.State.cs (1)
630Debug.Assert(reference.Kind == MetadataImageKind.Assembly);
Microsoft.CodeAnalysis.CSharp (3)
CommandLine\CSharpCommandLineParser.cs (1)
1957var properties = new MetadataReferenceProperties(MetadataImageKind.Assembly, aliases, embedInteropTypes);
Compilation\CSharpCompilation.cs (1)
1195if (reference.Properties.Kind == MetadataImageKind.Assembly)
Symbols\Compilation_UsedAssemblies.cs (1)
37if (reference.Properties.Kind == MetadataImageKind.Assembly)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (10)
Compilation\CompilationAPITests.cs (4)
504Assert.Equal(MetadataImageKind.Assembly, comp.ExternalReferences[0].Properties.Kind); 510Assert.Equal(MetadataImageKind.Assembly, comp.ExternalReferences[0].Properties.Kind); 1418Assert.Equal(MetadataImageKind.Assembly, comp.ExternalReferences[0].Properties.Kind); 1426Assert.Equal(MetadataImageKind.Assembly, comp.ExternalReferences[0].Properties.Kind);
Compilation\ReferenceManagerTests.cs (3)
902Assert.Equal(MetadataImageKind.Assembly, dr1.Properties.Kind); 903Assert.Equal(MetadataImageKind.Assembly, dr2.Properties.Kind); 904Assert.Equal(MetadataImageKind.Assembly, dr3.Properties.Kind);
Compilation\UsedAssembliesTests.cs (3)
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()); 333var tryRemove = specificReferencesToAssert.Where(reference => reference.Properties.Kind == MetadataImageKind.Assembly && !used.Contains(reference));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
1363var resolvedReferences = comp.References.Where(r => r.Properties.Kind == MetadataImageKind.Assembly);
Microsoft.CodeAnalysis.InteractiveHost (1)
Interactive\Core\InteractiveHost.Service.cs (1)
552Debug.Assert(cmdLineReference.Properties.Kind == MetadataImageKind.Assembly && !cmdLineReference.Properties.EmbedInteropTypes);
Microsoft.CodeAnalysis.Rebuild (1)
CompilationOptionsReader.cs (1)
389? MetadataImageKind.Assembly
Microsoft.CodeAnalysis.Scripting (4)
Hosting\AssemblyLoader\InteractiveAssemblyLoader.cs (1)
120copy = _shadowCopyProvider.GetMetadataShadowCopy(reference, MetadataImageKind.Assembly);
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (3)
249if (kind == MetadataImageKind.Assembly) 295if (kind is < MetadataImageKind.Assembly or > MetadataImageKind.Module) 418if (kind == MetadataImageKind.Assembly)
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (26)
MetadataShadowCopyProviderTests.cs (26)
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)); 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); 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 (6)
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 (1)
133? MetadataImageKind.Assembly
Microsoft.CodeAnalysis.UnitTests (36)
MetadataReferences\MetadataReferencePropertiesTests.cs (12)
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); 36Assert.Equal(MetadataReferenceProperties.Assembly, new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray<string>.Empty, false)); 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));
MetadataReferences\MetadataReferenceTests.cs (24)
71Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 105Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 136Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 168Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 172var props = new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("a", "b"), embedInteropTypes: true, hasRecursiveAliases: true); 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); 277var r4 = r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Assembly)); 278Assert.Equal(MetadataImageKind.Assembly, r4.Properties.Kind); 301Assert.Equal(MetadataImageKind.Assembly, r.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); 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);
Microsoft.CodeAnalysis.VisualBasic (11)
CommandLine\VisualBasicCommandLineArguments.vb (1)
86If Not refProps.EmbedInteropTypes AndAlso refProps.Kind = MetadataImageKind.Assembly Then
CommandLine\VisualBasicCommandLineParser.vb (8)
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)))
Compilation\VisualBasicCompilation.vb (1)
1321If reference.Properties.Kind = MetadataImageKind.Assembly Then
Symbols\UsedAssemblies.vb (1)
29If reference.Properties.Kind = MetadataImageKind.Assembly Then
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
4971Assert.Equal(MetadataImageKind.Assembly, parsedArgs.DefaultCoreLibraryReference.Value.Properties.Kind)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (4)
Compilation\CompilationAPITests.vb (4)
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)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (3)
UsedAssembliesTests.vb (3)
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()) 156Dim tryRemove = specificReferencesToAssert.Where(Function(reference) reference.Properties.Kind = MetadataImageKind.Assembly AndAlso Not used.Contains(reference))
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
CompilationTestUtils.vb (1)
94Dim resolvedReferences = comp.References.Where(Function(r) r.Properties.Kind = MetadataImageKind.Assembly)
Microsoft.CodeAnalysis.Workspaces (2)
Serialization\SerializerService_Reference.cs (2)
360writer.WriteInt32((int)MetadataImageKind.Assembly); 383if (metadataKind == MetadataImageKind.Assembly)
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\MetadataReferences\VisualStudioPortableExecutableReference.cs (1)
46Debug.Assert(Properties.Kind == MetadataImageKind.Assembly);