@@ -24,7 +24,7 @@ public static void DeepCopy(object[] values, IType[] types, bool[] copy, object[
24
24
{
25
25
if ( copy [ i ] )
26
26
{
27
- if ( values [ i ] == LazyPropertyInitializer . UnfetchedProperty || values [ i ] == BackrefPropertyAccessor . Unknown )
27
+ if ( Equals ( LazyPropertyInitializer . UnfetchedProperty , values [ i ] ) || Equals ( BackrefPropertyAccessor . Unknown , values [ i ] ) )
28
28
{
29
29
target [ i ] = values [ i ] ;
30
30
}
@@ -44,7 +44,7 @@ public static void BeforeAssemble(object[] row, ICacheAssembler[] types, ISessio
44
44
{
45
45
for ( int i = 0 ; i < types . Length ; i ++ )
46
46
{
47
- if ( row [ i ] != LazyPropertyInitializer . UnfetchedProperty && row [ i ] != BackrefPropertyAccessor . Unknown )
47
+ if ( ! Equals ( LazyPropertyInitializer . UnfetchedProperty , row [ i ] ) && ! Equals ( BackrefPropertyAccessor . Unknown , row [ i ] ) )
48
48
{
49
49
types [ i ] . BeforeAssemble ( row [ i ] , session ) ;
50
50
}
@@ -64,7 +64,7 @@ public static object[] Assemble(object[] row, ICacheAssembler[] types, ISessionI
64
64
var assembled = new object [ row . Length ] ;
65
65
for ( int i = 0 ; i < row . Length ; i ++ )
66
66
{
67
- if ( row [ i ] == LazyPropertyInitializer . UnfetchedProperty || row [ i ] == BackrefPropertyAccessor . Unknown )
67
+ if ( Equals ( LazyPropertyInitializer . UnfetchedProperty , row [ i ] ) || Equals ( BackrefPropertyAccessor . Unknown , row [ i ] ) )
68
68
{
69
69
assembled [ i ] = row [ i ] ;
70
70
}
@@ -92,7 +92,7 @@ public static object[] Disassemble(object[] row, ICacheAssembler[] types, bool[]
92
92
{
93
93
disassembled [ i ] = LazyPropertyInitializer . UnfetchedProperty ;
94
94
}
95
- else if ( row [ i ] == LazyPropertyInitializer . UnfetchedProperty || row [ i ] == BackrefPropertyAccessor . Unknown )
95
+ else if ( Equals ( LazyPropertyInitializer . UnfetchedProperty , row [ i ] ) || Equals ( BackrefPropertyAccessor . Unknown , row [ i ] ) )
96
96
{
97
97
disassembled [ i ] = row [ i ] ;
98
98
}
@@ -120,7 +120,7 @@ public static object[] Replace(object[] original, object[] target, IType[] types
120
120
var copied = new object [ original . Length ] ;
121
121
for ( int i = 0 ; i < original . Length ; i ++ )
122
122
{
123
- if ( original [ i ] == LazyPropertyInitializer . UnfetchedProperty || original [ i ] == BackrefPropertyAccessor . Unknown )
123
+ if ( Equals ( LazyPropertyInitializer . UnfetchedProperty , original [ i ] ) || Equals ( BackrefPropertyAccessor . Unknown , original [ i ] ) )
124
124
{
125
125
copied [ i ] = target [ i ] ;
126
126
}
@@ -150,7 +150,7 @@ public static object[] Replace(object[] original, object[] target, IType[] types
150
150
object [ ] copied = new object [ original . Length ] ;
151
151
for ( int i = 0 ; i < types . Length ; i ++ )
152
152
{
153
- if ( original [ i ] == LazyPropertyInitializer . UnfetchedProperty || original [ i ] == BackrefPropertyAccessor . Unknown )
153
+ if ( Equals ( LazyPropertyInitializer . UnfetchedProperty , original [ i ] ) || Equals ( BackrefPropertyAccessor . Unknown , original [ i ] ) )
154
154
{
155
155
copied [ i ] = target [ i ] ;
156
156
}
@@ -182,7 +182,7 @@ public static object[] ReplaceAssociations(object[] original, object[] target, I
182
182
object [ ] copied = new object [ original . Length ] ;
183
183
for ( int i = 0 ; i < types . Length ; i ++ )
184
184
{
185
- if ( original [ i ] == LazyPropertyInitializer . UnfetchedProperty || original [ i ] == BackrefPropertyAccessor . Unknown )
185
+ if ( Equals ( LazyPropertyInitializer . UnfetchedProperty , original [ i ] ) || Equals ( BackrefPropertyAccessor . Unknown , original [ i ] ) )
186
186
{
187
187
copied [ i ] = target [ i ] ;
188
188
}
@@ -239,7 +239,7 @@ public static int[] FindDirty(StandardProperty[] properties,
239
239
for ( int i = 0 ; i < span ; i ++ )
240
240
{
241
241
bool dirty =
242
- currentState [ i ] != LazyPropertyInitializer . UnfetchedProperty &&
242
+ ! Equals ( LazyPropertyInitializer . UnfetchedProperty , currentState [ i ] ) &&
243
243
properties [ i ] . IsDirtyCheckable ( anyUninitializedProperties )
244
244
&& properties [ i ] . Type . IsDirty ( previousState [ i ] , currentState [ i ] , includeColumns [ i ] , session ) ;
245
245
@@ -290,7 +290,7 @@ public static int[] FindModified(StandardProperty[] properties,
290
290
for ( int i = 0 ; i < span ; i ++ )
291
291
{
292
292
bool dirty =
293
- currentState [ i ] != LazyPropertyInitializer . UnfetchedProperty &&
293
+ ! Equals ( LazyPropertyInitializer . UnfetchedProperty , currentState [ i ] ) &&
294
294
properties [ i ] . IsDirtyCheckable ( anyUninitializedProperties )
295
295
&& properties [ i ] . Type . IsModified ( previousState [ i ] , currentState [ i ] , includeColumns [ i ] , session ) ;
296
296
0 commit comments