PersistenceVersionAttribute Class

Spotfire 14.3 API Reference
Used to markup the persistence version of a class in order to support the writing of backwards compatible classes.
Inheritance Hierarchy

SystemObject
  SystemAttribute
    Spotfire.Dxp.Framework.PersistencePersistenceVersionAttribute

Namespace:  Spotfire.Dxp.Framework.Persistence
Assembly:  Spotfire.Dxp.Framework (in Spotfire.Dxp.Framework.dll) Version: 65.0.19510.3242 (65.0.19510.3242)
Syntax

C#
[AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Enum|AttributeTargets.Interface, AllowMultiple = false, 
	Inherited = false)]
public sealed class PersistenceVersionAttribute : Attribute

The PersistenceVersionAttribute type exposes the following members.

Constructors

  NameDescription
Public methodPersistenceVersionAttribute
Initializes a new instance of the PersistenceVersionAttribute class.
Top
Properties

  NameDescription
Public propertyMajorVersion
Gets the major version.
Public propertyMinorVersion
Gets the minor version.
Public propertyTypeId
When implemented in a derived class, gets a unique identifier for this Attribute.
(Inherited from Attribute.)
Top
Methods

  NameDescription
Public methodEquals
Returns a value that indicates whether this instance is equal to a specified object.
(Overrides AttributeEquals(Object).)
Public methodGetHashCode
Returns the hash code for this instance.
(Overrides AttributeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsDefaultAttribute
When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.
(Overrides AttributeIsDefaultAttribute.)
Public methodToString
Returns a String that represents the current Object.
(Overrides ObjectToString.)
Top
Explicit Interface Implementations

  NameDescription
Explicit interface implementationPrivate method_AttributeGetIDsOfNames
Maps a set of names to a corresponding set of dispatch identifiers.
(Inherited from Attribute.)
Explicit interface implementationPrivate method_AttributeGetTypeInfo
Retrieves the type information for an object, which can be used to get the type information for an interface.
(Inherited from Attribute.)
Explicit interface implementationPrivate method_AttributeGetTypeInfoCount
Retrieves the number of type information interfaces that an object provides (either 0 or 1).
(Inherited from Attribute.)
Explicit interface implementationPrivate method_AttributeInvoke
Provides access to properties and methods exposed by an object.
(Inherited from Attribute.)
Top
Remarks

During deserialization of a DocumentNode, the persistence version of the serialized type can be retreived by calling GetPersistedVersion(SerializationInfo, StreamingContext, Type). By inspecting this object, the deserialization code can determine what values to expect in the serialized format and thus what to deserialize.

Make sure to increment the persistence version of a class whenever the fields that it serializes change in any way. This includes addition and removal the serialized fields as well as changes of name and type.

Version Information

Supported in: 14.3, 14.2, 14.1, 14.0, 12.5, 12.4, 12.3, 12.2, 12.1, 12.0, 11.8
See Also

Reference