private static IEnumerable <MetadataReference> GetReferences(string entityFrameworkCoreVersion, string oracleVersion) => Enumerable.Empty <MetadataReference>() .Concat(MetadataReferenceFacade.SystemData) .Concat(MetadataReferenceFacade.SystemComponentModelPrimitives) .Concat(NuGetMetadataReference.MicrosoftEntityFrameworkCore(entityFrameworkCoreVersion)) .Concat(NuGetMetadataReference.MicrosoftEntityFrameworkCoreSqliteCore(entityFrameworkCoreVersion)) .Concat(NuGetMetadataReference.MicrosoftEntityFrameworkCoreSqlServer(entityFrameworkCoreVersion)) .Concat(NuGetMetadataReference.OracleEntityFrameworkCore(oracleVersion)) .Concat(NuGetMetadataReference.MySqlDataEntityFrameworkCore()) .Concat(NuGetMetadataReference.NpgsqlEntityFrameworkCorePostgreSQL(entityFrameworkCoreVersion));
public void SqlKeywordsDelimitedBySpace_DotnetCore(string sqlNamespace) { var references = MetadataReferenceFacade.SystemData .Concat(NuGetMetadataReference.MicrosoftEntityFrameworkCore("2.2.0")) .Concat(NuGetMetadataReference.ServiceStackOrmLite()) .Concat(NuGetMetadataReference.SystemDataSqlClient()) .Concat(NuGetMetadataReference.SystemDataOracleClient()); Verifier.VerifyCSharpAnalyzer($@" using {sqlNamespace}; namespace TestNamespace {{ public class Test {{ private string field = ""SELECT * FROM table"" + ""WHERE col ="" + // Noncompliant ""val""; }} }} ", new CS.SqlKeywordsDelimitedBySpace(), references.ToArray()); }
internal static IEnumerable <MetadataReference> GetReferencesNetCore(string entityFrameworkVersion) => Enumerable.Empty <MetadataReference>() .Concat(NuGetMetadataReference.MicrosoftEntityFrameworkCore(entityFrameworkVersion)) .Concat(NuGetMetadataReference.MicrosoftEntityFrameworkCoreRelational(entityFrameworkVersion));