Skip to content

Commit bacf9cf

Browse files
Mitigate diagnostics (#625)
1 parent 17125a2 commit bacf9cf

File tree

6 files changed

+22
-3
lines changed

6 files changed

+22
-3
lines changed

net/DevExtreme.AspNet.Data.Tests.NH/RemoteGroupingStress.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ public DataItemMap() {
3030
//Map(i => i.DateO); //used by all fixtures, requires nh feature support (see skip)
3131
}
3232
}
33-
33+
#pragma warning disable xUnit1004
3434
[Fact(Skip = "Skip until https://github.com/nhibernate/nhibernate-core/issues/2912 is implemented?")]
35+
#pragma warning restore xUnit1004
3536
public async Task Scenario() {
3637
await SessionFactoryHelper.ExecAsync(session => {
3738
session.Save(new DataItem());

net/DevExtreme.AspNet.Data.Tests.Xpo/RemoteGroupingStress.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ public DateOnly DateO {
5555
}
5656
//#endif
5757
}
58-
58+
#pragma warning disable xUnit1004
5959
[Fact(Skip = "Skip until proper DevExpress.Xpo dll / nupkg with Date Time Only support?")]
60+
#pragma warning restore xUnit1004
6061
public async Task Scenario() {
6162
await UnitOfWorkHelper.ExecAsync(uow => {
6263
new DataItem(uow);

net/DevExtreme.AspNet.Data.Tests/ResponseModelTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
namespace DevExtreme.AspNet.Data.Tests {
77

88
public class ResponseModelTests {
9-
9+
#pragma warning disable xUnit1004
1010
[Fact(Skip = "Skip until consolidation or target bump to net7 and ShouldSerialize")]
11+
#pragma warning restore xUnit1004
1112
public void EmptyLoadResultSerialization() {
1213
//https://github.com/dotnet/runtime/issues/41630
1314
//https://github.com/dotnet/runtime/issues/36236

net/DevExtreme.AspNet.Data/Async/ReflectionAsyncAdapter.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ static class EF6Methods {
6464
public static readonly MethodInfo CountAsyncMethod;
6565
public static readonly MethodInfo ToListAsyncMethod;
6666
static EF6Methods() {
67+
#pragma warning disable DX0004
6768
var extensionsType = Type.GetType("System.Data.Entity.QueryableExtensions, EntityFramework");
69+
#pragma warning restore DX0004
6870
CountAsyncMethod = FindCountAsyncMethod(extensionsType);
6971
ToListAsyncMethod = FindToListAsyncMethod(extensionsType);
7072
}
@@ -74,7 +76,9 @@ static class EFCoreMethods {
7476
public static readonly MethodInfo CountAsyncMethod;
7577
public static readonly MethodInfo ToListAsyncMethod;
7678
static EFCoreMethods() {
79+
#pragma warning disable DX0004
7780
var extensionsType = Type.GetType("Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions, Microsoft.EntityFrameworkCore");
81+
#pragma warning restore DX0004
7882
CountAsyncMethod = FindCountAsyncMethod(extensionsType);
7983
ToListAsyncMethod = FindToListAsyncMethod(extensionsType);
8084
}
@@ -84,7 +88,9 @@ static class NHMethods {
8488
public static readonly MethodInfo CountAsyncMethod;
8589
public static readonly MethodInfo ToListAsyncMethod;
8690
static NHMethods() {
91+
#pragma warning disable DX0004
8792
var extensionsType = Type.GetType("NHibernate.Linq.LinqExtensionMethods, NHibernate");
93+
#pragma warning restore DX0004
8894
CountAsyncMethod = FindCountAsyncMethod(extensionsType);
8995
ToListAsyncMethod = FindToListAsyncMethod(extensionsType);
9096
}
@@ -95,7 +101,9 @@ static class XpoMethods {
95101
public static readonly MethodInfo ToArrayAsyncMethod;
96102
static XpoMethods() {
97103
var asm = Array.Find(AppDomain.CurrentDomain.GetAssemblies(), a => a.FullName.StartsWith("DevExpress.Xpo.v"));
104+
#pragma warning disable DX0004
98105
var extensionsType = asm.GetType("DevExpress.Xpo.XPQueryExtensions");
106+
#pragma warning restore DX0004
99107
CountAsyncMethod = FindCountAsyncMethod(extensionsType);
100108
ToArrayAsyncMethod = FindToArrayAsyncMethod(extensionsType);
101109
}

net/DevExtreme.AspNet.Data/QueryProviderInfo.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,16 @@ public QueryProviderInfo(IQueryProvider provider) {
3838
switch(providerAssembly.GetName().Name) {
3939
case "LinqKit.Microsoft.EntityFrameworkCore":
4040
IsEFCore = true;
41+
#pragma warning disable DX0010
4142
providerAssembly = Assembly.Load("Microsoft.EntityFrameworkCore");
43+
#pragma warning restore DX0010
4244
break;
4345

4446
case "LinqKit.EntityFramework":
4547
IsEFClassic = true;
48+
#pragma warning disable DX0010
4649
providerAssembly = Assembly.Load("EntityFramework");
50+
#pragma warning restore DX0010
4751
break;
4852
}
4953
}

net/DevExtreme.AspNet.Data/Types/DynamicClassBridge.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ static readonly MethodInfo
1616

1717
static DynamicClassBridge() {
1818
try {
19+
#pragma warning disable DX0010
1920
var assembly = Assembly.Load("System.Linq.Dynamic.Core");
21+
#pragma warning restore DX0010
22+
#pragma warning disable DX0004
2023
FACTORY_TYPE = assembly.GetType("System.Linq.Dynamic.Core.DynamicClassFactory");
2124
CLASS_TYPE = assembly.GetType("System.Linq.Dynamic.Core.DynamicClass");
2225
PROP_TYPE = assembly.GetType("System.Linq.Dynamic.Core.DynamicProperty");
26+
#pragma warning restore DX0004
2327
CREATE_TYPE_METHOD = FACTORY_TYPE.GetMethod("CreateType");
2428
INDEXER_METHOD = CLASS_TYPE.GetMethod("get_Item");
2529
} catch(FileNotFoundException x) {

0 commit comments

Comments
 (0)