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

AF SDK Reference

AFConnectionInfo.Preference Property

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFConnectionInfo.Preference Property
The default connection preference override to be used when attempting to connect to a member in an AFCollective for this PISystem instance.

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

Syntax

public AFConnectionPreference Preference { get; set; }
Public Property Preference As AFConnectionPreference
	Get
	Set

Dim instance As AFConnectionInfo
Dim value As AFConnectionPreference

value = instance.Preference

instance.Preference = value
public:
property AFConnectionPreference Preference {
	AFConnectionPreference get ();
	void set (AFConnectionPreference value);
}
member Preference : AFConnectionPreference with get, set

Property Value

Type: AFConnectionPreference
Returns the default connection preference override to be used when attempting to connect to a member in an AFCollective for this PISystem instance. The default value for this property is same as the DefaultPreference value.

Remarks

This property is used to indicate the connection preference when attempting to connect to a member in an AFCollective for this PISystem instance that is different than the global default value specified by the DefaultPreference setting. This preference is used to influence the selection of an AFCollectiveMember when a connection is made to the AFCollective and not specified when calling one of the Connect Overload methods that accept an AFConnectionPreference when attempting to connect to the server.

This property is automatically updated when calling one of the Connect Overload that specifies an AFConnectionPreference as a parameter. This allows all future connection attempts without a connection preference specified to use this same default preference.

Important note Important
This is a client setting and is not persisted between application instances.

Version Information

AFSDK


See Also

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