1. There is no way to filter Notifications by status on the server. You have to pull them into the client application and filter there.
2. Usually you would would write something like
var enabledNotifications = myNotifications.Where(n => n.Status == AFStatus.Enabled);
if (afNote.Status == AFStatus.Enabled)
The difference between Status and GetStatus() is that the former is cached while the latter goes to the AF server to retrieve the latest status.
3. The static method updates the Status property of the notifications you pass in. So yes it does something to the list. The point of this is to a) give you a way to update statuses in bulk, b) not require a full refresh of the notification to get the status.
4. ANNotification and related classes are in the ANSDK which comes with the Notifications client. You reference OSIsoft.PIAnalytics.Common and OSIsoft.PIAnalytics.SDK to use it.
Thank you very much for your responses. Answer #3 doesn't make sense to me yet.
The function takes in a list of AF notification elements and "gets their status". But the function returns nothing. I don't understand how that will change them because it's not doing anything or storing the data somewhere. Or is it?
I can see the "setStatus" function being useful - setting statuses to AF notifications in bulk. But not getting them and nothing happens.
The static method AFNotification.GetStatus will retrieve the statuses from the server (in bulk) and then it actually mutates the AFNotification object by setting Status property for each notification in the list. This does not cause a checkout or update/refresh anything else on the notifications that you passed in. I agree it's a bit confusing because the name defies standard .NET naming conventions.
The instance method GetStatus() returns an AFStatus and also updates the Status property.