PICollective.SwitchMember Method (NetworkCredential, PICollectiveMember)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
The SwitchMember method is used to change to the specified
member of the collective using the specified PI User credentials.
Namespace: OSIsoft.AF.PI
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void SwitchMember( NetworkCredential credential, PICollectiveMember member )
Public Sub SwitchMember ( credential As NetworkCredential, member As PICollectiveMember ) Dim instance As PICollective Dim credential As NetworkCredential Dim member As PICollectiveMember instance.SwitchMember(credential, member)
public: void SwitchMember( NetworkCredential^ credential, PICollectiveMember^ member )
member SwitchMember : credential : NetworkCredential * member : PICollectiveMember -> unit
Parameters
- credential
- Type: System.NetNetworkCredential
The NetworkCredential for the PI User to use when connecting to the server. - member
- Type: OSIsoft.AF.PIPICollectiveMember
The preferred member of the PICollective selected for the connection. If the member is not available, then the connection will failover to another member.
Remarks
This method will change the currently connected member of the collective to the specified member if the current Priority settings allow a connection to this member. This method will not modify the current failover behavior of the PICollective established with the initial connection to the collective.
A direct connection can be made to a collective member using one of the PICollectiveMember.Connect Overload methods. If the current connection to a collective member is a direct connection, then this method will establish a normal failover connection before switching members.