public void SqlKeywordsDelimitedBySpace_DotnetFramework(string sqlNamespace) { var references = MetadataReferenceFacade.GetSystemData() .Concat(NuGetMetadataReference.Dapper()) .Concat(NuGetMetadataReference.EntityFramework()) .Concat(NuGetMetadataReference.MicrosoftDataSqliteCore()) .Concat(NuGetMetadataReference.MicrosoftSqlServerCompact()) .Concat(NuGetMetadataReference.NHibernate()) .Concat(NuGetMetadataReference.PetaPocoCompiled()) .Concat(NuGetMetadataReference.SystemDataOdbc()) .Concat(NuGetMetadataReference.SystemDataSqlClient()) .Concat(NuGetMetadataReference.SystemDataSQLiteCore()); Verifier.VerifyCSharpAnalyzer($@" using {sqlNamespace}; namespace TestNamespace {{ public class Test {{ private string field = ""SELECT * FROM table"" + ""WHERE col ="" + // Noncompliant ""val""; }} }} ", new SqlKeywordsDelimitedBySpace(), additionalReferences: references.ToArray()); }
internal static IEnumerable <MetadataReference> GetReferencesNet46(string sqlServerCeVersion) => Enumerable.Empty <MetadataReference>() .Concat(FrameworkMetadataReference.SystemData) .Concat(FrameworkMetadataReference.SystemDataOracleClient) .Concat(NuGetMetadataReference.SystemDataSqlServerCe(sqlServerCeVersion) .Concat(NuGetMetadataReference.MySqlData("8.0.22")) .Concat(NuGetMetadataReference.MicrosoftDataSqliteCore()) .Concat(NuGetMetadataReference.SystemDataSQLiteCore()));