Esempio n. 1
0
 /// <summary>
 /// Decorate the specified snapshot element definition with a special extension
 /// to indicate that the element is constrained by the differential.
 /// </summary>
 /// <param name="element">An <see cref="IExtendable"/> instance.</param>
 /// <param name="value">An optional boolean value (default <c>true</c>).</param>
 /// <remarks>Sets the <see cref="CONSTRAINED_BY_DIFF_EXT"/> extension to store the boolean flag.</remarks>
 internal static void SetConstrainedByDiffExtension(this IExtendable element, bool value = true)
 {
     if (element == null)
     {
         throw Error.ArgumentNull(nameof(element));
     }
     element.SetBoolExtension(CONSTRAINED_BY_DIFF_EXT, value);
 }
Esempio n. 2
0
 /// <summary>Mark the snapshot element as changed by the differential.</summary>
 /// <param name="element">An <see cref="IExtendable"/> instance.</param>
 /// <param name="value">An optional boolean value (default <c>true</c>).</param>
 /// <remarks>Sets the <see cref="CHANGED_BY_DIFF_EXT"/> extension to store the boolean flag.</remarks>
 public static void SetChangedByDiff(this IExtendable element, bool value = true)
 {
     if (element == null)
     {
         throw Error.ArgumentNull(nameof(element));
     }
     element.SetBoolExtension(CHANGED_BY_DIFF_EXT, value);
 }