@@ -51,7 +51,7 @@ public void DifferentConnectionStringForDifferentTenants()
51
51
if ( ! IsSqlServerDialect )
52
52
Assert . Ignore ( "MSSqlServer specific test" ) ;
53
53
54
- using ( var session1 = OpenTenantSession ( "tenant1" ) )
54
+ using ( var session1 = OpenTenantSession ( "tenant1" ) )
55
55
using ( var session2 = OpenTenantSession ( "tenant2" ) )
56
56
{
57
57
Assert . That ( session1 . Connection . ConnectionString , Is . Not . EqualTo ( session2 . Connection . ConnectionString ) ) ;
@@ -84,7 +84,7 @@ public void StatelessSessionDifferentConnectionStringForDifferentTenants()
84
84
if ( ! IsSqlServerDialect )
85
85
Assert . Ignore ( "MSSqlServer specific test" ) ;
86
86
87
- using ( var session1 = OpenTenantStatelessSession ( "tenant1" ) )
87
+ using ( var session1 = OpenTenantStatelessSession ( "tenant1" ) )
88
88
using ( var session2 = OpenTenantStatelessSession ( "tenant2" ) )
89
89
{
90
90
Assert . That ( session1 . Connection . ConnectionString , Is . Not . EqualTo ( session2 . Connection . ConnectionString ) ) ;
@@ -216,7 +216,7 @@ public void QueryCacheSeparationPerTenant()
216
216
[ Test ]
217
217
public void TenantSessionIsSerializableAndCanBeReconnected ( )
218
218
{
219
- ISession deserializedSession = null ;
219
+ ISession deserializedSession = null ;
220
220
using ( var sesTen1 = OpenTenantSession ( "tenant1" ) )
221
221
{
222
222
var entity = sesTen1 . Query < Entity > ( ) . WithOptions ( x => x . SetCacheable ( true ) ) . Where ( e => e . Id == _id ) . SingleOrDefault ( ) ;
@@ -244,14 +244,14 @@ public void TenantSessionIsSerializableAndCanBeReconnected()
244
244
Assert . That ( Sfi . Statistics . SecondLevelCacheHitCount , Is . EqualTo ( 1 ) ) ;
245
245
}
246
246
247
- private static string GetTenantId ( ISession deserializedSession )
247
+ private static string GetTenantId ( ISession session )
248
248
{
249
- return deserializedSession . GetSessionImplementation ( ) . GetTenantIdentifier ( ) ;
249
+ return session . GetSessionImplementation ( ) . GetTenantIdentifier ( ) ;
250
250
}
251
-
252
- private static string GetTenantId ( IStatelessSession deserializedSession )
251
+
252
+ private static string GetTenantId ( IStatelessSession session )
253
253
{
254
- return deserializedSession . GetSessionImplementation ( ) . GetTenantIdentifier ( ) ;
254
+ return session . GetSessionImplementation ( ) . GetTenantIdentifier ( ) ;
255
255
}
256
256
257
257
private T SpoofSerialization < T > ( T session )
@@ -262,7 +262,7 @@ private T SpoofSerialization<T>(T session)
262
262
SurrogateSelector = new SerializationHelper . SurrogateSelector ( )
263
263
#endif
264
264
} ;
265
- MemoryStream stream = new MemoryStream ( ) ;
265
+ var stream = new MemoryStream ( ) ;
266
266
formatter . Serialize ( stream , session ) ;
267
267
268
268
stream . Position = 0 ;
@@ -274,7 +274,7 @@ private ISession OpenTenantSession(string tenantId)
274
274
{
275
275
return Sfi . WithOptions ( ) . TenantConfiguration ( GetTenantConfig ( tenantId ) ) . OpenSession ( ) ;
276
276
}
277
-
277
+
278
278
private IStatelessSession OpenTenantStatelessSession ( string tenantId )
279
279
{
280
280
return Sfi . WithStatelessOptions ( ) . TenantConfiguration ( GetTenantConfig ( tenantId ) ) . OpenStatelessSession ( ) ;
@@ -316,8 +316,8 @@ protected override ISession OpenSession()
316
316
317
317
protected override void OnTearDown ( )
318
318
{
319
- using ( ISession session = OpenSession ( ) )
320
- using ( ITransaction transaction = session . BeginTransaction ( ) )
319
+ using ( var session = OpenSession ( ) )
320
+ using ( var transaction = session . BeginTransaction ( ) )
321
321
{
322
322
session . Delete ( "from System.Object" ) ;
323
323
0 commit comments