1 write to Properties
Microsoft.CodeAnalysis (1)
MetadataReference\MetadataReference.cs (1)
29this.Properties = properties;
209 references to Properties
Microsoft.CodeAnalysis (36)
CommandLine\CommonCompiler.ExistingReferencesResolver.cs (1)
53if (peReference == null || peReference.Properties.Kind != MetadataImageKind.Assembly)
Compilation\DeterministicKeyBuilder.cs (1)
319writeMetadataReferenceProperties(writer, reference.Properties);
MetadataReference\CompilationReference.cs (6)
64return WithProperties(Properties.WithAliases(aliases)); 74return WithProperties(Properties.WithEmbedInteropTypes(value)); 84if (properties == this.Properties) 130return object.Equals(this.Compilation, other.Compilation) && object.Equals(this.Properties, other.Properties); 140return Hash.Combine(this.Compilation.GetHashCode(), this.Properties.GetHashCode());
MetadataReference\MetadataImageReference.cs (5)
53return _display ?? FilePath ?? (Properties.Kind == MetadataImageKind.Assembly ? CodeAnalysisResources.InMemoryAssembly : CodeAnalysisResources.InMemoryModule); 60sb.Append(Properties.Kind == MetadataImageKind.Module ? "Module" : "Assembly"); 61if (!Properties.Aliases.IsEmpty) 64sb.Append(string.Join(", ", Properties.Aliases)); 68if (Properties.EmbedInteropTypes)
MetadataReference\MetadataReference.cs (3)
62return WithProperties(Properties.WithEmbedInteropTypes(value)); 72return WithProperties(Properties.WithAliases(aliases)); 82if (properties == this.Properties)
MetadataReference\PortableExecutableReference.cs (3)
91return WithProperties(Properties.WithAliases(aliases)); 101return WithProperties(Properties.WithEmbedInteropTypes(value)); 111if (properties == this.Properties)
PEWriter\MetadataWriter.PortablePdb.cs (3)
989byte kindAndEmbedInteropTypes = (byte)(portableReference.Properties.EmbedInteropTypes 993kindAndEmbedInteropTypes |= portableReference.Properties.Kind switch 997_ => throw ExceptionUtilities.UnexpectedValue(portableReference.Properties.Kind)
ReferenceManager\CommonReferenceManager.Binding.cs (1)
587peReference.Properties.EmbedInteropTypes);
ReferenceManager\CommonReferenceManager.Resolution.cs (9)
285switch (compilationReference.Properties.Kind) 312throw ExceptionUtilities.UnexpectedValue(compilationReference.Properties.Kind); 326switch (peReference.Properties.Kind) 357peReference.Properties.EmbedInteropTypes); 390throw ExceptionUtilities.UnexpectedValue(peReference.Properties.Kind); 454else if (reference.Properties.HasRecursiveAliases) 457recursiveAliasesOpt = reference.Properties.Aliases; 461aliasesOpt = reference.Properties.Aliases; 505newDiagnostic = PortableExecutableReference.ExceptionToDiagnostic(e, messageProvider, location, peReference.Display ?? "", peReference.Properties.Kind);
ReferenceManager\MergedAliases.cs (4)
37if (reference.Properties.HasRecursiveAliases) 42RecursiveAliasesOpt.AddRange(reference.Properties.Aliases); 53AliasesOpt.AddRange(reference.Properties.Aliases); 62newAliases: reference.Properties.Aliases);
Microsoft.CodeAnalysis.CSharp (6)
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)
Symbols\ReferenceManager.cs (3)
93var result = new AssemblyDataForCompilation(csReference.Compilation, csReference.Properties.EmbedInteropTypes); 105if (primaryReference.Properties.EmbedInteropTypes != duplicateReference.Properties.EmbedInteropTypes)
Microsoft.CodeAnalysis.CSharp.Features (2)
AddImport\CSharpAddImportFeatureService.cs (2)
564var aliases = metadataReference.Properties.Aliases; 570aliases = metadataReference.Properties.Aliases.Where(a => a != MetadataReferenceProperties.GlobalAlias).ToImmutableArray();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (42)
Compilation\CompilationAPITests.cs (8)
367Assert.True(ref1.Properties.EmbedInteropTypes); 368Assert.True(ref1.Properties.Aliases.IsEmpty); 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); 1904Assert.Equal("alias", comp.References.Last().Properties.Aliases.Single());
Compilation\ReferenceManagerTests.cs (9)
902Assert.Equal(MetadataImageKind.Assembly, dr1.Properties.Kind); 903Assert.Equal(MetadataImageKind.Assembly, dr2.Properties.Kind); 904Assert.Equal(MetadataImageKind.Assembly, dr3.Properties.Kind); 906Assert.True(dr1.Properties.Aliases.IsEmpty); 907Assert.True(dr2.Properties.Aliases.IsEmpty); 908Assert.True(dr3.Properties.Aliases.IsEmpty); 910Assert.False(dr1.Properties.EmbedInteropTypes); 911Assert.False(dr2.Properties.EmbedInteropTypes); 912Assert.False(dr3.Properties.EmbedInteropTypes);
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)));
Symbols\Metadata\PE\NoPia.cs (12)
755Assert.True(pia1Link.Properties.EmbedInteropTypes); 756Assert.False(pia1Ref.Properties.EmbedInteropTypes); 757Assert.True(pia5Link.Properties.EmbedInteropTypes); 758Assert.False(pia5Ref.Properties.EmbedInteropTypes); 759Assert.True(library2Link.Properties.EmbedInteropTypes); 760Assert.False(library2Ref.Properties.EmbedInteropTypes); 1110Assert.True(pia5Link.Properties.EmbedInteropTypes); 1111Assert.False(pia5Ref.Properties.EmbedInteropTypes); 1118Assert.True(pia1Link.Properties.EmbedInteropTypes); 1119Assert.False(pia1Ref.Properties.EmbedInteropTypes); 1126Assert.True(library2Link.Properties.EmbedInteropTypes); 1127Assert.False(library2Ref.Properties.EmbedInteropTypes);
Symbols\Source\PropertyTests.cs (6)
2614Assert.False(comp.ExternalReferences[1].Properties.EmbedInteropTypes); 2632Assert.False(comp.ExternalReferences[1].Properties.EmbedInteropTypes); 2650Assert.True(comp.ExternalReferences[1].Properties.EmbedInteropTypes); 2668Assert.True(comp.ExternalReferences[1].Properties.EmbedInteropTypes); 2707Assert.True(comp.ExternalReferences[1].Properties.EmbedInteropTypes); 2725Assert.True(comp.ExternalReferences[1].Properties.EmbedInteropTypes);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
CSharpTestBase.cs (3)
1363var resolvedReferences = comp.References.Where(r => r.Properties.Kind == MetadataImageKind.Assembly); 1366!resolvedReferences.Any(r => r.Properties.HasRecursiveAliases)) 1374var comp2 = comp.RemoveAllReferences().AddReferences(used.Concat(comp.References.Where(r => r.Properties.Kind == MetadataImageKind.Module)));
Microsoft.CodeAnalysis.Features (1)
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (1)
112if (peReferenceKey is null || !HasGlobalAlias(peReference.Properties.Aliases))
Microsoft.CodeAnalysis.InteractiveHost (1)
Interactive\Core\InteractiveHost.ShadowCopyReference.cs (1)
33return _provider.GetMetadata(FilePath, Properties.Kind);
Microsoft.CodeAnalysis.Rebuild (3)
CompilationOptionsReader.cs (3)
328if (metadataReference.Properties.EmbedInteropTypes != metadataReferenceInfo.EmbedInteropTypes) 334(metadataReferenceInfo.ExternAlias is null && metadataReference.Properties.Aliases.IsEmpty) || 335(metadataReferenceInfo.ExternAlias == metadataReference.Properties.Aliases.SingleOrDefault())
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
CompilationRebuildArtifactResolver.cs (1)
26x.Properties.Aliases.SingleOrDefault() == metadataReferenceInfo.ExternAlias);
Microsoft.CodeAnalysis.Scripting (1)
Script.cs (1)
283var resolved = resolver.ResolveReference(unresolved.Reference, null, unresolved.Properties);
Microsoft.CodeAnalysis.Test.Utilities (5)
Compilation\IRuntimeEnvironment.cs (1)
105var isManifestModule = peRef.Properties.Kind == MetadataImageKind.Assembly;
CompilationVerifier.cs (1)
698if (metadataReference.Properties.Kind == MetadataImageKind.Assembly)
PDB\TestMetadataReferenceInfo.cs (3)
47metadataReference.Properties.Aliases, 48metadataReference.Properties.Kind, 49metadataReference.Properties.EmbedInteropTypes);
Microsoft.CodeAnalysis.UnitTests (71)
MetadataReferences\MetadataReferenceTests.cs (71)
105Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 106Assert.False(r.Properties.EmbedInteropTypes); 107Assert.True(r.Properties.Aliases.IsEmpty); 136Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 137Assert.False(r.Properties.EmbedInteropTypes); 138Assert.True(r.Properties.Aliases.IsEmpty); 152Assert.Equal(MetadataImageKind.Module, r.Properties.Kind); 153Assert.False(r.Properties.EmbedInteropTypes); 154Assert.True(r.Properties.Aliases.IsEmpty); 168Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 169Assert.False(r.Properties.EmbedInteropTypes); 170Assert.True(r.Properties.Aliases.IsEmpty); 173Assert.Equal(props, MetadataReference.CreateFromFile(file.Path, props).Properties); 191Assert.Equal(MetadataImageKind.Module, r.Properties.Kind); 192Assert.False(r.Properties.EmbedInteropTypes); 193Assert.True(r.Properties.Aliases.IsEmpty); 196Assert.Equal(props, MetadataReference.CreateFromFile(file.Path, props).Properties); 211Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 212Assert.False(r.Properties.EmbedInteropTypes); 213Assert.True(r.Properties.Aliases.IsEmpty); 217Assert.Equal(props, MetadataReference.CreateFromAssemblyInternal(assembly, props).Properties); 228Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 229Assert.True(r.Properties.EmbedInteropTypes); 230AssertEx.Equal(ImmutableArray.Create("a", "b"), r.Properties.Aliases); 261Assert.False(r.Properties.EmbedInteropTypes); 262Assert.Equal(MetadataImageKind.Module, r.Properties.Kind); 263Assert.True(r.Properties.Aliases.IsEmpty); 278Assert.Equal(MetadataImageKind.Assembly, r4.Properties.Kind); 300Assert.True(r.Properties.EmbedInteropTypes); 301Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 302AssertEx.Equal(new[] { "a" }, r.Properties.Aliases); 312Assert.Equal(r.Properties.EmbedInteropTypes, r3.Properties.EmbedInteropTypes); 313Assert.Equal(r.Properties.Kind, r3.Properties.Kind); 314AssertEx.Equal(new[] { "b", "c" }, r3.Properties.Aliases); 320Assert.False(r4.Properties.EmbedInteropTypes); 321Assert.Equal(r.Properties.Kind, r4.Properties.Kind); 322AssertEx.Equal(r.Properties.Aliases, r4.Properties.Aliases); 326Assert.Equal(MetadataImageKind.Module, r5.Properties.Kind); 327Assert.True(r5.Properties.Aliases.IsEmpty); 328Assert.False(r5.Properties.EmbedInteropTypes); 331Assert.Equal(MetadataImageKind.Assembly, r6.Properties.Kind); 332AssertEx.Equal(new[] { "x" }, r6.Properties.Aliases); 333Assert.True(r6.Properties.EmbedInteropTypes); 342Assert.False(r.Properties.EmbedInteropTypes); 343Assert.True(r.Properties.Aliases.IsEmpty); 344Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 348Assert.False(r1.Properties.EmbedInteropTypes); 349AssertEx.Equal(new[] { "a", "b" }, r1.Properties.Aliases); 350Assert.Equal(MetadataImageKind.Assembly, r1.Properties.Kind); 354Assert.True(r2.Properties.EmbedInteropTypes); 355Assert.True(r2.Properties.Aliases.IsEmpty); 356Assert.Equal(MetadataImageKind.Assembly, r2.Properties.Kind); 360Assert.True(r3.Properties.EmbedInteropTypes); 361AssertEx.Equal(new[] { "x" }, r3.Properties.Aliases); 362Assert.Equal(MetadataImageKind.Assembly, r3.Properties.Kind); 373Assert.False(r.Properties.EmbedInteropTypes); 374Assert.True(r.Properties.Aliases.IsEmpty); 375Assert.Equal(MetadataImageKind.Assembly, r.Properties.Kind); 379Assert.False(r1.Properties.EmbedInteropTypes); 380AssertEx.Equal(new[] { "a", "b" }, r1.Properties.Aliases); 381Assert.Equal(MetadataImageKind.Assembly, r1.Properties.Kind); 385Assert.True(r2.Properties.EmbedInteropTypes); 386Assert.True(r2.Properties.Aliases.IsEmpty); 387Assert.Equal(MetadataImageKind.Assembly, r2.Properties.Kind); 391Assert.True(r3.Properties.EmbedInteropTypes); 392AssertEx.Equal(new[] { "x" }, r3.Properties.Aliases); 393Assert.Equal(MetadataImageKind.Assembly, r3.Properties.Kind);
Microsoft.CodeAnalysis.VisualBasic (5)
CommandLine\VisualBasicCommandLineArguments.vb (1)
81Dim refProps = reference.Properties
Compilation\VisualBasicCompilation.vb (2)
1321If reference.Properties.Kind = MetadataImageKind.Assembly Then 1324Debug.Assert(reference.Properties.Kind = MetadataImageKind.Module)
Symbols\ReferenceManager.vb (1)
116Dim result As New AssemblyDataForCompilation(vbReference.Compilation, vbReference.Properties.EmbedInteropTypes)
Symbols\UsedAssemblies.vb (1)
29If reference.Properties.Kind = MetadataImageKind.Assembly Then
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (12)
SymbolsTests\Metadata\PE\NoPia.vb (12)
584Assert.True(pia1Link.Properties.EmbedInteropTypes) 585Assert.False(pia1Ref.Properties.EmbedInteropTypes) 586Assert.True(pia5Link.Properties.EmbedInteropTypes) 587Assert.False(pia5Ref.Properties.EmbedInteropTypes) 588Assert.True(library2Link.Properties.EmbedInteropTypes) 589Assert.False(library2Ref.Properties.EmbedInteropTypes) 849Assert.True(pia5Link.Properties.EmbedInteropTypes) 850Assert.False(pia5Ref.Properties.EmbedInteropTypes) 856Assert.True(pia1Link.Properties.EmbedInteropTypes) 857Assert.False(pia1Ref.Properties.EmbedInteropTypes) 863Assert.True(library2Link.Properties.EmbedInteropTypes) 864Assert.False(library2Ref.Properties.EmbedInteropTypes)
Microsoft.CodeAnalysis.Workspaces (11)
Serialization\SerializedPortableExecutableReference.cs (3)
62Kind={this.Properties.Kind} 63Aliases={this.Properties.Aliases.Join(",")} 64EmbedInteropTypes={this.Properties.EmbedInteropTypes}
Serialization\SerializerService_Reference.cs (1)
187WriteTo(reference.Properties, writer);
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
687.Single(m => m.FilePath == path && m.Properties == properties);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (3)
566var projectReference = new ProjectReference(projectIdToReference, peReference.Properties.Aliases, peReference.Properties.EmbedInteropTypes); 824createNewReference: static (solutionServices, reference) => CreateMetadataReference_NoLock(reference.FilePath!, reference.Properties, solutionServices),
Workspace\Solution\SolutionCompilationState.RootedSymbolSet.cs (1)
19=> new(reference.Properties, (reference as PortableExecutableReference)?.FilePath);
Workspace\Workspace.cs (2)
1437var newProjRef = new ProjectReference(matchingProjectId, pemeta.Properties.Aliases, pemeta.Properties.EmbedInteropTypes);
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
MSBuild\MSBuildWorkspace.cs (3)
587_applyChangesProjectFile.AddMetadataReferenceAsync(identity.GetDisplayName(), metadataReference.Properties.Aliases, hintPath: null, CancellationToken.None).Wait(); 593_applyChangesProjectFile.AddMetadataReferenceAsync(fileName, metadataReference.Properties.Aliases, hintPath: null, CancellationToken.None).Wait(); 599_applyChangesProjectFile.AddMetadataReferenceAsync(fileName, metadataReference.Properties.Aliases, relativePath, CancellationToken.None).Wait();
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (4)
VisualStudioMSBuildWorkspaceTests.cs (4)
191!mr.Properties.Aliases.IsDefault && 192mr.Properties.Aliases.Contains(aliasName)); 1418Assert.DoesNotContain(metaRefs, r => r.Properties.Aliases.Contains("CSharpProject")); 1447Assert.DoesNotContain(vbProject.MetadataReferences, r => r.Properties.Aliases.Contains("CSharpProject"));
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\MetadataReferences\VisualStudioPortableExecutableReference.cs (1)
46Debug.Assert(Properties.Kind == MetadataImageKind.Assembly);
VBCSCompiler (1)
src\Compilers\Server\VBCSCompiler\MetadataCache.cs (1)
131return s_mdCache.GetMetadata(FilePath, Properties);