11using System ;
2- using System . Collections . Generic ;
3- using System . Linq ;
4- using System . Text ;
52using NHibernate . SqlTypes ;
63
74namespace NHibernate . Test
@@ -15,56 +12,52 @@ public class TestDialect
1512 {
1613 public static TestDialect GetTestDialect ( Dialect . Dialect dialect )
1714 {
18- string testDialectTypeName = "NHibernate.Test.TestDialects." + dialect . GetType ( ) . Name . Replace ( "Dialect" , "TestDialect" ) ;
19- System . Type testDialectType = System . Type . GetType ( testDialectTypeName ) ;
15+ var testDialectTypeName = "NHibernate.Test.TestDialects." + dialect . GetType ( ) . Name . Replace ( "Dialect" , "TestDialect" ) ;
16+ var testDialectType = System . Type . GetType ( testDialectTypeName ) ;
2017 if ( testDialectType != null )
21- return ( TestDialect ) Activator . CreateInstance ( testDialectType , dialect ) ;
18+ return ( TestDialect ) Activator . CreateInstance ( testDialectType , dialect ) ;
2219 return new TestDialect ( dialect ) ;
2320 }
2421
25- private Dialect . Dialect dialect ;
22+ readonly Dialect . Dialect _dialect ;
2623
27- public TestDialect ( Dialect . Dialect dialect )
28- {
29- this . dialect = dialect ;
30- }
24+ public TestDialect ( Dialect . Dialect dialect )
25+ {
26+ _dialect = dialect ;
27+ }
3128
32- public virtual bool SupportsOperatorAll { get { return true ; } }
33- public virtual bool SupportsOperatorSome { get { return true ; } }
34- public virtual bool SupportsLocate { get { return true ; } }
29+ public virtual bool SupportsOperatorAll => true ;
30+ public virtual bool SupportsOperatorSome => true ;
31+ public virtual bool SupportsLocate => true ;
3532
36- public virtual bool SupportsDistributedTransactions { get { return true ; } }
33+ public virtual bool SupportsDistributedTransactions => true ;
3734
3835 /// <summary>
3936 /// Whether two transactions can be run at the same time. For example, with SQLite
4037 /// the database is locked when one transaction is run, so running a second transaction
4138 /// will cause a "database is locked" error message.
4239 /// </summary>
43- public virtual bool SupportsConcurrentTransactions { get { return true ; } }
44-
45- public virtual bool SupportsFullJoin { get { return true ; } }
40+ public virtual bool SupportsConcurrentTransactions => true ;
4641
47- public virtual bool HasBrokenDecimalType { get { return false ; } }
42+ public virtual bool HasBrokenDecimalType => false ;
4843
49- public virtual bool SupportsNullCharactersInUtfStrings { get { return true ; } }
44+ public virtual bool SupportsNullCharactersInUtfStrings => true ;
5045
51- public virtual bool SupportsSelectForUpdateOnOuterJoin { get { return true ; } }
46+ public virtual bool SupportsSelectForUpdateOnOuterJoin => true ;
5247
53- public virtual bool SupportsHavingWithoutGroupBy { get { return true ; } }
48+ public virtual bool SupportsHavingWithoutGroupBy => true ;
5449
55- public virtual bool IgnoresTrailingWhitespace { get { return false ; } }
56-
57- public bool SupportsSqlType ( SqlType sqlType )
58- {
59- try
60- {
61- dialect . GetTypeName ( sqlType ) ;
62- return true ;
63- }
64- catch
65- {
66- return false ;
67- }
68- }
50+ public bool SupportsSqlType ( SqlType sqlType )
51+ {
52+ try
53+ {
54+ _dialect . GetTypeName ( sqlType ) ;
55+ return true ;
56+ }
57+ catch
58+ {
59+ return false ;
60+ }
61+ }
6962 }
7063}
0 commit comments