Click or drag to resize

PFRelation_ItemSubscriptionEnsureForUser Method

Gets an existing PFItemSubscription for the given user or return a new persisted one if one didn't already exist. This method uses process level locking to ensure the subscription is updated in an atomic manner. Avoid calling this method from another process (e.g. TimerJobs).

Namespace:  Packflow.Core
Assembly:  MicaSystems.Packflow.Core (in MicaSystems.Packflow.Core.dll) Version: 1.0.0.0 (3.2.0.306)
Syntax
C#
public PFItemSubscription EnsureForUser(
	long userId,
	bool emitSiteEvents = false
)

Parameters

userId
Type: SystemInt64
emitSiteEvents (Optional)
Type: SystemBoolean
If set to true site events will be emitted, allowing the UI (e.g. chat) to update in realtime.

Return Value

Type: PFItemSubscription
A persisted PFItemSubscription instance.
See Also