AFConnectionInfo.DefaultPreference Property
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
The default connection preference to be used when attempting to connect to
a member in an AFCollective.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static AFConnectionPreference DefaultPreference { get; set; }
Public Shared Property DefaultPreference As AFConnectionPreference Get Set Dim value As AFConnectionPreference value = AFConnectionInfo.DefaultPreference AFConnectionInfo.DefaultPreference = value
public: static property AFConnectionPreference DefaultPreference { AFConnectionPreference get (); void set (AFConnectionPreference value); }
static member DefaultPreference : AFConnectionPreference with get, set
Property Value
Type: AFConnectionPreferenceReturns the default connection preference to be used when attempting to connect to a member in an AFCollective. The default value for this property is PreferPrimary.
Remarks
This property is used to indicate the connection preference when attempting
to connect to a member in an AFCollective. This preference is
used to influence the selection of an AFCollectiveMember when
a connection is made to the AFCollective and not overridden
on the PISystem instance Preference setting
and not specified when calling one of the Connect Overload
methods that accept an AFConnectionPreference when attempting to
connect to the server.
| This is a client setting and is not persisted between application instances. |