Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Added folderIds for SubscribeToStreamingNotifications #190

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Core/ExchangeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2849,7 +2849,9 @@ public StreamingSubscription SubscribeToStreamingNotifications(

EwsUtilities.ValidateParamCollection(folderIds, "folderIds");

return this.BuildSubscribeToStreamingNotificationsRequest(folderIds, eventTypes).Execute()[0].Subscription;
StreamingSubscription StreamingSub = this.BuildSubscribeToStreamingNotificationsRequest(folderIds, eventTypes).Execute()[0].Subscription;
StreamingSub.folderIds = folderIds;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this a bit more, it seems that it might be more effective to expose the request object off of the StreamingSubscription. This because I could see people being interested in the EventTypes as well. So you would add a Request prop on StreamingSubscription and remove your folderIds one.

return StreamingSub;
}

/// <summary>
Expand Down
5 changes: 5 additions & 0 deletions Notifications/StreamingSubscription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,10 @@ protected override bool UsesWatermark
return false;
}
}

/// <summary>
/// List of the folderIds in the subscription.
/// </summary>
public System.Collections.Generic.IEnumerable<FolderId> folderIds;
}
}