@@ -23,7 +23,6 @@ internal enum DeleteDataHintInfo : byte
2323 None = 0 ,
2424 PostCopy = 1 ,
2525 TableMovement = 2 ,
26- All = PostCopy | TableMovement
2726 }
2827
2928 private readonly DeleteDataHintInfo info = DeleteDataHintInfo . None ;
@@ -34,12 +33,21 @@ internal enum DeleteDataHintInfo : byte
3433 /// these records are still necessary during upgrade to be copied, but must be removed on its
3534 /// completion.
3635 /// </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 ;
3846
3947 /// <summary>
4048 /// Gets a value indicating whether cause of data deletion is due to table have changed its owner type.
4149 /// </summary>
42- public bool DueToTableOwnerChange => info . HasFlag ( DeleteDataHintInfo . TableMovement ) ;
50+ public bool IsOwnerChangeCleanup => ( info & DeleteDataHintInfo . TableMovement ) > 0 ;
4351
4452 /// <summary>
4553 /// Gets a value indication whether deletion is unsafe. Deletion is considered insafe
@@ -67,8 +75,8 @@ public override string ToString()
6775 ( Identities . Count > 0 )
6876 ? "where (" + string . Join ( " and " , Identities . Select ( pair => pair . ToString ( ) ) . ToArray ( ) ) + ")"
6977 : 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 ) ;
7280 }
7381
7482 // Constructors
@@ -86,7 +94,7 @@ public DeleteDataHint(string sourceTablePath, IList<IdentityPair> identities)
8694 /// </summary>
8795 /// <param name="sourceTablePath">Source table path.</param>
8896 /// <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>
9098 public DeleteDataHint ( string sourceTablePath , IList < IdentityPair > identities , bool postCopy )
9199 : base ( sourceTablePath , identities )
92100 {
@@ -100,7 +108,7 @@ public DeleteDataHint(string sourceTablePath, IList<IdentityPair> identities, b
100108 /// </summary>
101109 /// <param name="sourceTablePath">Source table path.</param>
102110 /// <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>
104112 /// <param name="dueToOnwerChange"><see langword="true"/> if reason of deletion is the table <paramref name="sourceTablePath"/>
105113 /// has changed assigned type.</param>
106114 public DeleteDataHint ( string sourceTablePath , IList < IdentityPair > identities , bool postCopy , bool dueToOnwerChange )
0 commit comments