@@ -23,7 +23,6 @@ internal enum DeleteDataHintInfo : byte
23
23
None = 0 ,
24
24
PostCopy = 1 ,
25
25
TableMovement = 2 ,
26
- All = PostCopy | TableMovement
27
26
}
28
27
29
28
private readonly DeleteDataHintInfo info = DeleteDataHintInfo . None ;
@@ -34,12 +33,21 @@ internal enum DeleteDataHintInfo : byte
34
33
/// these records are still necessary during upgrade to be copied, but must be removed on its
35
34
/// completion.
36
35
/// </summary>
37
- public bool PostCopy => info . HasFlag ( DeleteDataHintInfo . PostCopy ) ;
36
+ [ Obsolete ( "Use IsPostCopyCleanup instead" ) ]
37
+ public bool PostCopy => IsPostCopyCleanup ;
38
+
39
+ /// <summary>
40
+ /// Gets a value indicating whether deletion must be performed after completion of copy data hint processing.
41
+ /// Normally this flag is used to remove records related to types moved to other hierarchies -
42
+ /// these records are still necessary during upgrade to be copied, but must be removed on its
43
+ /// completion.
44
+ /// </summary>
45
+ public bool IsPostCopyCleanup => ( info & DeleteDataHintInfo . PostCopy ) > 0 ;
38
46
39
47
/// <summary>
40
48
/// Gets a value indicating whether cause of data deletion is due to table have changed its owner type.
41
49
/// </summary>
42
- public bool DueToTableOwnerChange => info . HasFlag ( DeleteDataHintInfo . TableMovement ) ;
50
+ public bool IsOwnerChangeCleanup => ( info & DeleteDataHintInfo . TableMovement ) > 0 ;
43
51
44
52
/// <summary>
45
53
/// Gets a value indication whether deletion is unsafe. Deletion is considered insafe
@@ -67,8 +75,8 @@ public override string ToString()
67
75
( Identities . Count > 0 )
68
76
? "where (" + string . Join ( " and " , Identities . Select ( pair => pair . ToString ( ) ) . ToArray ( ) ) + ")"
69
77
: string . Empty ,
70
- PostCopy ? " (after data copying)" : string . Empty ,
71
- DueToTableOwnerChange ? " (due to table changed owner type)" : string . Empty ) ;
78
+ IsPostCopyCleanup ? " (after data copying)" : string . Empty ,
79
+ IsOwnerChangeCleanup ? " (due to table changed owner type)" : string . Empty ) ;
72
80
}
73
81
74
82
// Constructors
@@ -86,7 +94,7 @@ public DeleteDataHint(string sourceTablePath, IList<IdentityPair> identities)
86
94
/// </summary>
87
95
/// <param name="sourceTablePath">Source table path.</param>
88
96
/// <param name="identities">Identities for data operation.</param>
89
- /// <param name="postCopy"><see cref="PostCopy "/> property value.</param>
97
+ /// <param name="postCopy"><see cref="IsPostCopyCleanup "/> property value.</param>
90
98
public DeleteDataHint ( string sourceTablePath , IList < IdentityPair > identities , bool postCopy )
91
99
: base ( sourceTablePath , identities )
92
100
{
@@ -100,7 +108,7 @@ public DeleteDataHint(string sourceTablePath, IList<IdentityPair> identities, b
100
108
/// </summary>
101
109
/// <param name="sourceTablePath">Source table path.</param>
102
110
/// <param name="identities">Identities for data operation.</param>
103
- /// <param name="postCopy"><see cref="PostCopy "/> property value.</param>
111
+ /// <param name="postCopy"><see cref="IsPostCopyCleanup "/> property value.</param>
104
112
/// <param name="dueToOnwerChange"><see langword="true"/> if reason of deletion is the table <paramref name="sourceTablePath"/>
105
113
/// has changed assigned type.</param>
106
114
public DeleteDataHint ( string sourceTablePath , IList < IdentityPair > identities , bool postCopy , bool dueToOnwerChange )
0 commit comments