105 references to MetadataImageKind
Microsoft.CodeAnalysis (62)
CommandLine\CommonCompiler.ExistingReferencesResolver.cs (1)
53
if (peReference == null || peReference.Properties.Kind !=
MetadataImageKind
.Assembly)
MetadataReference\AssemblyMetadata.cs (4)
431
/// Returns the metadata kind. <see cref="
MetadataImageKind
"/>
433
public override
MetadataImageKind
Kind
435
get { return
MetadataImageKind
.Assembly; }
454
return new MetadataImageReference(this, new MetadataReferenceProperties(
MetadataImageKind
.Assembly, aliases, embedInteropTypes), documentation, filePath, display);
MetadataReference\CompilationReference.cs (4)
24
Debug.Assert(properties.Kind !=
MetadataImageKind
.Module);
44
return new MetadataReferenceProperties(
MetadataImageKind
.Assembly, aliases, embedInteropTypes);
89
if (properties.Kind ==
MetadataImageKind
.Module)
99
if (properties.Kind ==
MetadataImageKind
.Module)
MetadataReference\Metadata.cs (2)
46
/// Retrieves the <see cref="
MetadataImageKind
"/> for this instance.
48
public abstract
MetadataImageKind
Kind { get; }
MetadataReference\MetadataImageKind.cs (3)
25
internal static bool IsValid(this
MetadataImageKind
kind)
27
return kind >=
MetadataImageKind
.Assembly && kind <=
MetadataImageKind
.Module;
MetadataReference\MetadataImageReference.cs (2)
53
return _display ?? FilePath ?? (Properties.Kind ==
MetadataImageKind
.Assembly ? CodeAnalysisResources.InMemoryAssembly : CodeAnalysisResources.InMemoryModule);
60
sb.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>
127
MetadataImageKind
.Module => ModuleMetadata.CreateFromImage(peImage),
138
/// <param name="properties">Reference properties (extern aliases, type embedding, <see cref="
MetadataImageKind
"/>).</param>
165
MetadataImageKind
.Module => ModuleMetadata.CreateFromImage(peImage),
177
/// <param name="properties">Reference properties (extern aliases, type embedding, <see cref="
MetadataImageKind
"/>).</param>
208
MetadataImageKind
.Module => ModuleMetadata.CreateFromStream(peStream, PEStreamOptions.PrefetchEntireImage),
220
/// <param name="properties">Reference properties (extern aliases, type embedding, <see cref="
MetadataImageKind
"/>).</param>
274
if (properties.Kind ==
MetadataImageKind
.Module)
316
/// <exception cref="ArgumentException"><paramref name="properties"/>.<see cref="MetadataReferenceProperties.Kind"/> is not <see cref="
MetadataImageKind
.Assembly"/>.</exception>
349
if (properties.Kind !=
MetadataImageKind
.Assembly)
MetadataReference\MetadataReferenceProperties.cs (11)
18
private readonly
MetadataImageKind
_kind;
25
public static MetadataReferenceProperties Module => new MetadataReferenceProperties(
MetadataImageKind
.Module);
30
public static MetadataReferenceProperties Assembly => new MetadataReferenceProperties(
MetadataImageKind
.Assembly);
38
public MetadataReferenceProperties(
MetadataImageKind
kind =
MetadataImageKind
.Assembly, ImmutableArray<string> aliases = default, bool embedInteropTypes = false)
45
if (kind ==
MetadataImageKind
.Module)
75
internal 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>
123
public
MetadataImageKind
Kind => _kind;
MetadataReference\ModuleMetadata.cs (3)
343
/// Returns the <see cref="
MetadataImageKind
"/> for this instance.
345
public override
MetadataImageKind
Kind
347
get { return
MetadataImageKind
.Module; }
MetadataReference\PortableExecutableReference.cs (3)
186
internal static Diagnostic ExceptionToDiagnostic(Exception e, CommonMessageProvider messageProvider, Location location, string display,
MetadataImageKind
kind)
190
int errorCode = (kind ==
MetadataImageKind
.Assembly) ? messageProvider.ERR_InvalidAssemblyMetadata : messageProvider.ERR_InvalidModuleMetadata;
201
int errorCode = (kind ==
MetadataImageKind
.Assembly) ? messageProvider.ERR_ErrorOpeningAssemblyFile : messageProvider.ERR_ErrorOpeningModuleFile;
PEWriter\MetadataWriter.PortablePdb.cs (2)
995
MetadataImageKind
.Assembly => 1,
996
MetadataImageKind
.Module => 0,
ReferenceManager\CommonReferenceManager.Binding.cs (3)
423
if (explicitReferenceMapping.IsSkipped || explicitReferenceMapping.Kind ==
MetadataImageKind
.Module)
451
if (!resolvedReference.IsSkipped && resolvedReference.Kind ==
MetadataImageKind
.Module)
469
result.Add(GetResolvedReferenceAndFreePropertyMapEntry(references[i], explicitAssemblyCount - 1 + i,
MetadataImageKind
.Assembly, propertyMapOpt));
ReferenceManager\CommonReferenceManager.Resolution.cs (12)
60
private readonly
MetadataImageKind
_kind;
67
public ResolvedReference(int index,
MetadataImageKind
kind)
78
public ResolvedReference(int index,
MetadataImageKind
kind, ImmutableArray<string> aliasesOpt, ImmutableArray<string> recursiveAliasesOpt, ImmutableArray<MetadataReference> mergedReferences)
140
public
MetadataImageKind
Kind
163
return IsSkipped ? "<skipped>" : $"{(_kind ==
MetadataImageKind
.Assembly ? "A" : "M")}[{Index}]:{DisplayAliases(_aliasesOpt, "aliases")}{DisplayAliases(_recursiveAliasesOpt, "recursive-aliases")}";
288
case
MetadataImageKind
.Assembly:
329
case
MetadataImageKind
.Assembly:
371
case
MetadataImageKind
.Module:
417
int count = (referenceMap[i].Kind ==
MetadataImageKind
.Assembly) ? assembliesBuilder.Count : lazyModulesBuilder?.Count ?? 0;
440
private static ResolvedReference GetResolvedReferenceAndFreePropertyMapEntry(MetadataReference reference, int index,
MetadataImageKind
kind, Dictionary<MetadataReference, MergedAliases>? propertyMapOpt)
640
referenceMap[referenceIndex] = new ResolvedReference(assemblies.Count,
MetadataImageKind
.Assembly);
654
referenceMap[referenceIndex] = new ResolvedReference(modules.Count,
MetadataImageKind
.Module);
ReferenceManager\CommonReferenceManager.State.cs (2)
486
if (referenceMap[i].Kind ==
MetadataImageKind
.Module)
630
Debug.Assert(reference.Kind ==
MetadataImageKind
.Assembly);
Microsoft.CodeAnalysis.CSharp (4)
CommandLine\CSharpCommandLineParser.cs (1)
1990
var properties = new MetadataReferenceProperties(
MetadataImageKind
.Assembly, aliases, embedInteropTypes);
Compilation\CSharpCompilation.cs (2)
1278
if (reference.Properties.Kind ==
MetadataImageKind
.Assembly)
1284
Debug.Assert(reference.Properties.Kind ==
MetadataImageKind
.Module);
Symbols\Compilation_UsedAssemblies.cs (1)
36
if (reference.Properties.Kind ==
MetadataImageKind
.Assembly)
Microsoft.CodeAnalysis.Rebuild (4)
CompilationOptionsReader.cs (3)
393
var
kind = (embedInteropTypesAndKind & 0b1) == 0b1
394
?
MetadataImageKind
.Assembly
395
:
MetadataImageKind
.Module;
Records.cs (1)
29
MetadataImageKind
ImageKind,
Microsoft.CodeAnalysis.Scripting (9)
Hosting\AssemblyLoader\InteractiveAssemblyLoader.cs (1)
119
copy = _shadowCopyProvider.GetMetadataShadowCopy(reference,
MetadataImageKind
.Assembly);
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (8)
230
public Metadata GetMetadata(string fullPath,
MetadataImageKind
kind)
249
if (kind ==
MetadataImageKind
.Assembly)
288
public MetadataShadowCopy GetMetadataShadowCopy(string fullPath,
MetadataImageKind
kind)
293
private MetadataShadowCopy GetMetadataShadowCopyNoCheck(string fullPath,
MetadataImageKind
kind)
295
if (kind is <
MetadataImageKind
.Assembly or >
MetadataImageKind
.Module)
397
private CacheEntry<MetadataShadowCopy> CreateMetadataShadowCopy(string originalPath,
MetadataImageKind
kind)
418
if (kind ==
MetadataImageKind
.Assembly)
Microsoft.CodeAnalysis.VisualBasic (14)
CommandLine\VisualBasicCommandLineArguments.vb (1)
86
If Not refProps.EmbedInteropTypes AndAlso refProps.Kind =
MetadataImageKind
.Assembly Then
CommandLine\VisualBasicCommandLineParser.vb (9)
697
Function(path) New CommandLineReference(path, New MetadataReferenceProperties(
MetadataImageKind
.Module))))
1349
New CommandLineReference(systemDllPath, New MetadataReferenceProperties(
MetadataImageKind
.Assembly)))
1362
New CommandLineReference(msVbDllPath, New MetadataReferenceProperties(
MetadataImageKind
.Assembly)))
1365
metadataReferences.Add(New CommandLineReference(vbRuntimePath, New MetadataReferenceProperties(
MetadataImageKind
.Assembly)))
1565
Return New CommandLineReference(systemRuntimePath, New MetadataReferenceProperties(
MetadataImageKind
.Assembly))
1574
Return New CommandLineReference(systemRuntimePath, New MetadataReferenceProperties(
MetadataImageKind
.Assembly))
1582
Return New CommandLineReference(msCorLibPath, New MetadataReferenceProperties(
MetadataImageKind
.Assembly))
1587
Return New CommandLineReference(msCorLibPath, New MetadataReferenceProperties(
MetadataImageKind
.Assembly))
1709
Select(Function(path) New CommandLineReference(path, New MetadataReferenceProperties(
MetadataImageKind
.Assembly, embedInteropTypes:=embedInteropTypes)))
CommandLine\VisualBasicCompiler.vb (1)
186
If reference.Properties.Kind =
MetadataImageKind
.Module Then
Compilation\VisualBasicCompilation.vb (2)
1323
If reference.Properties.Kind =
MetadataImageKind
.Assembly Then
1326
Debug.Assert(reference.Properties.Kind =
MetadataImageKind
.Module)
Symbols\UsedAssemblies.vb (1)
29
If reference.Properties.Kind =
MetadataImageKind
.Assembly Then
Microsoft.CodeAnalysis.Workspaces (11)
Serialization\SerializerService_Reference.cs (10)
329
var
kind = (
MetadataImageKind
)reader.ReadInt32();
375
writer.WriteInt32((int)
MetadataImageKind
.Assembly);
380
writer.WriteInt32((int)
MetadataImageKind
.Module);
397
var
metadataKind = (
MetadataImageKind
)imageKind;
398
if (metadataKind ==
MetadataImageKind
.Assembly)
407
metadataKind = (
MetadataImageKind
)reader.ReadInt32();
408
Contract.ThrowIfFalse(metadataKind ==
MetadataImageKind
.Module);
420
Contract.ThrowIfFalse(metadataKind ==
MetadataImageKind
.Module);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (1)
533
var metadataReference = metadataService.GetReference(outputPath, new MetadataReferenceProperties(
MetadataImageKind
.Assembly, projectReference.Aliases, projectReference.EmbedInteropTypes));
VBCSCompiler (1)
src\roslyn\src\Compilers\Server\VBCSCompiler\MetadataCache.cs (1)
67
if (properties.Kind ==
MetadataImageKind
.Module)