diff --git a/sdk.sln b/sdk.sln
index 5687dd393211..a1763a29f2a7 100644
--- a/sdk.sln
+++ b/sdk.sln
@@ -397,6 +397,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Assets", "Assets", "{06260D
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dotnet-new", "dotnet-new", "{81003712-2EF6-47D0-904A-64E4DDD75BF7}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.ApiSymbolExtensions", "src\Microsoft.DotNet.ApiSymbolExtensions\Microsoft.DotNet.ApiSymbolExtensions.csproj", "{08238DE9-701B-4581-A414-51F94C99E44D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.DotNet.ApiSymbolExtensions.Tests", "src\Tests\Microsoft.DotNet.ApiSymbolExtensions.Tests\Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj", "{E2BC296E-2660-4692-B471-F6FCD4C19F6E}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -755,6 +759,14 @@ Global
{C37EC61D-6A88-4C15-B371-A61F23EF9072}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C37EC61D-6A88-4C15-B371-A61F23EF9072}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C37EC61D-6A88-4C15-B371-A61F23EF9072}.Release|Any CPU.Build.0 = Release|Any CPU
+ {08238DE9-701B-4581-A414-51F94C99E44D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {08238DE9-701B-4581-A414-51F94C99E44D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {08238DE9-701B-4581-A414-51F94C99E44D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {08238DE9-701B-4581-A414-51F94C99E44D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E2BC296E-2660-4692-B471-F6FCD4C19F6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E2BC296E-2660-4692-B471-F6FCD4C19F6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E2BC296E-2660-4692-B471-F6FCD4C19F6E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E2BC296E-2660-4692-B471-F6FCD4C19F6E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -892,6 +904,8 @@ Global
{C37EC61D-6A88-4C15-B371-A61F23EF9072} = {81003712-2EF6-47D0-904A-64E4DDD75BF7}
{06260DC7-BA64-42BE-B99C-6069A1C3E70E} = {580D1AE7-AA8F-4912-8B76-105594E00B3B}
{81003712-2EF6-47D0-904A-64E4DDD75BF7} = {06260DC7-BA64-42BE-B99C-6069A1C3E70E}
+ {08238DE9-701B-4581-A414-51F94C99E44D} = {22AB674F-ED91-4FBC-BFEE-8A1E82F9F05E}
+ {E2BC296E-2660-4692-B471-F6FCD4C19F6E} = {580D1AE7-AA8F-4912-8B76-105594E00B3B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FB8F26CE-4DE6-433F-B32A-79183020BBD6}
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/ApiCompatServiceProvider.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/ApiCompatServiceProvider.cs
index 15d0c0ad2c62..2a8915c4d6c8 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/ApiCompatServiceProvider.cs
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/ApiCompatServiceProvider.cs
@@ -6,6 +6,7 @@
using Microsoft.DotNet.ApiCompatibility.Logging;
using Microsoft.DotNet.ApiCompatibility.Rules;
using Microsoft.DotNet.ApiCompatibility.Runner;
+using Microsoft.DotNet.ApiSymbolExtensions;
namespace Microsoft.DotNet.ApiCompat
{
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/CompatDifference.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/CompatDifference.cs
index bc46d5c7e623..4b917962daca 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/CompatDifference.cs
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/CompatDifference.cs
@@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using Microsoft.CodeAnalysis;
+using Microsoft.DotNet.ApiSymbolExtensions;
namespace Microsoft.DotNet.ApiCompatibility.Abstractions
{
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/TypeMapper.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/TypeMapper.cs
index f4a8d12f1fe6..29fce27f0d12 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/TypeMapper.cs
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/TypeMapper.cs
@@ -4,8 +4,8 @@
using System.Collections.Generic;
using System.Diagnostics;
using Microsoft.CodeAnalysis;
-using Microsoft.DotNet.ApiCompatibility.Extensions;
using Microsoft.DotNet.ApiCompatibility.Rules;
+using Microsoft.DotNet.ApiSymbolExtensions;
namespace Microsoft.DotNet.ApiCompatibility.Abstractions
{
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DefaultSymbolsEqualityComparer.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DefaultSymbolsEqualityComparer.cs
index 244f0675f809..8b69764d1d56 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DefaultSymbolsEqualityComparer.cs
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DefaultSymbolsEqualityComparer.cs
@@ -1,10 +1,10 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using Microsoft.CodeAnalysis;
-using Microsoft.DotNet.ApiCompatibility.Extensions;
using System;
using System.Collections.Generic;
+using Microsoft.CodeAnalysis;
+using Microsoft.DotNet.ApiSymbolExtensions;
namespace Microsoft.DotNet.ApiCompatibility
{
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DiagnosticIds.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DiagnosticIds.cs
index ef25359022e4..cd1a65c0d1dc 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DiagnosticIds.cs
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DiagnosticIds.cs
@@ -30,7 +30,6 @@ public static class DiagnosticIds
public const string CannotExpandVisibility = "CP0020";
// Assembly loading ids
- public const string AssemblyNotFound = "CP1001";
public const string AssemblyReferenceNotFound = "CP1002";
}
}
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/MapperSettings.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/MapperSettings.cs
index 4e0796536488..914083b0c7c8 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/MapperSettings.cs
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/MapperSettings.cs
@@ -4,7 +4,7 @@
using System.Collections;
using System.Collections.Generic;
using Microsoft.CodeAnalysis;
-using Microsoft.DotNet.ApiCompatibility.Abstractions;
+using Microsoft.DotNet.ApiSymbolExtensions;
namespace Microsoft.DotNet.ApiCompatibility
{
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Microsoft.DotNet.ApiCompatibility.csproj b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Microsoft.DotNet.ApiCompatibility.csproj
index 1e05a83e1977..6df18ad183f5 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Microsoft.DotNet.ApiCompatibility.csproj
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Microsoft.DotNet.ApiCompatibility.csproj
@@ -13,6 +13,10 @@
<_MicrosoftCodeAnalysisVersion Condition="'$(DotNetBuildFromSource)' == 'true'">$(MicrosoftCodeAnalysisPackageVersion)
+
+
+
+
@@ -25,5 +29,4 @@
-
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Resources.resx b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Resources.resx
index 9d810ecb933a..df53a4c8c945 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Resources.resx
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Resources.resx
@@ -141,15 +141,9 @@
{2} assembly version '{0}' should be equal to or higher than {3} version '{1}'.
-
- Could not resolve reference '{0}' in any of the provided search directories.
-
Element should not be null. Found null at index: {0}.
-
- File '{0}' does not exist.
-
The index should be within the right set size range.
@@ -162,27 +156,12 @@
Member '{0}' exists on {2} but not on {1}
-
- Could not find the provided path '{0}' to load binaries from.
-
-
- Provided stream for assembly '{0}' doesn't have any metadata to read. from.
-
Should at least contain one right name.Value should be greater than 0.
-
- Should not be null and contain at least one element.
-
-
- Should provide a valid assembly name.
-
-
- Stream position is greater than it's length, so there are no contents available to read.
-
Type '{0}' exists on {1} but not on {2}
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/AttributesMustMatch.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/AttributesMustMatch.cs
index d4e8ff594acd..f7edaedc2fa7 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/AttributesMustMatch.cs
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/AttributesMustMatch.cs
@@ -9,7 +9,7 @@
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
-using Microsoft.DotNet.ApiCompatibility.Extensions;
+using Microsoft.DotNet.ApiSymbolExtensions;
namespace Microsoft.DotNet.ApiCompatibility.Rules
{
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddAbstractMember.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddAbstractMember.cs
index 136bd79ad4e3..722712aa1375 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddAbstractMember.cs
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddAbstractMember.cs
@@ -4,7 +4,7 @@
using System.Collections.Generic;
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
-using Microsoft.DotNet.ApiCompatibility.Extensions;
+using Microsoft.DotNet.ApiSymbolExtensions;
namespace Microsoft.DotNet.ApiCompatibility.Rules
{
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddOrRemoveVirtualKeyword.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddOrRemoveVirtualKeyword.cs
index 1bb7d5ad2198..f08e61da0361 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddOrRemoveVirtualKeyword.cs
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddOrRemoveVirtualKeyword.cs
@@ -4,7 +4,7 @@
using System.Collections.Generic;
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
-using Microsoft.DotNet.ApiCompatibility.Extensions;
+using Microsoft.DotNet.ApiSymbolExtensions;
namespace Microsoft.DotNet.ApiCompatibility.Rules
{
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotChangeVisibility.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotChangeVisibility.cs
index 5a5ffcd950e2..ef53c006719a 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotChangeVisibility.cs
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotChangeVisibility.cs
@@ -6,7 +6,6 @@
using System.Runtime;
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
-using Microsoft.DotNet.ApiCompatibility.Extensions;
namespace Microsoft.DotNet.ApiCompatibility.Rules
{
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotRemoveBaseTypeOrInterface.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotRemoveBaseTypeOrInterface.cs
index a58e2263d4f4..f2f3d94ffba3 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotRemoveBaseTypeOrInterface.cs
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotRemoveBaseTypeOrInterface.cs
@@ -4,7 +4,7 @@
using System.Collections.Generic;
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
-using Microsoft.DotNet.ApiCompatibility.Extensions;
+using Microsoft.DotNet.ApiSymbolExtensions;
namespace Microsoft.DotNet.ApiCompatibility.Rules
{
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotSealType.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotSealType.cs
index 9288658d2c75..7c112ab3c246 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotSealType.cs
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotSealType.cs
@@ -4,7 +4,7 @@
using System.Collections.Generic;
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
-using Microsoft.DotNet.ApiCompatibility.Extensions;
+using Microsoft.DotNet.ApiSymbolExtensions;
namespace Microsoft.DotNet.ApiCompatibility.Rules
{
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/MembersMustExist.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/MembersMustExist.cs
index 098a33988e94..3c896d27eafd 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/MembersMustExist.cs
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/MembersMustExist.cs
@@ -5,7 +5,7 @@
using System.IO;
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
-using Microsoft.DotNet.ApiCompatibility.Extensions;
+using Microsoft.DotNet.ApiSymbolExtensions;
namespace Microsoft.DotNet.ApiCompatibility.Rules
{
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Runner/ApiCompatRunner.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Runner/ApiCompatRunner.cs
index 1f0b06b7833c..e00395f807c7 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Runner/ApiCompatRunner.cs
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Runner/ApiCompatRunner.cs
@@ -8,6 +8,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Logging;
+using Microsoft.DotNet.ApiSymbolExtensions;
namespace Microsoft.DotNet.ApiCompatibility.Runner
{
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.cs.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.cs.xlf
index 05323327a382..87136dd3d56a 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.cs.xlf
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.cs.xlf
@@ -117,11 +117,6 @@
Nelze odebrat virtuální klíčové slovo ze člena {0}.
-
- Could not resolve reference '{0}' in any of the provided search directories.
- V žádném z uvedených adresářů vyhledávání se nepovedlo přeložit odkaz {0}.
-
- Element should not be null. Found null at index: {0}.Element by neměl mít hodnotu null. V indexu byla nalezena hodnota null: {0}.
@@ -137,11 +132,6 @@
Hodnota pole {1} ve výčtu {0} se změnila z {2} na {3}.
-
- File '{0}' does not exist.
- Soubor {0} neexistuje.
-
- The index should be within the right set size range.Index by měl být ve správném rozsahu velikosti sady.
@@ -162,16 +152,6 @@
Člen {0} existuje v {2}, ale ne v {1}.
-
- Could not find the provided path '{0}' to load binaries from.
- Nepovedlo se najít zadanou cestu {0}, ze které se mají načíst binární soubory.
-
-
-
- Provided stream for assembly '{0}' doesn't have any metadata to read. from.
- Poskytnutý datový proud pro sestavení {0} nemá žádná metadata pro čtení.
-
- Should at least contain one right name.Měl by obsahovat alespoň jeden správný název.
@@ -182,21 +162,6 @@
Hodnota by měla být větší než 0.
-
- Should not be null and contain at least one element.
- Nesmí být null a obsahovat alespoň jeden element.
-
-
-
- Should provide a valid assembly name.
- Zadejte platný název sestavení.
-
-
-
- Stream position is greater than it's length, so there are no contents available to read.
- Pozice streamu je větší než jeho délka, proto není k dispozici žádný obsah pro čtení.
-
- Type '{0}' has the sealed modifier on {1} but not on {2}Typ {0} má zapečetěný modifikátor na {1} ale ne na {2}.
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.de.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.de.xlf
index 64f44e5919f7..7e595371e1d5 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.de.xlf
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.de.xlf
@@ -117,11 +117,6 @@
Das virtuelle Schlüsselwort kann nicht aus dem Member „{0}“ entfernt werden.
-
- Could not resolve reference '{0}' in any of the provided search directories.
- Der Verweis "{0}" konnte in keinem der angegebenen Suchverzeichnisse aufgelöst werden.
-
- Element should not be null. Found null at index: {0}.Das Element darf nicht NULL sein. NULL gefunden bei Index: {0}.
@@ -137,11 +132,6 @@
Wert des Felds „{1}2 in der Enumeration „{0}2 wurde von „{2}“ in „{3}“ geändert.
-
- File '{0}' does not exist.
- Die Datei '{0}' ist nicht vorhanden.
-
- The index should be within the right set size range.Der Index muss innerhalb des Größenbereichs für den Rechtesatz liegen.
@@ -162,16 +152,6 @@
Das Element „{0}“ ist auf {2} vorhanden, aber nicht auf {1}.
-
- Could not find the provided path '{0}' to load binaries from.
- Der angegebene Pfad "{0}" zum Laden von Binärdateien wurde nicht gefunden.
-
-
-
- Provided stream for assembly '{0}' doesn't have any metadata to read. from.
- Der angegebene Datenstrom für die Assembly "{0}" enthält keine Metadaten, aus denen gelesen werden kann.
-
- Should at least contain one right name.Sollte mindestens einen richtigen Namen enthalten.
@@ -182,21 +162,6 @@
Der Wert muss größer als 0 sein.
-
- Should not be null and contain at least one element.
- Darf nicht NULL sein und muss mindestens ein Element enthalten.
-
-
-
- Should provide a valid assembly name.
- Geben Sie einen gültigen Assemblynamen an.
-
-
-
- Stream position is greater than it's length, so there are no contents available to read.
- Die Datenstromposition ist größer als die Länge, daher sind keine Inhalte zum Lesen verfügbar.
-
- Type '{0}' has the sealed modifier on {1} but not on {2}Der Typ „{0}“ verfügt über den versiegelten Modifizierer auf {1}, auf {2} aber nicht.
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.es.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.es.xlf
index e0dec7ec3c09..08c86e1e1e2c 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.es.xlf
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.es.xlf
@@ -117,11 +117,6 @@
No se puede quitar la palabra clave virtual del miembro "{0}".
-
- Could not resolve reference '{0}' in any of the provided search directories.
- No se pudo resolver la referencia "{0}" en ninguno de los directorios de búsqueda proporcionados.
-
- Element should not be null. Found null at index: {0}.El elemento no debe ser nulo. Se encontró un valor nulo en el índice: {0}.
@@ -137,11 +132,6 @@
El valor del campo "{1}" en la enumeración "{0}" ha cambiado de "{2}" a "{3}".
-
- File '{0}' does not exist.
- El archivo '{0}' no existe.
-
- The index should be within the right set size range.El índice debe estar dentro del intervalo de tamaño establecido correcto.
@@ -162,16 +152,6 @@
El miembro '{0}' existe en {2} pero no en {1}
-
- Could not find the provided path '{0}' to load binaries from.
- No se pudo encontrar la ruta de acceso proporcionada "{0}" desde donde cargar archivos binarios.
-
-
-
- Provided stream for assembly '{0}' doesn't have any metadata to read. from.
- La secuencia proporcionada para el ensamblado "{0}" no tiene metadatos que leer.
-
- Should at least contain one right name.Debe contener al menos un nombre correcto.
@@ -182,21 +162,6 @@
El valor debe ser mayor que 0.
-
- Should not be null and contain at least one element.
- No debe ser nulo y debe contener al menos un elemento.
-
-
-
- Should provide a valid assembly name.
- Debe proporcionar un nombre de ensamblado válido.
-
-
-
- Stream position is greater than it's length, so there are no contents available to read.
- La posición de la secuencia es mayor que su longitud, por lo que no hay contenido disponible para leer.
-
- Type '{0}' has the sealed modifier on {1} but not on {2}El tipo '{0}' tiene el modificador sellado en {1}, pero no en {2}
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.fr.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.fr.xlf
index eafe1f1ee9aa..0a2e784e5b05 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.fr.xlf
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.fr.xlf
@@ -117,11 +117,6 @@
Impossible de supprimer le mot-clé virtuel du membre '{0}'.
-
- Could not resolve reference '{0}' in any of the provided search directories.
- Impossible de résoudre la référence «{0}» dans l’un des répertoires de recherche fournis.
-
- Element should not be null. Found null at index: {0}.L’élément ne doit pas être null. Null trouvé à l’index : {0}.
@@ -137,11 +132,6 @@
La valeur du champ '{1}' dans l'énumération '{0}' est passée de '{2}' à '{3}'.
-
- File '{0}' does not exist.
- Le fichier « {0} » n'existe pas.
-
- The index should be within the right set size range.L’index doit se trouver dans la plage de taille de jeu appropriée.
@@ -162,16 +152,6 @@
Le membre '{0}' existe sur {2}, mais pas sur {1}.
-
- Could not find the provided path '{0}' to load binaries from.
- Le chemin d’accès fourni «{0}» à partir duquel charger les fichiers binaires est introuvable.
-
-
-
- Provided stream for assembly '{0}' doesn't have any metadata to read. from.
- Le flux fourni pour l’assembly '{0}' n’a aucune métadonnée à lire. De.
-
- Should at least contain one right name.Doit contenir au moins un nom droit.
@@ -182,21 +162,6 @@
La valeur doit être supérieure à 0
-
- Should not be null and contain at least one element.
- Ne doit pas être null et contenir au moins un élément.
-
-
-
- Should provide a valid assembly name.
- Doit fournir un nom d’assembly valide.
-
-
-
- Stream position is greater than it's length, so there are no contents available to read.
- La position du flux est supérieure à sa longueur. Aucun contenu n’est donc disponible pour la lecture.
-
- Type '{0}' has the sealed modifier on {1} but not on {2}Le type' {0} 'a le modificateur est scellé sur {1} mais pas sur {2}.
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.it.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.it.xlf
index 4953cfc1e8ce..378f06aa90a7 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.it.xlf
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.it.xlf
@@ -117,11 +117,6 @@
Non è possibile rimuovere la parola chiave virtuale dal membro '{0}'.
-
- Could not resolve reference '{0}' in any of the provided search directories.
- Non è stato possibile risolvere il riferimento '{0}' in nessuna delle directory di ricerca specificate.
-
- Element should not be null. Found null at index: {0}.L'elemento non deve essere null. Trovato valore null all'indice: {0}.
@@ -137,11 +132,6 @@
Il valore del campo '{1}' nell'enumerazione '{0}' è stato modificato da '{2}' a '{3}'.
-
- File '{0}' does not exist.
- Il file '{0}' non esiste.
-
- The index should be within the right set size range.L'indice deve essere compreso nell'intervallo delle dimensioni del set di destra.
@@ -162,16 +152,6 @@
Il membro '{0}' esiste in {2} ma non in {1}
-
- Could not find the provided path '{0}' to load binaries from.
- Non è stato possibile trovare il percorso specificato '{0}' da cui caricare i file binari.
-
-
-
- Provided stream for assembly '{0}' doesn't have any metadata to read. from.
- Il flusso specificato per l'assembly '{0}' non contiene metadati da leggere.
-
- Should at least contain one right name.Deve contenere almeno un nome a destra.
@@ -182,21 +162,6 @@
Il valore deve essere maggiore di 0.
-
- Should not be null and contain at least one element.
- Non deve essere null e deve contenere almeno un elemento.
-
-
-
- Should provide a valid assembly name.
- Deve fornire un nome di assembly valido.
-
-
-
- Stream position is greater than it's length, so there are no contents available to read.
- La posizione del flusso è maggiore della lunghezza, quindi non sono disponibili contenuti da leggere.
-
- Type '{0}' has the sealed modifier on {1} but not on {2}Il tipo '{0}' ha il modificatore sealed in {1} ma non in {2}
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ja.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ja.xlf
index df7ef897ae8c..c023de5a9690 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ja.xlf
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ja.xlf
@@ -117,11 +117,6 @@
メンバー '{0}' から仮想キーワードを削除できません。
-
- Could not resolve reference '{0}' in any of the provided search directories.
- 指定された検索ディレクトリ内の参照 '{0}' を解決できませんでした。
-
- Element should not be null. Found null at index: {0}.要素を null にすることはできません。インデックスに null が見つかりました: {0}。
@@ -137,11 +132,6 @@
列挙型 '{0}' のフィールド '{1}' の値が '{2}' から '{3}' に変更されました。
-
- File '{0}' does not exist.
- ファイル '{0}' が存在しません。
-
- The index should be within the right set size range.このインデックスは、設定されたサイズ範囲内に存在する必要があります。
@@ -162,16 +152,6 @@
メンバー '{0}' は {2} に存在していますが、{1} には存在しません
-
- Could not find the provided path '{0}' to load binaries from.
- バイナリを読み込むために指定されたパス '{0}' が見つかりませんでした。
-
-
-
- Provided stream for assembly '{0}' doesn't have any metadata to read. from.
- アセンブリ '{0}' に指定されたストリームに読み取るメタデータがありません。送信者。
-
- Should at least contain one right name.少なくとも 1 つの権利名を含む必要があります。
@@ -182,21 +162,6 @@
値は 0 以上にする必要があります。
-
- Should not be null and contain at least one element.
- null および 1 つ以上の要素が含まれている必要があります。
-
-
-
- Should provide a valid assembly name.
- 有効なアセンブリ名を指定する必要があります。
-
-
-
- Stream position is greater than it's length, so there are no contents available to read.
- ストリームの位置が長さより大きいため、読み取り可能なコンテンツがありません。
-
- Type '{0}' has the sealed modifier on {1} but not on {2}型 '{0}' は {1} に sealed 修飾子がありますが、{2} にはありません
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ko.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ko.xlf
index f3cc1702ed2a..1da5b89db929 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ko.xlf
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ko.xlf
@@ -117,11 +117,6 @@
구성원 '{0}'에서 가상 키워드를 제거할 수 없습니다.
-
- Could not resolve reference '{0}' in any of the provided search directories.
- 제공된 검색 디렉터리에서 참조 '{0}'(을)를 확인할 수 없습니다.
-
- Element should not be null. Found null at index: {0}.요소는 Null이 아니어야 합니다. 인덱스 {0}에 Null이 있습니다.
@@ -137,11 +132,6 @@
열거형 '{0}'의 필드 '{1}' 값이 '{2}'에서 '{3}'(으)로 변경되었습니다.
-
- File '{0}' does not exist.
- 파일 '{0}'이(가) 없습니다.
-
- The index should be within the right set size range.인덱스는 올바른 집합 크기 범위 내에 있어야 합니다.
@@ -162,16 +152,6 @@
멤버 '{0}'이(가) {2}에는 있지만 {1}에는 없습니다
-
- Could not find the provided path '{0}' to load binaries from.
- 이진 파일을 로드할 제공된 경로 '{0}'을(를) 찾을 수 없습니다.
-
-
-
- Provided stream for assembly '{0}' doesn't have any metadata to read. from.
- 어셈블리 '{0}'에 대해 제공된 스트림에 읽을 메타데이터가 없습니다.
-
- Should at least contain one right name.하나 이상의 올바른 이름을 포함해야 합니다.
@@ -182,21 +162,6 @@
값은 0보다 커야 합니다.
-
- Should not be null and contain at least one element.
- Null이 아니어야 하고 요소를 하나 이상 포함해야 합니다.
-
-
-
- Should provide a valid assembly name.
- 유효한 어셈블리 이름을 제공해야 합니다.
-
-
-
- Stream position is greater than it's length, so there are no contents available to read.
- 스트림 위치가 길이 보다 크므로 읽을 수 있는 콘텐츠가 없습니다.
-
- Type '{0}' has the sealed modifier on {1} but not on {2}'{0}' 유형은 {1}에 봉인된 한정자가 있지만 {2}에는 없습니다
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pl.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pl.xlf
index 2a40d1c7fb44..8dd5ee0d59b4 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pl.xlf
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pl.xlf
@@ -117,11 +117,6 @@
Nie można usunąć wirtualnego słowa kluczowego z składowej „{0}”.
-
- Could not resolve reference '{0}' in any of the provided search directories.
- Nie można rozpoznać odwołania "{0}" w żadnym z podanych katalogów wyszukiwania.
-
- Element should not be null. Found null at index: {0}.Element nie może mieć wartości null. Znaleziono wartość null w indeksie: {0}.
@@ -137,11 +132,6 @@
Wartość pola „{1}” w wyliczeniu „{0}” zmieniona z „{2}” na „{3}”.
-
- File '{0}' does not exist.
- Plik „{0}” nie istnieje.
-
- The index should be within the right set size range.Indeks powinien znajdować się w zakresie rozmiaru zestawu po prawej.
@@ -162,16 +152,6 @@
Członek „{0}” istnieje w {2}, ale nie w {1}
-
- Could not find the provided path '{0}' to load binaries from.
- Nie można odnaleźć podanej ścieżki "{0}", z której mają zostać załadowane pliki binarne.
-
-
-
- Provided stream for assembly '{0}' doesn't have any metadata to read. from.
- Podany strumień dla zestawu "{0}" nie ma metadanych, z których można odczytywać.
-
- Should at least contain one right name.Powinna zawierać co najmniej jedną prawidłową nazwę.
@@ -182,21 +162,6 @@
Wartość powinna być większa od 0.
-
- Should not be null and contain at least one element.
- Nie może mieć wartości null i powinna zawierać co najmniej jeden element.
-
-
-
- Should provide a valid assembly name.
- Należy podać prawidłową nazwę zestawu.
-
-
-
- Stream position is greater than it's length, so there are no contents available to read.
- Pozycja strumienia jest większa niż jego długość, więc nie ma dostępnej zawartości do odczytania.
-
- Type '{0}' has the sealed modifier on {1} but not on {2}Typ „{0}” ma zapieczętowany modyfikator w {1}, ale nie w {2}
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pt-BR.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pt-BR.xlf
index ec820cee1080..96f87381eca6 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pt-BR.xlf
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pt-BR.xlf
@@ -117,11 +117,6 @@
Não é possível remover a palavra-chave virtual do membro '{0}'.
-
- Could not resolve reference '{0}' in any of the provided search directories.
- Não foi possível resolver a referência '{0}' em nenhum dos diretórios de pesquisa fornecidos.
-
- Element should not be null. Found null at index: {0}.O elemento não deve ser nulo. Nulo encontrado no índice: {0}.
@@ -137,11 +132,6 @@
Valor do campo '{1}' na enumeração '{0}' alterado de '{2}' para '{3}'.
-
- File '{0}' does not exist.
- O arquivo '{0}' não existe.
-
- The index should be within the right set size range.O índice deve estar dentro do intervalo correto de tamanho definido.
@@ -162,16 +152,6 @@
O membro '{0}' existe em {2} mas não em {1}
-
- Could not find the provided path '{0}' to load binaries from.
- Não foi possível encontrar o caminho fornecido '{0}' para carregar os binários.
-
-
-
- Provided stream for assembly '{0}' doesn't have any metadata to read. from.
- O fluxo fornecido para o assembly '{0}' não tem metadados para ler. desde.
-
- Should at least contain one right name.Deve conter pelo menos um nome correto.
@@ -182,21 +162,6 @@
O valor deve ser maior que 0.
-
- Should not be null and contain at least one element.
- Não deve ser nulo e conter pelo menos um elemento.
-
-
-
- Should provide a valid assembly name.
- Deve fornecer um nome de assembly válido.
-
-
-
- Stream position is greater than it's length, so there are no contents available to read.
- A posição do fluxo é maior do que seu comprimento, portanto, não há conteúdo disponível para leitura.
-
- Type '{0}' has the sealed modifier on {1} but not on {2}O tipo '{0}' tem o modificador selado em {1}, mas não em {2}
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ru.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ru.xlf
index 86150f6056f8..dae07daa38bc 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ru.xlf
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ru.xlf
@@ -117,11 +117,6 @@
Не удается удалить виртуальное ключевое слово из элемента "{0}".
-
- Could not resolve reference '{0}' in any of the provided search directories.
- Не удалось разрешить ссылку "{0}" ни в одном из указанных каталогов поиска.
-
- Element should not be null. Found null at index: {0}.Элемент не должен иметь значение NULL. Обнаружено значение NULL в индексе: {0}.
@@ -137,11 +132,6 @@
Значение поля "{1}" в перечислении "{0}" изменено с "{2}" на "{3}".
-
- File '{0}' does not exist.
- Файл "{0}" не существует.
-
- The index should be within the right set size range.Значение индекса должно находиться в пределах правильного диапазона размеров.
@@ -162,16 +152,6 @@
Элемент "{0}" существует в {2}, но не в {1}
-
- Could not find the provided path '{0}' to load binaries from.
- Не удалось найти указанный путь "{0}" для загрузки двоичных файлов.
-
-
-
- Provided stream for assembly '{0}' doesn't have any metadata to read. from.
- Указанный поток для сборки "{0}" не имеет метаданных для чтения. От.
-
- Should at least contain one right name.Должно содержать хотя бы одно правильное имя.
@@ -182,21 +162,6 @@
Значение должно быть больше 0.
-
- Should not be null and contain at least one element.
- Не должно иметь значение NULL и содержать хотя бы один элемент.
-
-
-
- Should provide a valid assembly name.
- Необходимо указать допустимое имя сборки.
-
-
-
- Stream position is greater than it's length, so there are no contents available to read.
- Позиция потока больше его длины, поэтому содержимое, доступное для чтения, отсутствует.
-
- Type '{0}' has the sealed modifier on {1} but not on {2}Тип "{0}" имеет запечатанный модификатор для {1}, но не для {2}
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.tr.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.tr.xlf
index 577d32ba8dd0..861365e2ca79 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.tr.xlf
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.tr.xlf
@@ -117,11 +117,6 @@
Sanal anahtar sözcük, '{0}' üyesinden kaldırılamıyor.
-
- Could not resolve reference '{0}' in any of the provided search directories.
- Sağlanan arama dizinlerinin hiçbirinde '{0}' başvurusu çözümlenemedi.
-
- Element should not be null. Found null at index: {0}.Öğe null olmamalıdır. Dizinde null bulundu: {0}.
@@ -137,11 +132,6 @@
'{0}' sabit listesindeki '{1}' alan değeri, '{2}' öğesinden '{3}' öğesine değiştirildi.
-
- File '{0}' does not exist.
- '{0}' dosyası yok.
-
- The index should be within the right set size range.Dizin, doğru ayarlanmış boyut aralığında olmalıdır.
@@ -162,16 +152,6 @@
'{0}' üyesi {2} üzerinde var ancak {1} üzerinde yok
-
- Could not find the provided path '{0}' to load binaries from.
- İkilileri yüklemek için sağlanan '{0}' yolu bulunamadı.
-
-
-
- Provided stream for assembly '{0}' doesn't have any metadata to read. from.
- '{0}' bütünleştirilmiş kodu için sağlanan akış, okunacak herhangi bir meta veriye sahip değil.
-
- Should at least contain one right name.En az bir hak adı içermelidir.
@@ -182,21 +162,6 @@
Değer, 0'dan büyük olmalıdır.
-
- Should not be null and contain at least one element.
- Null olmamalı ve en az bir öğe içermelidir.
-
-
-
- Should provide a valid assembly name.
- Geçerli bir bütünleştirilmiş kod adı sağlanmalıdır.
-
-
-
- Stream position is greater than it's length, so there are no contents available to read.
- Akış konumu, akış uzunluğundan büyük olduğundan okunabilecek içerik yok.
-
- Type '{0}' has the sealed modifier on {1} but not on {2}'{0}' türü, {1} üzerinde mühürlü değiştiriciye sahip ancak {2} üzerinde sahip değil
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hans.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hans.xlf
index 615b7273471b..0ae24a9f30df 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hans.xlf
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hans.xlf
@@ -117,11 +117,6 @@
无法从成员“{0}”中删除虚拟关键字。
-
- Could not resolve reference '{0}' in any of the provided search directories.
- 无法在任何提供的搜索目录中解析引用“{0}”。
-
- Element should not be null. Found null at index: {0}.元素不应为 null。在索引 {0} 找到 null。
@@ -137,11 +132,6 @@
枚举“{0}”中字段“{1}”的值已从“{2}”更改为“{3}”。
-
- File '{0}' does not exist.
- 文件“{0}”不存在。
-
- The index should be within the right set size range.索引应在正确的集大小范围内。
@@ -162,16 +152,6 @@
成员“{0}”在 {2} 上存在,但在 {1} 上不存在
-
- Could not find the provided path '{0}' to load binaries from.
- 找不到所提供的要从中加载二进制文件的路径“{0}”。
-
-
-
- Provided stream for assembly '{0}' doesn't have any metadata to read. from.
- 为程序集“{0}”提供的流没有任何可供读取的元数据。
-
- Should at least contain one right name.应至少包含一个权限名称。
@@ -182,21 +162,6 @@
值应大于 0。
-
- Should not be null and contain at least one element.
- 不应为 null,并且应至少包含一个元素。
-
-
-
- Should provide a valid assembly name.
- 应提供有效的程序集名称。
-
-
-
- Stream position is greater than it's length, so there are no contents available to read.
- 流位置大于其长度,因此没有可供读取的内容。
-
- Type '{0}' has the sealed modifier on {1} but not on {2}类型“{0}”在 {1} 上具有密封修饰符,但在 {2} 上没有
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hant.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hant.xlf
index fd3a1cd00aea..14b3cdb31983 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hant.xlf
+++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hant.xlf
@@ -117,11 +117,6 @@
無法從成員 '{0}' 移除虛擬關鍵字。
-
- Could not resolve reference '{0}' in any of the provided search directories.
- 無法在任何提供的搜尋目錄中解析參考 '{0}'。
-
- Element should not be null. Found null at index: {0}.元素不應為 Null。在索引找到 Null: {0}。
@@ -137,11 +132,6 @@
列舉 '{1}' 中的欄位 '{0}' 值已從 '{2}' 變更為 '{3}'。
-
- File '{0}' does not exist.
- 檔案 '{0}' 不存在。
-
- The index should be within the right set size range.索引應該在正確的集大小範圍內。
@@ -162,16 +152,6 @@
成員 '{0}' 存在於 {2} 上,但不在 {1} 上
-
- Could not find the provided path '{0}' to load binaries from.
- 找不到提供的路徑 '{0}',無法從中載入二進位檔。
-
-
-
- Provided stream for assembly '{0}' doesn't have any metadata to read. from.
- 為元件 '{0}' 提供的資料流程沒有任何可從中讀取的中繼資料。
-
- Should at least contain one right name.至少應包含一個正確名稱。
@@ -182,21 +162,6 @@
值應大於 0。
-
- Should not be null and contain at least one element.
- 不應為 Null 且必須包含至少一個元素。
-
-
-
- Should provide a valid assembly name.
- 必須提供有效的元件名稱。
-
-
-
- Stream position is greater than it's length, so there are no contents available to read.
- 串流位置大於其長度,因此沒有可供讀取的內容。
-
- Type '{0}' has the sealed modifier on {1} but not on {2}類型 '{0}' 在 {1} 上有密封的修飾元,但在 {2} 上沒有
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/AssemblyLoadWarning.cs b/src/Microsoft.DotNet.ApiSymbolExtensions/AssemblyLoadWarning.cs
similarity index 96%
rename from src/ApiCompat/Microsoft.DotNet.ApiCompatibility/AssemblyLoadWarning.cs
rename to src/Microsoft.DotNet.ApiSymbolExtensions/AssemblyLoadWarning.cs
index d1131fb898d1..c91564de7d99 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/AssemblyLoadWarning.cs
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/AssemblyLoadWarning.cs
@@ -3,9 +3,8 @@
using System;
using System.Collections.Generic;
-using Microsoft.DotNet.ApiCompatibility.Abstractions;
-namespace Microsoft.DotNet.ApiCompatibility
+namespace Microsoft.DotNet.ApiSymbolExtensions
{
///
/// Class that represents a warning that occurred while trying to load a specific assembly.
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/AssemblySymbolLoader.cs b/src/Microsoft.DotNet.ApiSymbolExtensions/AssemblySymbolLoader.cs
similarity index 95%
rename from src/ApiCompat/Microsoft.DotNet.ApiCompatibility/AssemblySymbolLoader.cs
rename to src/Microsoft.DotNet.ApiSymbolExtensions/AssemblySymbolLoader.cs
index 590e3b836f18..8ecd40571962 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/AssemblySymbolLoader.cs
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/AssemblySymbolLoader.cs
@@ -12,17 +12,15 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
-namespace Microsoft.DotNet.ApiCompatibility
+namespace Microsoft.DotNet.ApiSymbolExtensions
{
///
/// Loads objects from source files, binaries or directories containing binaries.
///
public class AssemblySymbolLoader : IAssemblySymbolLoader
{
- ///
- /// Dictionary that holds the paths to help loading dependencies. Keys will be assembly name and
- /// value are the containing folder.
- ///
+ // Dictionary that holds the paths to help loading dependencies. Keys will be assembly name and
+ // value are the containing folder.
private readonly Dictionary _referencePathFiles = new(StringComparer.OrdinalIgnoreCase);
private readonly HashSet _referencePathDirectories = new(StringComparer.OrdinalIgnoreCase);
private readonly List _warnings = new();
@@ -30,6 +28,16 @@ public class AssemblySymbolLoader : IAssemblySymbolLoader
private readonly bool _resolveReferences;
private CSharpCompilation _cSharpCompilation;
+ ///
+ /// Error code that is emitted when an assembly isn't found.
+ ///
+ public const string AssemblyNotFoundErrorCode = "CP1001";
+
+ ///
+ /// Error code that is emitted when an assembly reference isn't found.
+ ///
+ public const string AssemblyReferenceNotFoundErrorCode = "CP1002";
+
///
public AssemblySymbolLoader(bool resolveAssemblyReferences = false)
{
@@ -189,11 +197,6 @@ public IAssemblySymbol LoadAssemblyFromSourceFiles(IEnumerable filePaths
List syntaxTrees = new();
foreach (string filePath in filePaths)
{
- if (!File.Exists(filePath))
- {
- throw new FileNotFoundException(string.Format(Resources.FileDoesNotExist, filePath));
- }
-
syntaxTrees.Add(CSharpSyntaxTree.ParseText(File.ReadAllText(filePath)));
}
@@ -242,7 +245,9 @@ public IEnumerable LoadMatchingAssemblies(IEnumerable? refe
if (!found)
{
_warnings.Add(new AssemblyLoadWarning(
- DiagnosticIds.AssemblyReferenceNotFound,
+ AssemblyReferenceNotFoundErrorCode,
name,
string.Format(Resources.CouldNotResolveReference, name)));
}
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/AssemblySymbolLoaderFactory.cs b/src/Microsoft.DotNet.ApiSymbolExtensions/AssemblySymbolLoaderFactory.cs
similarity index 91%
rename from src/ApiCompat/Microsoft.DotNet.ApiCompatibility/AssemblySymbolLoaderFactory.cs
rename to src/Microsoft.DotNet.ApiSymbolExtensions/AssemblySymbolLoaderFactory.cs
index a1d7c7f7c8d6..030a1eba3cbe 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/AssemblySymbolLoaderFactory.cs
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/AssemblySymbolLoaderFactory.cs
@@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-namespace Microsoft.DotNet.ApiCompatibility
+namespace Microsoft.DotNet.ApiSymbolExtensions
{
///
/// Factory to create an AssemblySymbolLoader
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Filtering/ISymbolFilter.cs b/src/Microsoft.DotNet.ApiSymbolExtensions/Filtering/ISymbolFilter.cs
similarity index 92%
rename from src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Filtering/ISymbolFilter.cs
rename to src/Microsoft.DotNet.ApiSymbolExtensions/Filtering/ISymbolFilter.cs
index 6b06a0d05ff9..5bc423c36fdc 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Filtering/ISymbolFilter.cs
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/Filtering/ISymbolFilter.cs
@@ -3,7 +3,7 @@
using Microsoft.CodeAnalysis;
-namespace Microsoft.DotNet.ApiCompatibility.Abstractions
+namespace Microsoft.DotNet.ApiSymbolExtensions
{
///
/// Provides a mechanism to filter when building the .
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Filtering/SymbolAccessibilityBasedFilter.cs b/src/Microsoft.DotNet.ApiSymbolExtensions/Filtering/SymbolAccessibilityBasedFilter.cs
similarity index 65%
rename from src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Filtering/SymbolAccessibilityBasedFilter.cs
rename to src/Microsoft.DotNet.ApiSymbolExtensions/Filtering/SymbolAccessibilityBasedFilter.cs
index 950f873c0304..02133c4aef1d 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Filtering/SymbolAccessibilityBasedFilter.cs
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/Filtering/SymbolAccessibilityBasedFilter.cs
@@ -2,15 +2,15 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Microsoft.CodeAnalysis;
-using Microsoft.DotNet.ApiCompatibility.Extensions;
+using Microsoft.DotNet.ApiSymbolExtensions;
-namespace Microsoft.DotNet.ApiCompatibility.Abstractions
+namespace Microsoft.DotNet.ApiSymbolExtensions
{
- internal class SymbolAccessibilityBasedFilter : ISymbolFilter
+ public class SymbolAccessibilityBasedFilter : ISymbolFilter
{
private readonly bool _includeInternalSymbols;
- internal SymbolAccessibilityBasedFilter(bool includeInternalSymbols)
+ public SymbolAccessibilityBasedFilter(bool includeInternalSymbols)
{
_includeInternalSymbols = includeInternalSymbols;
}
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/IAssemblySymbolLoader.cs b/src/Microsoft.DotNet.ApiSymbolExtensions/IAssemblySymbolLoader.cs
similarity index 97%
rename from src/ApiCompat/Microsoft.DotNet.ApiCompatibility/IAssemblySymbolLoader.cs
rename to src/Microsoft.DotNet.ApiSymbolExtensions/IAssemblySymbolLoader.cs
index f80678424941..279122eed87d 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/IAssemblySymbolLoader.cs
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/IAssemblySymbolLoader.cs
@@ -2,12 +2,10 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Microsoft.CodeAnalysis;
-using Microsoft.CodeAnalysis.CSharp;
using System.Collections.Generic;
-using System.Collections.Immutable;
using System.IO;
-namespace Microsoft.DotNet.ApiCompatibility
+namespace Microsoft.DotNet.ApiSymbolExtensions
{
///
/// Loads objects from source files, binaries or directories containing binaries.
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/IAssemblySymbolLoaderFactory.cs b/src/Microsoft.DotNet.ApiSymbolExtensions/IAssemblySymbolLoaderFactory.cs
similarity index 93%
rename from src/ApiCompat/Microsoft.DotNet.ApiCompatibility/IAssemblySymbolLoaderFactory.cs
rename to src/Microsoft.DotNet.ApiSymbolExtensions/IAssemblySymbolLoaderFactory.cs
index 15f0ae95af99..8fd831af66d4 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/IAssemblySymbolLoaderFactory.cs
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/IAssemblySymbolLoaderFactory.cs
@@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-namespace Microsoft.DotNet.ApiCompatibility
+namespace Microsoft.DotNet.ApiSymbolExtensions
{
///
/// Factory to create an AssemblySymbolLoader
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/IDiagnostic.cs b/src/Microsoft.DotNet.ApiSymbolExtensions/IDiagnostic.cs
similarity index 92%
rename from src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/IDiagnostic.cs
rename to src/Microsoft.DotNet.ApiSymbolExtensions/IDiagnostic.cs
index 6dece78f6ffe..6b17bd6253fc 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/IDiagnostic.cs
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/IDiagnostic.cs
@@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-namespace Microsoft.DotNet.ApiCompatibility.Abstractions
+namespace Microsoft.DotNet.ApiSymbolExtensions
{
///
/// Interface that describes a diagnostic.
diff --git a/src/Microsoft.DotNet.ApiSymbolExtensions/Microsoft.DotNet.ApiSymbolExtensions.csproj b/src/Microsoft.DotNet.ApiSymbolExtensions/Microsoft.DotNet.ApiSymbolExtensions.csproj
new file mode 100644
index 000000000000..c597e966dde7
--- /dev/null
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/Microsoft.DotNet.ApiSymbolExtensions.csproj
@@ -0,0 +1,26 @@
+
+
+
+ net6.0;net472
+ enable
+ net7.0;net472
+ Open
+
+ <_MicrosoftCodeAnalysisVersion>4.0.1
+ <_MicrosoftCodeAnalysisVersion Condition="'$(DotNetBuildFromSource)' == 'true'">$(MicrosoftCodeAnalysisPackageVersion)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.ApiSymbolExtensions/Resources.resx b/src/Microsoft.DotNet.ApiSymbolExtensions/Resources.resx
new file mode 100644
index 000000000000..d7fa05dbf47f
--- /dev/null
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/Resources.resx
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Could not resolve reference '{0}' in any of the provided search directories.
+
+
+ Could not find matching assembly: '{0}' in any of the search directories.
+
+
+ Could not find the provided path '{0}' to load binaries from.
+
+
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+
+
+ Should not be null and contain at least one element.
+
+
+ Should provide a valid assembly name.
+
+
+ Stream position is greater than it's length, so there are no contents available to read.
+
+
\ No newline at end of file
diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Extensions/SymbolExtensions.cs b/src/Microsoft.DotNet.ApiSymbolExtensions/SymbolExtensions.cs
similarity index 83%
rename from src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Extensions/SymbolExtensions.cs
rename to src/Microsoft.DotNet.ApiSymbolExtensions/SymbolExtensions.cs
index e656c89c0101..f52b12153c4b 100644
--- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Extensions/SymbolExtensions.cs
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/SymbolExtensions.cs
@@ -1,17 +1,17 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using Microsoft.CodeAnalysis;
using System;
using System.Collections.Generic;
+using Microsoft.CodeAnalysis;
-namespace Microsoft.DotNet.ApiCompatibility.Extensions
+namespace Microsoft.DotNet.ApiSymbolExtensions
{
- internal static class SymbolExtensions
+ public static class SymbolExtensions
{
- private static SymbolDisplayFormat Format { get; } = GetSymbolDisplayFormat();
+ public static SymbolDisplayFormat Format { get; } = GetSymbolDisplayFormat();
- private static SymbolDisplayFormat GetSymbolDisplayFormat()
+ public static SymbolDisplayFormat GetSymbolDisplayFormat()
{
// This is the default format for symbol.ToDisplayString;
SymbolDisplayFormat format = SymbolDisplayFormat.CSharpErrorMessageFormat;
@@ -29,12 +29,12 @@ private static SymbolDisplayFormat GetSymbolDisplayFormat()
return format.WithParameterOptions(format.ParameterOptions & ~SymbolDisplayParameterOptions.IncludeParamsRefOut);
}
- internal static string ToComparisonDisplayString(this ISymbol symbol) =>
+ public static string ToComparisonDisplayString(this ISymbol symbol) =>
symbol.ToDisplayString(Format)
.Replace("System.IntPtr", "nint") // Treat IntPtr and nint as the same
.Replace("System.UIntPtr", "nuint"); // Treat UIntPtr and nuint as the same
- internal static IEnumerable GetAllBaseTypes(this ITypeSymbol type)
+ public static IEnumerable GetAllBaseTypes(this ITypeSymbol type)
{
if (type.TypeKind == TypeKind.Interface)
{
@@ -53,7 +53,7 @@ internal static IEnumerable GetAllBaseTypes(this ITypeSymbol type)
}
}
- internal static bool IsEffectivelySealed(this ITypeSymbol type, bool includeInternals) =>
+ public static bool IsEffectivelySealed(this ITypeSymbol type, bool includeInternals) =>
type.IsSealed || !HasVisibleConstructor(type, includeInternals);
private static bool HasVisibleConstructor(ITypeSymbol type, bool includeInternals)
@@ -70,7 +70,7 @@ private static bool HasVisibleConstructor(ITypeSymbol type, bool includeInternal
return false;
}
- internal static IEnumerable GetAllBaseInterfaces(this ITypeSymbol type)
+ public static IEnumerable GetAllBaseInterfaces(this ITypeSymbol type)
{
foreach (ITypeSymbol @interface in type.Interfaces)
{
@@ -84,7 +84,7 @@ internal static IEnumerable GetAllBaseInterfaces(this ITypeSymbol t
yield return baseInterface;
}
- internal static bool IsVisibleOutsideOfAssembly(this ISymbol symbol, bool includeInternals, bool includeEffectivelyPrivateSymbols = false) =>
+ public static bool IsVisibleOutsideOfAssembly(this ISymbol symbol, bool includeInternals, bool includeEffectivelyPrivateSymbols = false) =>
symbol.DeclaredAccessibility switch
{
Accessibility.Public => true,
@@ -94,7 +94,7 @@ internal static bool IsVisibleOutsideOfAssembly(this ISymbol symbol, bool includ
_ => includeInternals && symbol.DeclaredAccessibility != Accessibility.Private,
};
- internal static bool IsEventAdderOrRemover(this IMethodSymbol method) =>
+ public static bool IsEventAdderOrRemover(this IMethodSymbol method) =>
method.MethodKind == MethodKind.EventAdd ||
method.MethodKind == MethodKind.EventRemove ||
method.Name.StartsWith("add_", StringComparison.Ordinal) ||
diff --git a/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.cs.xlf b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.cs.xlf
new file mode 100644
index 000000000000..066e36aafcdc
--- /dev/null
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.cs.xlf
@@ -0,0 +1,42 @@
+
+
+
+
+
+ Could not resolve reference '{0}' in any of the provided search directories.
+ Could not resolve reference '{0}' in any of the provided search directories.
+
+
+
+ Could not find matching assembly: '{0}' in any of the search directories.
+ Could not find matching assembly: '{0}' in any of the search directories.
+
+
+
+ Could not find the provided path '{0}' to load binaries from.
+ Could not find the provided path '{0}' to load binaries from.
+
+
+
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+
+
+
+ Should not be null and contain at least one element.
+ Should not be null and contain at least one element.
+
+
+
+ Should provide a valid assembly name.
+ Should provide a valid assembly name.
+
+
+
+ Stream position is greater than it's length, so there are no contents available to read.
+ Stream position is greater than it's length, so there are no contents available to read.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.de.xlf b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.de.xlf
new file mode 100644
index 000000000000..66b1faea8ea5
--- /dev/null
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.de.xlf
@@ -0,0 +1,42 @@
+
+
+
+
+
+ Could not resolve reference '{0}' in any of the provided search directories.
+ Could not resolve reference '{0}' in any of the provided search directories.
+
+
+
+ Could not find matching assembly: '{0}' in any of the search directories.
+ Could not find matching assembly: '{0}' in any of the search directories.
+
+
+
+ Could not find the provided path '{0}' to load binaries from.
+ Could not find the provided path '{0}' to load binaries from.
+
+
+
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+
+
+
+ Should not be null and contain at least one element.
+ Should not be null and contain at least one element.
+
+
+
+ Should provide a valid assembly name.
+ Should provide a valid assembly name.
+
+
+
+ Stream position is greater than it's length, so there are no contents available to read.
+ Stream position is greater than it's length, so there are no contents available to read.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.es.xlf b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.es.xlf
new file mode 100644
index 000000000000..4f3e0e8866b8
--- /dev/null
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.es.xlf
@@ -0,0 +1,42 @@
+
+
+
+
+
+ Could not resolve reference '{0}' in any of the provided search directories.
+ Could not resolve reference '{0}' in any of the provided search directories.
+
+
+
+ Could not find matching assembly: '{0}' in any of the search directories.
+ Could not find matching assembly: '{0}' in any of the search directories.
+
+
+
+ Could not find the provided path '{0}' to load binaries from.
+ Could not find the provided path '{0}' to load binaries from.
+
+
+
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+
+
+
+ Should not be null and contain at least one element.
+ Should not be null and contain at least one element.
+
+
+
+ Should provide a valid assembly name.
+ Should provide a valid assembly name.
+
+
+
+ Stream position is greater than it's length, so there are no contents available to read.
+ Stream position is greater than it's length, so there are no contents available to read.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.fr.xlf b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.fr.xlf
new file mode 100644
index 000000000000..c51f896a0428
--- /dev/null
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.fr.xlf
@@ -0,0 +1,42 @@
+
+
+
+
+
+ Could not resolve reference '{0}' in any of the provided search directories.
+ Could not resolve reference '{0}' in any of the provided search directories.
+
+
+
+ Could not find matching assembly: '{0}' in any of the search directories.
+ Could not find matching assembly: '{0}' in any of the search directories.
+
+
+
+ Could not find the provided path '{0}' to load binaries from.
+ Could not find the provided path '{0}' to load binaries from.
+
+
+
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+
+
+
+ Should not be null and contain at least one element.
+ Should not be null and contain at least one element.
+
+
+
+ Should provide a valid assembly name.
+ Should provide a valid assembly name.
+
+
+
+ Stream position is greater than it's length, so there are no contents available to read.
+ Stream position is greater than it's length, so there are no contents available to read.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.it.xlf b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.it.xlf
new file mode 100644
index 000000000000..083e8f001c7a
--- /dev/null
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.it.xlf
@@ -0,0 +1,42 @@
+
+
+
+
+
+ Could not resolve reference '{0}' in any of the provided search directories.
+ Could not resolve reference '{0}' in any of the provided search directories.
+
+
+
+ Could not find matching assembly: '{0}' in any of the search directories.
+ Could not find matching assembly: '{0}' in any of the search directories.
+
+
+
+ Could not find the provided path '{0}' to load binaries from.
+ Could not find the provided path '{0}' to load binaries from.
+
+
+
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+
+
+
+ Should not be null and contain at least one element.
+ Should not be null and contain at least one element.
+
+
+
+ Should provide a valid assembly name.
+ Should provide a valid assembly name.
+
+
+
+ Stream position is greater than it's length, so there are no contents available to read.
+ Stream position is greater than it's length, so there are no contents available to read.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.ja.xlf b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.ja.xlf
new file mode 100644
index 000000000000..7ab7b8222863
--- /dev/null
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.ja.xlf
@@ -0,0 +1,42 @@
+
+
+
+
+
+ Could not resolve reference '{0}' in any of the provided search directories.
+ Could not resolve reference '{0}' in any of the provided search directories.
+
+
+
+ Could not find matching assembly: '{0}' in any of the search directories.
+ Could not find matching assembly: '{0}' in any of the search directories.
+
+
+
+ Could not find the provided path '{0}' to load binaries from.
+ Could not find the provided path '{0}' to load binaries from.
+
+
+
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+
+
+
+ Should not be null and contain at least one element.
+ Should not be null and contain at least one element.
+
+
+
+ Should provide a valid assembly name.
+ Should provide a valid assembly name.
+
+
+
+ Stream position is greater than it's length, so there are no contents available to read.
+ Stream position is greater than it's length, so there are no contents available to read.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.ko.xlf b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.ko.xlf
new file mode 100644
index 000000000000..89c149f50660
--- /dev/null
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.ko.xlf
@@ -0,0 +1,42 @@
+
+
+
+
+
+ Could not resolve reference '{0}' in any of the provided search directories.
+ Could not resolve reference '{0}' in any of the provided search directories.
+
+
+
+ Could not find matching assembly: '{0}' in any of the search directories.
+ Could not find matching assembly: '{0}' in any of the search directories.
+
+
+
+ Could not find the provided path '{0}' to load binaries from.
+ Could not find the provided path '{0}' to load binaries from.
+
+
+
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+
+
+
+ Should not be null and contain at least one element.
+ Should not be null and contain at least one element.
+
+
+
+ Should provide a valid assembly name.
+ Should provide a valid assembly name.
+
+
+
+ Stream position is greater than it's length, so there are no contents available to read.
+ Stream position is greater than it's length, so there are no contents available to read.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.pl.xlf b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.pl.xlf
new file mode 100644
index 000000000000..0c74d3bdc6d3
--- /dev/null
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.pl.xlf
@@ -0,0 +1,42 @@
+
+
+
+
+
+ Could not resolve reference '{0}' in any of the provided search directories.
+ Could not resolve reference '{0}' in any of the provided search directories.
+
+
+
+ Could not find matching assembly: '{0}' in any of the search directories.
+ Could not find matching assembly: '{0}' in any of the search directories.
+
+
+
+ Could not find the provided path '{0}' to load binaries from.
+ Could not find the provided path '{0}' to load binaries from.
+
+
+
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+
+
+
+ Should not be null and contain at least one element.
+ Should not be null and contain at least one element.
+
+
+
+ Should provide a valid assembly name.
+ Should provide a valid assembly name.
+
+
+
+ Stream position is greater than it's length, so there are no contents available to read.
+ Stream position is greater than it's length, so there are no contents available to read.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.pt-BR.xlf b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.pt-BR.xlf
new file mode 100644
index 000000000000..2db1f7ac9540
--- /dev/null
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.pt-BR.xlf
@@ -0,0 +1,42 @@
+
+
+
+
+
+ Could not resolve reference '{0}' in any of the provided search directories.
+ Could not resolve reference '{0}' in any of the provided search directories.
+
+
+
+ Could not find matching assembly: '{0}' in any of the search directories.
+ Could not find matching assembly: '{0}' in any of the search directories.
+
+
+
+ Could not find the provided path '{0}' to load binaries from.
+ Could not find the provided path '{0}' to load binaries from.
+
+
+
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+
+
+
+ Should not be null and contain at least one element.
+ Should not be null and contain at least one element.
+
+
+
+ Should provide a valid assembly name.
+ Should provide a valid assembly name.
+
+
+
+ Stream position is greater than it's length, so there are no contents available to read.
+ Stream position is greater than it's length, so there are no contents available to read.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.ru.xlf b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.ru.xlf
new file mode 100644
index 000000000000..4986d3c5203f
--- /dev/null
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.ru.xlf
@@ -0,0 +1,42 @@
+
+
+
+
+
+ Could not resolve reference '{0}' in any of the provided search directories.
+ Could not resolve reference '{0}' in any of the provided search directories.
+
+
+
+ Could not find matching assembly: '{0}' in any of the search directories.
+ Could not find matching assembly: '{0}' in any of the search directories.
+
+
+
+ Could not find the provided path '{0}' to load binaries from.
+ Could not find the provided path '{0}' to load binaries from.
+
+
+
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+
+
+
+ Should not be null and contain at least one element.
+ Should not be null and contain at least one element.
+
+
+
+ Should provide a valid assembly name.
+ Should provide a valid assembly name.
+
+
+
+ Stream position is greater than it's length, so there are no contents available to read.
+ Stream position is greater than it's length, so there are no contents available to read.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.tr.xlf b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.tr.xlf
new file mode 100644
index 000000000000..2af128c189b9
--- /dev/null
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.tr.xlf
@@ -0,0 +1,42 @@
+
+
+
+
+
+ Could not resolve reference '{0}' in any of the provided search directories.
+ Could not resolve reference '{0}' in any of the provided search directories.
+
+
+
+ Could not find matching assembly: '{0}' in any of the search directories.
+ Could not find matching assembly: '{0}' in any of the search directories.
+
+
+
+ Could not find the provided path '{0}' to load binaries from.
+ Could not find the provided path '{0}' to load binaries from.
+
+
+
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+
+
+
+ Should not be null and contain at least one element.
+ Should not be null and contain at least one element.
+
+
+
+ Should provide a valid assembly name.
+ Should provide a valid assembly name.
+
+
+
+ Stream position is greater than it's length, so there are no contents available to read.
+ Stream position is greater than it's length, so there are no contents available to read.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.zh-Hans.xlf b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.zh-Hans.xlf
new file mode 100644
index 000000000000..7dc81b49e178
--- /dev/null
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.zh-Hans.xlf
@@ -0,0 +1,42 @@
+
+
+
+
+
+ Could not resolve reference '{0}' in any of the provided search directories.
+ Could not resolve reference '{0}' in any of the provided search directories.
+
+
+
+ Could not find matching assembly: '{0}' in any of the search directories.
+ Could not find matching assembly: '{0}' in any of the search directories.
+
+
+
+ Could not find the provided path '{0}' to load binaries from.
+ Could not find the provided path '{0}' to load binaries from.
+
+
+
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+
+
+
+ Should not be null and contain at least one element.
+ Should not be null and contain at least one element.
+
+
+
+ Should provide a valid assembly name.
+ Should provide a valid assembly name.
+
+
+
+ Stream position is greater than it's length, so there are no contents available to read.
+ Stream position is greater than it's length, so there are no contents available to read.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.zh-Hant.xlf b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.zh-Hant.xlf
new file mode 100644
index 000000000000..0c139b6bbe2c
--- /dev/null
+++ b/src/Microsoft.DotNet.ApiSymbolExtensions/xlf/Resources.zh-Hant.xlf
@@ -0,0 +1,42 @@
+
+
+
+
+
+ Could not resolve reference '{0}' in any of the provided search directories.
+ Could not resolve reference '{0}' in any of the provided search directories.
+
+
+
+ Could not find matching assembly: '{0}' in any of the search directories.
+ Could not find matching assembly: '{0}' in any of the search directories.
+
+
+
+ Could not find the provided path '{0}' to load binaries from.
+ Could not find the provided path '{0}' to load binaries from.
+
+
+
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+ Provided stream for assembly '{0}' doesn't have any metadata to read. from.
+
+
+
+ Should not be null and contain at least one element.
+ Should not be null and contain at least one element.
+
+
+
+ Should provide a valid assembly name.
+ Should provide a valid assembly name.
+
+
+
+ Stream position is greater than it's length, so there are no contents available to read.
+ Stream position is greater than it's length, so there are no contents available to read.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/CompatibleFrameworkInPackageValidatorIntegrationTests.cs b/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/CompatibleFrameworkInPackageValidatorIntegrationTests.cs
index 6cf91ead5754..d11f8995b4c6 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/CompatibleFrameworkInPackageValidatorIntegrationTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/CompatibleFrameworkInPackageValidatorIntegrationTests.cs
@@ -8,6 +8,7 @@
using Microsoft.DotNet.ApiCompatibility.Rules;
using Microsoft.DotNet.ApiCompatibility.Runner;
using Microsoft.DotNet.ApiCompatibility.Tests;
+using Microsoft.DotNet.ApiSymbolExtensions;
using Microsoft.DotNet.PackageValidation;
using Microsoft.DotNet.PackageValidation.Validators;
using Microsoft.NET.TestFramework;
diff --git a/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidatePackageTargetIntegrationTests.cs b/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidatePackageTargetIntegrationTests.cs
index 60c712b886d8..c8b4d9ba1aa7 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidatePackageTargetIntegrationTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidatePackageTargetIntegrationTests.cs
@@ -13,6 +13,7 @@
using Microsoft.DotNet.ApiCompatibility.Tests;
using Microsoft.DotNet.PackageValidation;
using Microsoft.DotNet.PackageValidation.Validators;
+using Microsoft.DotNet.ApiSymbolExtensions;
using Microsoft.NET.TestFramework;
using Microsoft.NET.TestFramework.Commands;
using Microsoft.NET.TestFramework.ProjectConstruction;
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/CustomSideNameTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/CustomSideNameTests.cs
index 269f4f080655..f3031eba04b8 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/CustomSideNameTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/CustomSideNameTests.cs
@@ -6,6 +6,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Rules;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Xunit;
namespace Microsoft.DotNet.ApiCompatibility.Tests
@@ -193,7 +194,7 @@ public class ThirdNested
}
"};
ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax), new MetadataInformation("a.dll", "ref/net6.0/a.dll"));
- IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes);
+ IReadOnlyList> right = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes);
ApiComparer differ = new(s_ruleFactory);
IEnumerable differences = differ.GetDifferences(left, right);
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mappers/AssemblyMapperTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mappers/AssemblyMapperTests.cs
index cab4d9af5cbf..7b70bb769c19 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mappers/AssemblyMapperTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mappers/AssemblyMapperTests.cs
@@ -8,6 +8,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Rules;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Moq;
using Xunit;
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mappers/AssemblySetMapperTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mappers/AssemblySetMapperTests.cs
index fffc056412a9..2dc7796003e0 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mappers/AssemblySetMapperTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mappers/AssemblySetMapperTests.cs
@@ -116,9 +116,9 @@ public class First { }
}
"
};
- IReadOnlyList> left = SymbolFactory.GetElementContainersFromSyntaxes(leftSyntaxes);
- IReadOnlyList> right1 = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes1);
- IReadOnlyList> right2 = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes2);
+ IReadOnlyList> left = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(leftSyntaxes);
+ IReadOnlyList> right1 = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes1);
+ IReadOnlyList> right2 = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes2);
AssemblySetMapper assemblySetMapper = new(Mock.Of(), new MapperSettings(), rightSetSize: 2);
assemblySetMapper.AddElement(left, ElementSide.Left);
assemblySetMapper.AddElement(right1, ElementSide.Right);
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mappers/NamespaceMapperTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mappers/NamespaceMapperTests.cs
index f3ef05c9d4f4..437cd34c9585 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mappers/NamespaceMapperTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mappers/NamespaceMapperTests.cs
@@ -8,6 +8,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Rules;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Moq;
using Xunit;
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mappers/TypeMapperTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mappers/TypeMapperTests.cs
index ffe4b43969ca..d558780f2fb2 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mappers/TypeMapperTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Mappers/TypeMapperTests.cs
@@ -7,6 +7,7 @@
using System.Collections.Generic;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Rules;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Moq;
using Xunit;
using System.Linq;
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Microsoft.DotNet.ApiCompatibility.Tests.csproj b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Microsoft.DotNet.ApiCompatibility.Tests.csproj
index 4e26c4869236..e3924d9b0be0 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Microsoft.DotNet.ApiCompatibility.Tests.csproj
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Microsoft.DotNet.ApiCompatibility.Tests.csproj
@@ -11,9 +11,12 @@
+
+
+
+
-
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AssemblyIdentityMustMatchTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AssemblyIdentityMustMatchTests.cs
index 8c485c18e7bb..8d7784ff4af7 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AssemblyIdentityMustMatchTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AssemblyIdentityMustMatchTests.cs
@@ -8,6 +8,8 @@
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Tests;
+using Microsoft.DotNet.ApiSymbolExtensions;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Xunit;
namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AttributesMustMatchTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AttributesMustMatchTests.cs
index 2792a391b650..0f1a2407466a 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AttributesMustMatchTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AttributesMustMatchTests.cs
@@ -6,6 +6,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Tests;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Xunit;
namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddAbstractMemberTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddAbstractMemberTests.cs
index a0893f635fb9..649c5a3283ba 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddAbstractMemberTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddAbstractMemberTests.cs
@@ -7,6 +7,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Tests;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Xunit;
namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests
@@ -145,7 +146,7 @@ public void SomeMethod() { }
"};
ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax),
new MetadataInformation(string.Empty, "ref"));
- IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes);
+ IReadOnlyList> right = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes);
ApiComparer differ = new(s_ruleFactory);
IEnumerable differences = differ.GetDifferences(left, right);
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddMemberToInterfaceTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddMemberToInterfaceTests.cs
index 54914840840c..2066fdf28f32 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddMemberToInterfaceTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddMemberToInterfaceTests.cs
@@ -6,6 +6,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Tests;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Xunit;
namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests
@@ -185,7 +186,7 @@ event System.EventHandler MyOtherEventWithDIM { add { } remove { } }
ApiComparer differ = new(s_ruleFactory);
ElementContainer left =
new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax), new MetadataInformation(string.Empty, "ref"));
- IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes);
+ IReadOnlyList> right = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes);
IEnumerable differences = differ.GetDifferences(left, right);
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddOrRemoveVirtualKeywordTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddOrRemoveVirtualKeywordTests.cs
index 9fe768c6270e..70463c0b50d9 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddOrRemoveVirtualKeywordTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddOrRemoveVirtualKeywordTests.cs
@@ -7,6 +7,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Tests;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Xunit;
namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotChangeVisibilityTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotChangeVisibilityTests.cs
index 3ee2023ee734..5148d60c8df4 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotChangeVisibilityTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotChangeVisibilityTests.cs
@@ -5,6 +5,7 @@
using System.Collections.Generic;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Tests;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Xunit;
namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotRemoveBaseTypeOrInterfaceTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotRemoveBaseTypeOrInterfaceTests.cs
index 02702554cd65..7fb80aeda1e7 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotRemoveBaseTypeOrInterfaceTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotRemoveBaseTypeOrInterfaceTests.cs
@@ -7,6 +7,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Tests;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Xunit;
namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests
@@ -268,7 +269,7 @@ internal interface ISecondInterface { }
};
ElementContainer leftContainer = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax),
new MetadataInformation("left", @"ref\a.dll"));
- IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes);
+ IReadOnlyList> right = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes);
ApiComparer differ = new(s_ruleFactory);
IEnumerable differences = differ.GetDifferences(leftContainer, right);
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotSealTypeTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotSealTypeTests.cs
index 09e273e5ea27..1afafd9d2ac6 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotSealTypeTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotSealTypeTests.cs
@@ -6,6 +6,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Tests;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Xunit;
namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests
@@ -135,7 +136,7 @@ private First() { }
"};
ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax),
new MetadataInformation("left", @"ref\a.dll"));
- IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes);
+ IReadOnlyList> right = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes);
// Register CannotSealType and MemberMustExist rules as this test validates both.
ApiComparer differ = new(s_ruleFactory.WithRule((settings, context) => new MembersMustExist(settings, context)));
@@ -190,7 +191,7 @@ internal First() { }
ElementContainer leftContainer = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax),
new MetadataInformation("left", @"ref\a.dll"));
- IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes);
+ IReadOnlyList> right = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes);
ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(includeInternalSymbols: true));
IEnumerable differences = differ.GetDifferences(leftContainer, right);
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/EnumsMustMatchTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/EnumsMustMatchTests.cs
index d72b2005f9f8..1056ff328bb5 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/EnumsMustMatchTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/EnumsMustMatchTests.cs
@@ -5,6 +5,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Tests;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Xunit;
namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.Strict.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.Strict.cs
index 37a32cfd47af..ba279c26f693 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.Strict.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.Strict.cs
@@ -7,6 +7,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Tests;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Xunit;
namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests
@@ -323,7 +324,7 @@ public class ThirdNested
"};
ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax),
new MetadataInformation(string.Empty, "ref"));
- IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes);
+ IReadOnlyList> right = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes);
ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true));
IEnumerable differences = differ.GetDifferences(left, right);
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.cs
index 4b1efc1e9b3a..533a953d33ac 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.cs
@@ -6,6 +6,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Tests;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Xunit;
namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests
@@ -385,7 +386,7 @@ public class ThirdNested
"};
ApiComparer differ = new(s_ruleFactory);
ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax), new MetadataInformation(string.Empty, "ref"));
- IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes);
+ IReadOnlyList> right = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes);
IEnumerable differences = differ.GetDifferences(left, right);
@@ -426,7 +427,7 @@ public class ThirdNested
ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax),
new MetadataInformation(string.Empty, "ref"));
string[] rightSyntaxes = new[] { leftSyntax, leftSyntax, leftSyntax, leftSyntax };
- IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes);
+ IReadOnlyList> right = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes);
ApiComparer differ = new(s_ruleFactory);
IEnumerable differences = differ.GetDifferences(left, right);
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/ParameterNamesCannotChangeTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/ParameterNamesCannotChangeTests.cs
index 5f33d2770010..851fc7b98253 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/ParameterNamesCannotChangeTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/ParameterNamesCannotChangeTests.cs
@@ -5,6 +5,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Tests;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Xunit;
namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.Strict.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.Strict.cs
index 4be232912aa7..d243f308b6bc 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.Strict.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.Strict.cs
@@ -7,6 +7,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Tests;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Xunit;
namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests
@@ -251,7 +252,7 @@ public class Third { }
ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax),
new MetadataInformation(string.Empty, "ref"));
- IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes);
+ IReadOnlyList> right = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes);
ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true));
IEnumerable differences = differ.GetDifferences(left, right);
@@ -316,7 +317,7 @@ public class SecondNested
"};
ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax),
new MetadataInformation(string.Empty, "ref"));
- IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes);
+ IReadOnlyList> right = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes);
ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true));
IEnumerable differences = differ.GetDifferences(left, right);
@@ -349,7 +350,7 @@ namespace CompatTests
new MetadataInformation(string.Empty, "ref"));
string[] rightSyntaxes = new[] { rightWithForward, "namespace CompatTests { internal class Foo { } }", rightWithForward };
IEnumerable references = new[] { forwardedTypeSyntax };
- IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes, references);
+ IReadOnlyList> right = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes, references);
ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true));
IEnumerable differences = differ.GetDifferences(left, right);
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.cs
index e7c8c4363534..6517b18037c2 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.cs
@@ -5,6 +5,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Tests;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
using Xunit;
namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests
@@ -332,7 +333,7 @@ public class First { }
"};
ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax),
new MetadataInformation(string.Empty, "ref"));
- IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes);
+ IReadOnlyList> right = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes);
ApiComparer differ = new(s_ruleFactory);
IEnumerable differences = differ.GetDifferences(left, right);
@@ -407,7 +408,7 @@ namespace CompatTests
"};
ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax),
new MetadataInformation(string.Empty, "ref"));
- IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes);
+ IReadOnlyList> right = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes);
ApiComparer differ = new(s_ruleFactory);
IEnumerable differences = differ.GetDifferences(left, right);
@@ -446,7 +447,7 @@ public class ThirdNested
ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax),
new MetadataInformation(string.Empty, "ref"));
string[] rightSyntaxes = new[] { leftSyntax, leftSyntax, leftSyntax, leftSyntax };
- IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes);
+ IReadOnlyList> right = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes);
ApiComparer differ = new(s_ruleFactory);
IEnumerable differences = differ.GetDifferences(left, right);
@@ -470,7 +471,7 @@ public class ForwardedTestType { }
ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(forwardedTypeSyntax),
new MetadataInformation(string.Empty, "ref"));
string[] rightSyntaxes = new[] { rightSyntax, rightSyntax, rightSyntax, rightSyntax, rightSyntax };
- IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes, references);
+ IReadOnlyList> right = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes, references);
ApiComparer differ = new(s_ruleFactory);
IEnumerable differences = differ.GetDifferences(left, right);
@@ -494,7 +495,7 @@ public class ForwardedTestType { }
new MetadataInformation(string.Empty, "ref"));
string[] rightSyntaxes = new[] { rightWithForward, "namespace CompatTests { internal class Foo { } }", rightWithForward };
IEnumerable references = new[] { forwardedTypeSyntax };
- IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes, references);
+ IReadOnlyList> right = SymbolFactoryExtensions.GetElementContainersFromSyntaxes(rightSyntaxes, references);
ApiComparer differ = new(s_ruleFactory);
IEnumerable differences = differ.GetDifferences(left, right);
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatRunnerTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatRunnerTests.cs
index e27dbb280375..9704b62bd7dd 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatRunnerTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatRunnerTests.cs
@@ -6,6 +6,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Microsoft.DotNet.ApiCompatibility.Logging;
+using Microsoft.DotNet.ApiSymbolExtensions;
using Moq;
using Xunit;
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactoryExtensions.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactoryExtensions.cs
new file mode 100644
index 000000000000..e8b6f5460272
--- /dev/null
+++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactoryExtensions.cs
@@ -0,0 +1,35 @@
+// Copyright (c) .NET Foundation and contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System.Collections.Generic;
+using System.Runtime.CompilerServices;
+using Microsoft.CodeAnalysis;
+using Microsoft.DotNet.ApiCompatibility.Abstractions;
+using Microsoft.DotNet.ApiSymbolExtensions.Tests;
+
+namespace Microsoft.DotNet.ApiCompatibility.Tests
+{
+ internal static class SymbolFactoryExtensions
+ {
+ internal static IReadOnlyList> GetElementContainersFromSyntaxes(IEnumerable syntaxes, IEnumerable referencesSyntax = null, bool enableNullable = false, byte[] publicKey = null, [CallerMemberName] string assemblyName = "")
+ {
+ int i = 0;
+ List> result = new();
+ foreach (string syntax in syntaxes)
+ {
+ string asmName = $"{assemblyName}-{i}";
+ MetadataInformation info = new(asmName, $"runtime-{i}");
+ IAssemblySymbol symbol = referencesSyntax != null ?
+ SymbolFactory.GetAssemblyFromSyntaxWithReferences(syntax, referencesSyntax, enableNullable, publicKey, asmName) :
+ SymbolFactory.GetAssemblyFromSyntax(syntax, enableNullable, publicKey, asmName);
+
+ ElementContainer container = new(symbol, info);
+ result.Add(container);
+
+ i++;
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/AssemblySymbolLoaderTests.cs b/src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/AssemblySymbolLoaderTests.cs
similarity index 94%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/AssemblySymbolLoaderTests.cs
rename to src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/AssemblySymbolLoaderTests.cs
index 09a804c8c45b..a27fd8a28b3a 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/AssemblySymbolLoaderTests.cs
+++ b/src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/AssemblySymbolLoaderTests.cs
@@ -17,7 +17,7 @@
using Xunit;
using Xunit.Abstractions;
-namespace Microsoft.DotNet.ApiCompatibility.Tests
+namespace Microsoft.DotNet.ApiSymbolExtensions.Tests
{
public class AssemblySymbolLoaderTests : SdkTest
{
@@ -135,7 +135,7 @@ public void LoadMatchingAssembliesWarns()
IEnumerable expected = new[]
{
- new AssemblyLoadWarning(DiagnosticIds.AssemblyNotFound, assembly.Identity.GetDisplayName(), $"Could not find matching assembly: '{assembly.Identity.GetDisplayName()}' in any of the search directories.")
+ new AssemblyLoadWarning(AssemblySymbolLoader.AssemblyNotFoundErrorCode, assembly.Identity.GetDisplayName(), $"Could not find matching assembly: '{assembly.Identity.GetDisplayName()}' in any of the search directories.")
};
Assert.Equal(expected, warnings);
@@ -186,7 +186,7 @@ public void LoadMatchingAssemblies_DifferentIdentity(bool validateIdentities)
IEnumerable expected = new[]
{
- new AssemblyLoadWarning(DiagnosticIds.AssemblyNotFound, fromAssembly.Identity.GetDisplayName(), $"Could not find matching assembly: '{fromAssembly.Identity.GetDisplayName()}' in any of the search directories.")
+ new AssemblyLoadWarning(AssemblySymbolLoader.AssemblyNotFoundErrorCode, fromAssembly.Identity.GetDisplayName(), $"Could not find matching assembly: '{fromAssembly.Identity.GetDisplayName()}' in any of the search directories.")
};
Assert.Equal(expected, warnings);
@@ -288,7 +288,7 @@ public void LoadAssemblyResolveReferences_WarnsWhenEnabled(bool resolveReference
IEnumerable expected = new List
{
- new AssemblyLoadWarning(DiagnosticIds.AssemblyReferenceNotFound, expectedReference, $"Could not resolve reference '{expectedReference}' in any of the provided search directories.")
+ new AssemblyLoadWarning(AssemblySymbolLoader.AssemblyReferenceNotFoundErrorCode, expectedReference, $"Could not resolve reference '{expectedReference}' in any of the provided search directories.")
};
Assert.Equal(expected, warnings);
diff --git a/src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj b/src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj
new file mode 100644
index 000000000000..c38aa0587281
--- /dev/null
+++ b/src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj
@@ -0,0 +1,15 @@
+
+
+
+ net472;$(ToolsetTargetFramework)
+ $(ToolsetTargetFramework)
+ Exe
+ true
+
+
+
+
+
+
+
+
diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs b/src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/SymbolFactory.cs
similarity index 71%
rename from src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs
rename to src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/SymbolFactory.cs
index 22df18f48024..7afd896fdb5f 100644
--- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs
+++ b/src/Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests/SymbolFactory.cs
@@ -9,14 +9,13 @@
using System.Runtime.CompilerServices;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
-using Microsoft.DotNet.ApiCompatibility.Abstractions;
using Xunit;
-namespace Microsoft.DotNet.ApiCompatibility.Tests
+namespace Microsoft.DotNet.ApiSymbolExtensions.Tests
{
internal static class SymbolFactory
{
- internal static string EmitAssemblyFromSyntax(string syntax, bool enableNullable = false, byte[] publicKey = null, [CallerMemberName] string assemblyName = "")
+ public static string EmitAssemblyFromSyntax(string syntax, bool enableNullable = false, byte[] publicKey = null, [CallerMemberName] string assemblyName = "")
{
CSharpCompilation compilation = CreateCSharpCompilationFromSyntax(syntax, assemblyName, enableNullable, publicKey);
@@ -30,7 +29,7 @@ internal static string EmitAssemblyFromSyntax(string syntax, bool enableNullable
return assemblyPath;
}
- internal static IAssemblySymbol GetAssemblyFromSyntax(string syntax, bool enableNullable = false, byte[] publicKey = null, [CallerMemberName] string assemblyName = "")
+ public static IAssemblySymbol GetAssemblyFromSyntax(string syntax, bool enableNullable = false, byte[] publicKey = null, [CallerMemberName] string assemblyName = "")
{
CSharpCompilation compilation = CreateCSharpCompilationFromSyntax(syntax, assemblyName, enableNullable, publicKey);
@@ -39,7 +38,7 @@ internal static IAssemblySymbol GetAssemblyFromSyntax(string syntax, bool enable
return compilation.Assembly;
}
- internal static IAssemblySymbol GetAssemblyFromSyntaxWithReferences(string syntax, IEnumerable referencesSyntax, bool enableNullable = false, byte[] publicKey = null, [CallerMemberName] string assemblyName = "")
+ public static IAssemblySymbol GetAssemblyFromSyntaxWithReferences(string syntax, IEnumerable referencesSyntax, bool enableNullable = false, byte[] publicKey = null, [CallerMemberName] string assemblyName = "")
{
CSharpCompilation compilation = CreateCSharpCompilationFromSyntax(syntax, assemblyName, enableNullable, publicKey);
CSharpCompilation compilationWithReferences = CreateCSharpCompilationFromSyntax(referencesSyntax, $"{assemblyName}_reference", enableNullable, publicKey);
@@ -51,27 +50,6 @@ internal static IAssemblySymbol GetAssemblyFromSyntaxWithReferences(string synta
return compilation.Assembly;
}
- internal static IReadOnlyList> GetElementContainersFromSyntaxes(IEnumerable syntaxes, IEnumerable referencesSyntax = null, bool enableNullable = false, byte[] publicKey = null, [CallerMemberName] string assemblyName = "")
- {
- int i = 0;
- List> result = new();
- foreach (string syntax in syntaxes)
- {
- string asmName = $"{assemblyName}-{i}";
- MetadataInformation info = new(asmName, $"runtime-{i}");
- IAssemblySymbol symbol = referencesSyntax != null ?
- GetAssemblyFromSyntaxWithReferences(syntax, referencesSyntax, enableNullable, publicKey, asmName) :
- GetAssemblyFromSyntax(syntax, enableNullable, publicKey, asmName);
-
- ElementContainer container = new(symbol, info);
- result.Add(container);
-
- i++;
- }
-
- return result;
- }
-
private static CSharpCompilation CreateCSharpCompilationFromSyntax(string syntax, string name, bool enableNullable, byte[] publicKey)
{
CSharpCompilation compilation = CreateCSharpCompilation(name, enableNullable, publicKey);