Skip to content

Commit bd70d32

Browse files
committed
Fix further code smells
1 parent 3ce5110 commit bd70d32

4 files changed

Lines changed: 16 additions & 2 deletions

File tree

CSF.ORM.NHibernate.Common/EagerFetchingProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public IQueryableWithEagerFetching<TQueried, TGrandchild> FetchGrandchildren<TQu
132132
static IQueryable<T> GetUnderlyingQueryIfAvailable<T>(IQueryable<T> query)
133133
=> (query is IProvidesQueryable<T> queryProvider) ? queryProvider.GetQueryable() : query;
134134

135-
INhFetchRequest<TQueried, TFetched> GetNhFetchRequest<TQueried, TFetched>(IQueryable<TQueried> query)
135+
static INhFetchRequest<TQueried, TFetched> GetNhFetchRequest<TQueried, TFetched>(IQueryable<TQueried> query)
136136
=> GetUnderlyingQueryIfAvailable(query) as INhFetchRequest<TQueried, TFetched>;
137137

138138
}

CSF.ORM.NHibernate4/LazyResultProvider.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@
3030
using NHibernate.Linq;
3131
using NhQueryProvider = NHibernate.Linq.DefaultQueryProvider;
3232

33+
/* Note that SonarQube will mark this file up as being a duplicate of the NHibernate 5 version.
34+
* They cannot be consolidated into the common project though, because the method signatures of
35+
* the NH 4 & 5 versions of methods on the LinqExtensionMethods class are different.
36+
*
37+
* Trying to consolidate these two versions of the class leads to MissingMethodException errors.
38+
*/
39+
3340
namespace CSF.ORM.NHibernate
3441
{
3542
/// <summary>

CSF.ORM.NHibernate5/LazyResultProvider.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@
3030
using NHibernate.Linq;
3131
using NhQueryProvider = NHibernate.Linq.DefaultQueryProvider;
3232

33+
/* Note that SonarQube will mark this file up as being a duplicate of the NHibernate 4 version.
34+
* They cannot be consolidated into the common project though, because the method signatures of
35+
* the NH 4 & 5 versions of methods on the LinqExtensionMethods class are different.
36+
*
37+
* Trying to consolidate these two versions of the class leads to MissingMethodException errors.
38+
*/
39+
3340
namespace CSF.ORM.NHibernate
3441
{
3542
/// <summary>

PersistenceTester/CSF.PersistenceTester.NUnit/Constraints/NotEqualResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public override void WriteMessageTo(MessageWriter writer)
1818
WriteFailingRule(writer, failure);
1919
}
2020

21-
void WriteFailingRule(MessageWriter writer, EqualityRuleResult ruleResult)
21+
static void WriteFailingRule(MessageWriter writer, EqualityRuleResult ruleResult)
2222
{
2323
if (ruleResult.Exception != null)
2424
writer.WriteLine($"{RuleName(ruleResult)} Threw an unexpected exception whilst performing the comparison.{Environment.NewLine}{ruleResult.Exception}");

0 commit comments

Comments
 (0)