Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

PISystems Constructor (Boolean)

  • Last UpdatedNov 18, 2025
  • 2 minute read
PISystems Constructor (Boolean)
Initializes a new instance of the PISystems collection with an option to create an independent cache.

Namespace:  OSIsoft.AF
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public PISystems(
	bool forceNewInstance
)
Public Sub New ( 
	forceNewInstance As Boolean
)

Dim forceNewInstance As Boolean

Dim instance As New PISystems(forceNewInstance)
public:
PISystems(
	bool forceNewInstance
)
new : 
        forceNewInstance : bool -> PISystems

Parameters

forceNewInstance
Type: SystemBoolean
Set to to force the creation of an independent collection of PISystems for the current user with a separate cache.

Remarks

This is the top-level object used to access all information within the collection of PISystems known by this client. If the forceNewInstance parameter is and the same user calls this constructor multiple times, the same instance of the PISystems collection is returned. If a different user calls this constructor, then a new instance of the PISystems collection is returned that is independent of the previous user's object.

If an application sets the forceNewInstance to , then a separate independent collection of PISystems is created. The calling application is responsible for re-using this collection for obtaining all objects. Mixing objects within different collections created in this manner can have unpredictable results. This option can be used in applications where there is a possibility for two or more independent threads of operation operating on the same set of AF Objects without synchronization.

Version Information

AFSDK


See Also

In This Topic
TitleResults for “How to create a CRG?”Also Available in