14 references to ToAssemblyName
Microsoft.CodeAnalysis.UnitTests (14)
MetadataReferences\AssemblyIdentityTests.cs (4)
310var an = ai.ToAssemblyName(); 326an = ai.ToAssemblyName(); 341an = ai.ToAssemblyName(); 359Assert.Throws<CultureNotFoundException>(() => ai.ToAssemblyName());
MetadataReferences\FusionAssemblyIdentityTests.cs (10)
89RoundTrip(new AssemblyIdentity("goo").ToAssemblyName()); 92var name = new AssemblyIdentity("goo", version: new Version(0xffff, 0xffff, 0xffff, 0xffff)).ToAssemblyName(); 98RoundTrip(new AssemblyIdentity("goo", version: new Version(1, 2, 3, 4)).ToAssemblyName()); 101RoundTrip(new AssemblyIdentity("goo", cultureName: CultureInfo.CurrentCulture.Name).ToAssemblyName()); 102RoundTrip(new AssemblyIdentity("goo", cultureName: "").ToAssemblyName()); 105RoundTrip(new AssemblyIdentity("goo", version: new Version(1, 2, 3, 4), cultureName: "en-US").ToAssemblyName()); 106RoundTrip(new AssemblyIdentity("goo", publicKeyOrToken: new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 }.AsImmutableOrNull()).ToAssemblyName()); 107RoundTrip(new AssemblyIdentity("goo", version: new Version(1, 2, 3, 4), cultureName: CultureInfo.CurrentCulture.Name, publicKeyOrToken: new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 }.AsImmutableOrNull()).ToAssemblyName()); 109RoundTrip(new AssemblyIdentity("goo", isRetargetable: true).ToAssemblyName()); 110RoundTrip(new AssemblyIdentity("goo", contentType: AssemblyContentType.WindowsRuntime).ToAssemblyName());