BuildSubscribeToStreamingNotificationsRequest method

SubscribeToStreamingNotificationsRequest BuildSubscribeToStreamingNotificationsRequest(
  1. Iterable<FolderId>? folderIds,
  2. List<EventType> eventTypes
)
Builds request to subscribe to streaming notifications in the authenticated user's mailbox. The Ids of the folder to subscribe to. The event types to subscribe to.

Implementation

SubscribeToStreamingNotificationsRequest
BuildSubscribeToStreamingNotificationsRequest(
  Iterable<FolderId>? folderIds,
  List<EventType> eventTypes,
) {
  EwsUtilities.ValidateParamCollection(eventTypes, "eventTypes");

  SubscribeToStreamingNotificationsRequest request =
      SubscribeToStreamingNotificationsRequest(this);

  if (folderIds != null) {
    request.FolderIds!.AddRangeFolderIds(folderIds);
  }

  request.EventTypes.addAll(eventTypes);

  return request;
}