PersistedAttribute.MergeType property
Gets a value that indicates whether the field’s value should be replaced on restoration with the corresponding value in the backed up version of the SPAutoSerializingObject object.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public ReadOnly Property MergeType As PersistedAttributeMergeType
Get
'Usage
Dim instance As PersistedAttribute
Dim value As PersistedAttributeMergeType
value = instance.MergeType
public PersistedAttributeMergeType MergeType { get; }
Property value
Type: Microsoft.SharePoint.Administration.PersistedAttributeMergeType
true, if the field should be restored from backup; otherwise, false.
Remarks
Restoring every persisted field from a backed up copy of an SPAutoSerializingObject object can cause problems. For example, if the object has an UpgradeRunning property (and backing field) that was false when the object was backed up, but is true at the time a restoration job is run, the restoration should not set it to false. Also, if the object has fields that hold server-relative information, then when the target is a different server, those fields should not be restored.
Examples
The following is an example of using this property to block its restoration.
[Persisted(PersistedAttributeMergeType.NonMerge)]
public bool upgradeRunning;