59 references to MetadataReferenceProperties
BuildValidator (1)
LocalReferenceResolver.cs (1)
137properties: new MetadataReferenceProperties(
Microsoft.CodeAnalysis (5)
MetadataReference\AssemblyMetadata.cs (1)
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\MetadataReferenceProperties.cs (3)
25public static MetadataReferenceProperties Module => new MetadataReferenceProperties(MetadataImageKind.Module); 30public static MetadataReferenceProperties Assembly => new MetadataReferenceProperties(MetadataImageKind.Assembly); 76: this(kind, aliases, embedInteropTypes)
Microsoft.CodeAnalysis.CSharp (1)
CommandLine\CSharpCommandLineParser.cs (1)
1955var properties = new MetadataReferenceProperties(MetadataImageKind.Assembly, aliases, embedInteropTypes);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\ReferenceManagerTests.cs (2)
927var m1 = MetadataReference.CreateFromFile(p1, new MetadataReferenceProperties(MetadataImageKind.Module)); 928var m2 = MetadataReference.CreateFromFile(p2, new MetadataReferenceProperties(MetadataImageKind.Module));
Microsoft.CodeAnalysis.UnitTests (30)
MetadataReferences\MetadataReferencePropertiesTests.cs (19)
25m = new MetadataReferenceProperties(MetadataImageKind.Assembly, aliases: ImmutableArray.Create("\\/[.'\":_)??\t\n*#$@^%*&)", "goo"), embedInteropTypes: true); 30m = new MetadataReferenceProperties(MetadataImageKind.Module); 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)); 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 (11)
52Assert.Throws<ArgumentException>(() => MetadataReference.CreateFromAssemblyInternal(typeof(object).Assembly, new MetadataReferenceProperties(MetadataImageKind.Module))); 195var props = new MetadataReferenceProperties(MetadataImageKind.Module); 225var r = (PortableExecutableReference)MetadataReference.CreateFromAssemblyInternal(assembly, new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("a", "b"), embedInteropTypes: true), documentation: doc); 274var r3 = r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Module)); 277var r4 = r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Assembly)); 325var r5 = r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Module)); 330var r6 = r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("x"), embedInteropTypes: true)); 358var r3 = r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("x"), embedInteropTypes: true)); 364Assert.Throws<ArgumentException>(() => r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Module))); 389var r3 = r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Assembly, ImmutableArray.Create("x"), embedInteropTypes: true)); 395Assert.Throws<ArgumentException>(() => r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Module)));
Microsoft.CodeAnalysis.VisualBasic (9)
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)))
Microsoft.CodeAnalysis.Workspaces (3)
Serialization\SerializerService_Reference.cs (1)
318return new MetadataReferenceProperties(kind, aliases, embedInteropTypes);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (1)
659new MetadataReferenceProperties(
Workspace\Solution\SolutionCompilationState.cs (1)
1234var properties = new MetadataReferenceProperties(aliases: projectReference.Aliases, embedInteropTypes: projectReference.EmbedInteropTypes);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Workspaces\TestWorkspace_XmlConsumption.cs (1)
744var metadataReference = MetadataReference.CreateFromImage(image, new MetadataReferenceProperties(aliases: aliases), includeXmlDocComments ? new DeferredDocumentationProvider(compilation) : null);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ProjectSystemShim\CSharpProjectShim.ICSharpProjectSite.cs (1)
75ProjectSystemProject.AddMetadataReference(filename, new MetadataReferenceProperties(embedInteropTypes: embedInteropTypes));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
ProjectSystemShim\CPS\CSharpReferencesTests.cs (1)
47project3.AddMetadataReference(metadaRefFilePath, new MetadataReferenceProperties(embedInteropTypes: true));
Microsoft.VisualStudio.LanguageServices.UnitTests (4)
ProjectSystemShim\VisualStudioProjectTests\MetadataToProjectReferenceConversionTests.vb (4)
200referencingProject.AddMetadataReference(ReferencePath, New MetadataReferenceProperties(aliases:=ImmutableArray.Create("alias1"))) 208referencingProject.AddMetadataReference(ReferencePath, New MetadataReferenceProperties(aliases:=ImmutableArray.Create("alias2"))) 212referencingProject.RemoveMetadataReference(ReferencePath, New MetadataReferenceProperties(aliases:=ImmutableArray.Create("alias2"))) 217referencingProject.RemoveMetadataReference(ReferencePath, New MetadataReferenceProperties(aliases:=ImmutableArray.Create("alias1")))
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
ProjectSystemShim\VisualBasicProject.vb (1)
73ProjectSystemProject.AddMetadataReference(wszFileName, New MetadataReferenceProperties(embedInteropTypes:=True))