Click or drag to resize
OSIsoft, LLC

IPIPersist Interface

The IPIPersist interface allows a persistence string for an object to be obtained.

Namespace:  OSIsoft.AF
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 2.10.8.440
Syntax
[ComImportAttribute]
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
[GuidAttribute("BA451DA1-EA7F-11D3-BDC5-00C04F779EB2")]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
public interface IPIPersist

The IPIPersist type exposes the following members.

Methods
  NameDescription
Public methodPersist
This method returns the persistence string for the object.
Top
Remarks

Note Note
This interface duplicates the interface defined in the PI SDK. We do this to avoid needing a reference to PISDKCommon for every user of the AF SDK. The GUID must match the one defined by the PI SDK.

This interface has one method, Persist, which allows the caller to obtain a persistence string that can be used to restore the same object later.

For example, a program may want to save a PIPoint, AFBaseElement, AFAttribute, etc. in a file and retrieve that object the next time the program runs. You may persist a number of collections also: AFAttributes, PIPointList, etc.

To retrieve the object, create a AFGlobalRestorer object and pass it the persistence string.

IPIPersist is a generic interface that any developer can implement. With that and a corresponding restorer object that supports the IPIRestorer interface, objects can be persisted and restored.

Objects that support the IPIPersist interface can be saved as the Value property of a PIProperty or AFAttribute object. When the PIProperty or AFAttribute is saved, the persistence string for the object is saved. When the Value property is retrieved later, the object will be restored and returned in the value.

Version Information

AFSDK

Supported in: 2.10.5, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6, 2.5, 2.4
See Also
Enabling Operational Intelligence