88 references to Kind
Microsoft.CodeAnalysis (24)
CommandLine\CommandLineArguments.cs (1)
437var diagnostic = PortableExecutableReference.ExceptionToDiagnostic(e, messageProviderOpt!, Location.None, cmdReference.Reference, cmdReference.Properties.Kind);
CommandLine\CommonCompiler.ExistingReferencesResolver.cs (1)
53if (peReference == null || peReference.Properties.Kind != MetadataImageKind.Assembly)
Compilation\DeterministicKeyBuilder.cs (1)
369writer.Write("kind", properties.Kind);
MetadataReference\CompilationReference.cs (3)
24Debug.Assert(properties.Kind != MetadataImageKind.Module); 89if (properties.Kind == MetadataImageKind.Module) 99if (properties.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 (6)
125Metadata metadata = properties.Kind switch 163Metadata metadata = properties.Kind switch 206Metadata metadata = properties.Kind switch 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 (3)
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>
PEWriter\MetadataWriter.PortablePdb.cs (2)
993kindAndEmbedInteropTypes |= portableReference.Properties.Kind switch 997_ => throw ExceptionUtilities.UnexpectedValue(portableReference.Properties.Kind)
ReferenceManager\CommonReferenceManager.Resolution.cs (5)
285switch (compilationReference.Properties.Kind) 312throw ExceptionUtilities.UnexpectedValue(compilationReference.Properties.Kind); 326switch (peReference.Properties.Kind) 390throw ExceptionUtilities.UnexpectedValue(peReference.Properties.Kind); 505newDiagnostic = PortableExecutableReference.ExceptionToDiagnostic(e, messageProvider, location, peReference.Display ?? "", peReference.Properties.Kind);
Microsoft.CodeAnalysis.CSharp (3)
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.Symbol.UnitTests (15)
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 (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 (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 (2)
Interactive\Core\InteractiveHost.Service.cs (1)
552Debug.Assert(cmdLineReference.Properties.Kind == MetadataImageKind.Assembly && !cmdLineReference.Properties.EmbedInteropTypes);
Interactive\Core\InteractiveHost.ShadowCopyReference.cs (1)
33return _provider.GetMetadata(FilePath, Properties.Kind);
Microsoft.CodeAnalysis.Test.Utilities (3)
Compilation\IRuntimeEnvironment.cs (1)
105var isManifestModule = peRef.Properties.Kind == MetadataImageKind.Assembly;
CompilationVerifier.cs (1)
698if (metadataReference.Properties.Kind == MetadataImageKind.Assembly)
PDB\TestMetadataReferenceInfo.cs (1)
48metadataReference.Properties.Kind,
Microsoft.CodeAnalysis.UnitTests (27)
MetadataReferences\MetadataReferencePropertiesTests.cs (3)
23Assert.Equal(MetadataImageKind.Assembly, m.Kind); 28Assert.Equal(MetadataImageKind.Assembly, m.Kind); 33Assert.Equal(MetadataImageKind.Module, m.Kind);
MetadataReferences\MetadataReferenceTests.cs (24)
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); 191Assert.Equal(MetadataImageKind.Module, r.Properties.Kind); 211Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 228Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 262Assert.Equal(MetadataImageKind.Module, r.Properties.Kind); 278Assert.Equal(MetadataImageKind.Assembly, r4.Properties.Kind); 301Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 313Assert.Equal(r.Properties.Kind, r3.Properties.Kind); 321Assert.Equal(r.Properties.Kind, r4.Properties.Kind); 326Assert.Equal(MetadataImageKind.Module, r5.Properties.Kind); 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); 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); 393Assert.Equal(MetadataImageKind.Assembly, r3.Properties.Kind);
Microsoft.CodeAnalysis.VisualBasic (4)
CommandLine\VisualBasicCommandLineArguments.vb (1)
86If Not refProps.EmbedInteropTypes AndAlso refProps.Kind = MetadataImageKind.Assembly 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.Workspaces (2)
Serialization\SerializedPortableExecutableReference.cs (1)
62Kind={this.Properties.Kind}
Serialization\SerializerService_Reference.cs (1)
307writer.WriteInt32((int)properties.Kind);
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)