77using System ;
88using System . Collections . Concurrent ;
99using System . Collections . Generic ;
10- using System . Diagnostics ;
1110using System . Threading ;
1211using System . Threading . Tasks ;
1312using JetBrains . Annotations ;
2221using Xtensive . Orm . Logging ;
2322using Xtensive . Orm . Model ;
2423using Xtensive . Orm . Providers ;
25- using Xtensive . Orm . Rse . Providers ;
2624using Xtensive . Orm . Upgrade ;
27- using Xtensive . Orm . Upgrade . Model ;
2825using Xtensive . Sql ;
2926using Xtensive . Sql . Info ;
3027
@@ -45,7 +42,7 @@ public sealed class Domain : IDisposable, IHasExtensions
4542 private bool isDisposed ;
4643 private Session singleConnectionOwner ;
4744
48- private bool IsDebugEventLoggingEnabled { get ; set ; }
45+ private readonly bool isDebugEventLoggingEnabled ;
4946
5047 /// <summary>
5148 /// Occurs when new <see cref="Session"/> is open and activated.
@@ -242,7 +239,7 @@ internal Session OpenSession(SessionConfiguration configuration, bool activate)
242239 ArgumentValidator . EnsureArgumentNotNull ( configuration , "configuration" ) ;
243240 configuration . Lock ( true ) ;
244241
245- if ( IsDebugEventLoggingEnabled ) {
242+ if ( isDebugEventLoggingEnabled ) {
246243 OrmLog . Debug ( Strings . LogOpeningSessionX , configuration ) ;
247244 }
248245
@@ -383,7 +380,7 @@ internal async Task<Session> OpenSessionInternalAsync(SessionConfiguration confi
383380 ArgumentValidator . EnsureArgumentNotNull ( configuration , "configuration" ) ;
384381 configuration . Lock ( true ) ;
385382
386- if ( IsDebugEventLoggingEnabled ) {
383+ if ( isDebugEventLoggingEnabled ) {
387384 OrmLog . Debug ( Strings . LogOpeningSessionX , configuration ) ;
388385 }
389386
@@ -456,7 +453,7 @@ internal Domain(DomainConfiguration configuration, object upgradeContextCookie,
456453 UpgradeContextCookie = upgradeContextCookie ;
457454 SingleConnection = singleConnection ;
458455 StorageNodeManager = new StorageNodeManager ( Handlers ) ;
459- IsDebugEventLoggingEnabled = OrmLog . IsLogged ( LogLevel . Debug ) ; // Just to cache this value
456+ isDebugEventLoggingEnabled = OrmLog . IsLogged ( LogLevel . Debug ) ; // Just to cache this value
460457 }
461458
462459 /// <inheritdoc/>
@@ -467,7 +464,7 @@ public void Dispose()
467464 return ;
468465 isDisposed = true ;
469466
470- if ( IsDebugEventLoggingEnabled ) {
467+ if ( isDebugEventLoggingEnabled ) {
471468 OrmLog . Debug ( Strings . LogDomainIsDisposing ) ;
472469 }
473470
0 commit comments