Class NotificationProcessor
The notification processor class.
Inheritance
Inherited Members
Namespace: Microsoft.Graph.CoreSDK.Notifications
Assembly: Microsoft.Graph.CoreSDK.dll
Syntax
public class NotificationProcessor : INotificationProcessor, IDisposable
Constructors
View SourceNotificationProcessor(IAuthenticationProvider)
Initializes a new instance of the NotificationProcessor class.
Declaration
public NotificationProcessor(IAuthenticationProvider authenticationProvider)
Parameters
Type | Name | Description |
---|---|---|
IAuthenticationProvider | authenticationProvider | The authentication provider. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If the authentication provider is null. |
Properties
View SourceAuthenticationProvider
Gets the authentication provider. TODO: This should probably not be a part of the INotificationProcessor. Ideally the request is already validated prior to making it in here. This means that 1) Already sanitized by authentication provider and 2) The tenant/correlation id parameters extracted into the IGraphRequest.
Declaration
public IAuthenticationProvider AuthenticationProvider { get; }
Property Value
Type | Description |
---|---|
IAuthenticationProvider | The authentication provider. |
Methods
View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
ExtractNotifications(String, JsonSerializerSettings)
Extracts the notifications from the specified content string.
Declaration
public static Notifications ExtractNotifications(string content, JsonSerializerSettings serializerSettings)
Parameters
Type | Name | Description |
---|---|---|
System.String | content | The content. |
Newtonsoft.Json.JsonSerializerSettings | serializerSettings | The serializer settings. |
Returns
Type | Description |
---|---|
Notifications | The deserialized Notifications. |
Exceptions
Type | Condition |
---|---|
ServiceException | If the specified content is invalid. |
ProcessNotification(IGraphRequest)
Process the incoming notification
Declaration
public IGraphResponse ProcessNotification(IGraphRequest request)
Parameters
Type | Name | Description |
---|---|---|
IGraphRequest | request | The request that contains the notification |
Returns
Type | Description |
---|---|
IGraphResponse | The http response to the inbound request. |
Events
View SourceOnCollectionNotificationReceived
Occurs when a collection notification is received.
Declaration
public event Action<CollectionNotificationEventArgs> OnCollectionNotificationReceived
Event Type
Type | Description |
---|---|
System.Action<CollectionNotificationEventArgs> |
OnNotificationReceived
Occurs when a notification is received. This is a global hook for all notifications.
Declaration
public event Action<NotificationEventArgs> OnNotificationReceived
Event Type
Type | Description |
---|---|
System.Action<NotificationEventArgs> |
OnResourceNotificationReceived
Occurs when a single resource notification is received.
Declaration
public event Action<NotificationEventArgs> OnResourceNotificationReceived
Event Type
Type | Description |
---|---|
System.Action<NotificationEventArgs> |