@@ -176,7 +176,7 @@ protected virtual void GetObjectData(SerializationInfo info, StreamingContext co
176
176
public void VerifyProxyForClassWithInternalInterface ( )
177
177
{
178
178
var factory = new StaticProxyFactory ( ) ;
179
- factory . PostInstantiate ( typeof ( InternalInterfaceTestClass ) . FullName , typeof ( InternalInterfaceTestClass ) , new HashSet < System . Type > { typeof ( INHibernateProxy ) } , null , null , null ) ;
179
+ factory . PostInstantiate ( typeof ( InternalInterfaceTestClass ) . FullName , typeof ( InternalInterfaceTestClass ) , new HashSet < System . Type > { typeof ( INHibernateProxy ) } , null , null , null , true ) ;
180
180
181
181
#if NETFX
182
182
VerifyGeneratedAssembly (
@@ -202,7 +202,7 @@ public void VerifyProxyForClassWithAdditionalInterface()
202
202
// having an additional interface in the interface list, instead of just having INHibernateProxy.
203
203
// (Quite a loose semantic...)
204
204
new HashSet < System . Type > { typeof ( INHibernateProxy ) , typeof ( IPublic ) } ,
205
- null , null , null ) ;
205
+ null , null , null , false ) ;
206
206
207
207
#if NETFX
208
208
VerifyGeneratedAssembly (
@@ -226,7 +226,7 @@ public void VerifyProxyForClassWithInterface()
226
226
typeof ( PublicInterfaceTestClass ) . FullName ,
227
227
typeof ( PublicInterfaceTestClass ) ,
228
228
new HashSet < System . Type > { typeof ( INHibernateProxy ) } ,
229
- null , null , null ) ;
229
+ null , null , null , true ) ;
230
230
231
231
#if NETFX
232
232
VerifyGeneratedAssembly (
@@ -266,7 +266,7 @@ public void VerifyProxyForClassWithExplicitInterface()
266
266
typeof ( PublicExplicitInterfaceTestClass ) . FullName ,
267
267
typeof ( PublicExplicitInterfaceTestClass ) ,
268
268
new HashSet < System . Type > { typeof ( INHibernateProxy ) } ,
269
- null , null , null ) ;
269
+ null , null , null , true ) ;
270
270
#if NETFX
271
271
VerifyGeneratedAssembly (
272
272
( ) =>
@@ -307,7 +307,8 @@ public void VerifyProxyForRefOutClass()
307
307
new HashSet < System . Type > { typeof ( INHibernateProxy ) } ,
308
308
null ,
309
309
null ,
310
- null ) ;
310
+ null ,
311
+ true ) ;
311
312
312
313
#if NETFX
313
314
VerifyGeneratedAssembly (
@@ -350,7 +351,7 @@ public void VerifyProxyForAbstractClass()
350
351
typeof ( AbstractTestClass ) . FullName ,
351
352
typeof ( AbstractTestClass ) ,
352
353
new HashSet < System . Type > { typeof ( INHibernateProxy ) } ,
353
- null , null , null ) ;
354
+ null , null , null , true ) ;
354
355
355
356
#if NETFX
356
357
VerifyGeneratedAssembly (
@@ -370,7 +371,7 @@ public void VerifyProxyForAbstractClass()
370
371
public void InitializedProxyStaysInitializedAfterDeserialization ( )
371
372
{
372
373
var factory = new StaticProxyFactory ( ) ;
373
- factory . PostInstantiate ( typeof ( SimpleTestClass ) . FullName , typeof ( SimpleTestClass ) , new HashSet < System . Type > { typeof ( INHibernateProxy ) } , null , null , null ) ;
374
+ factory . PostInstantiate ( typeof ( SimpleTestClass ) . FullName , typeof ( SimpleTestClass ) , new HashSet < System . Type > { typeof ( INHibernateProxy ) } , null , null , null , true ) ;
374
375
var proxy = factory . GetProxy ( 2 , null ) ;
375
376
Assert . That ( proxy , Is . Not . Null , "proxy" ) ;
376
377
Assert . That ( NHibernateUtil . IsInitialized ( proxy ) , Is . False , "proxy already initialized after creation" ) ;
@@ -399,7 +400,7 @@ public void InitializedProxyStaysInitializedAfterDeserialization()
399
400
public void NonInitializedProxyStaysNonInitializedAfterSerialization ( )
400
401
{
401
402
var factory = new StaticProxyFactory ( ) ;
402
- factory . PostInstantiate ( typeof ( SimpleTestClass ) . FullName , typeof ( SimpleTestClass ) , new HashSet < System . Type > { typeof ( INHibernateProxy ) } , null , null , null ) ;
403
+ factory . PostInstantiate ( typeof ( SimpleTestClass ) . FullName , typeof ( SimpleTestClass ) , new HashSet < System . Type > { typeof ( INHibernateProxy ) } , null , null , null , true ) ;
403
404
var proxy = factory . GetProxy ( 2 , null ) ;
404
405
Assert . That ( proxy , Is . Not . Null , "proxy" ) ;
405
406
Assert . That ( NHibernateUtil . IsInitialized ( proxy ) , Is . False , "proxy already initialized after creation" ) ;
@@ -422,7 +423,7 @@ public void NonInitializedProxyStaysNonInitializedAfterSerialization()
422
423
public void CanSerializeFieldInterceptorProxy ( )
423
424
{
424
425
var factory = new StaticProxyFactory ( ) ;
425
- factory . PostInstantiate ( typeof ( PublicInterfaceTestClass ) . FullName , typeof ( PublicInterfaceTestClass ) , new HashSet < System . Type > { typeof ( INHibernateProxy ) } , null , null , null ) ;
426
+ factory . PostInstantiate ( typeof ( PublicInterfaceTestClass ) . FullName , typeof ( PublicInterfaceTestClass ) , new HashSet < System . Type > { typeof ( INHibernateProxy ) } , null , null , null , true ) ;
426
427
var proxy = ( PublicInterfaceTestClass ) factory . GetFieldInterceptionProxy ( ) ;
427
428
proxy . Id = 1 ;
428
429
@@ -440,7 +441,7 @@ public void CanSerializeFieldInterceptorProxy()
440
441
public void CanSerializeFieldInterceptorProxyWithISerializableEntity ( )
441
442
{
442
443
var factory = new StaticProxyFactory ( ) ;
443
- factory . PostInstantiate ( typeof ( CustomSerializationClass ) . FullName , typeof ( CustomSerializationClass ) , new HashSet < System . Type > { typeof ( INHibernateProxy ) } , null , null , null ) ;
444
+ factory . PostInstantiate ( typeof ( CustomSerializationClass ) . FullName , typeof ( CustomSerializationClass ) , new HashSet < System . Type > { typeof ( INHibernateProxy ) } , null , null , null , true ) ;
444
445
var proxy = ( CustomSerializationClass ) factory . GetFieldInterceptionProxy ( ) ;
445
446
proxy . Id = 2 ;
446
447
@@ -458,7 +459,7 @@ public void CanSerializeFieldInterceptorProxyWithISerializableEntity()
458
459
public void CanSerializeFieldInterceptorProxyWithExplicitISerializableEntity ( )
459
460
{
460
461
var factory = new StaticProxyFactory ( ) ;
461
- factory . PostInstantiate ( typeof ( CustomExplicitSerializationClass ) . FullName , typeof ( CustomExplicitSerializationClass ) , new HashSet < System . Type > { typeof ( INHibernateProxy ) } , null , null , null ) ;
462
+ factory . PostInstantiate ( typeof ( CustomExplicitSerializationClass ) . FullName , typeof ( CustomExplicitSerializationClass ) , new HashSet < System . Type > { typeof ( INHibernateProxy ) } , null , null , null , true ) ;
462
463
var proxy = ( CustomExplicitSerializationClass ) factory . GetFieldInterceptionProxy ( ) ;
463
464
proxy . Id = 2 ;
464
465
@@ -476,7 +477,7 @@ public void CanSerializeFieldInterceptorProxyWithExplicitISerializableEntity()
476
477
public void VerifyFieldInterceptorProxy ( )
477
478
{
478
479
var factory = new StaticProxyFactory ( ) ;
479
- factory . PostInstantiate ( typeof ( InternalInterfaceTestClass ) . FullName , typeof ( InternalInterfaceTestClass ) , new HashSet < System . Type > { typeof ( INHibernateProxy ) } , null , null , null ) ;
480
+ factory . PostInstantiate ( typeof ( InternalInterfaceTestClass ) . FullName , typeof ( InternalInterfaceTestClass ) , new HashSet < System . Type > { typeof ( INHibernateProxy ) } , null , null , null , true ) ;
480
481
#if NETFX
481
482
VerifyGeneratedAssembly (
482
483
( ) =>
@@ -493,7 +494,7 @@ public void VerifyFieldInterceptorProxy()
493
494
public void VerifyFieldInterceptorProxyWithISerializableEntity ( )
494
495
{
495
496
var factory = new StaticProxyFactory ( ) ;
496
- factory . PostInstantiate ( typeof ( CustomSerializationClass ) . FullName , typeof ( CustomSerializationClass ) , new HashSet < System . Type > { typeof ( INHibernateProxy ) } , null , null , null ) ;
497
+ factory . PostInstantiate ( typeof ( CustomSerializationClass ) . FullName , typeof ( CustomSerializationClass ) , new HashSet < System . Type > { typeof ( INHibernateProxy ) } , null , null , null , true ) ;
497
498
#if NETFX
498
499
VerifyGeneratedAssembly (
499
500
( ) =>
@@ -521,7 +522,7 @@ public void VerifyFieldInterceptorProxyWithAdditionalInterface()
521
522
// to an instance of the persistentClass, and so cannot implement interface methods if it does not
522
523
// inherit the persistentClass.
523
524
new HashSet < System . Type > { typeof ( INHibernateProxy ) , typeof ( IPublic ) } ,
524
- null , null , null ) ;
525
+ null , null , null , false ) ;
525
526
#if NETFX
526
527
VerifyGeneratedAssembly (
527
528
( ) =>
0 commit comments