Fix for Stefan's category/classification issue in WithNotifications #834
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a fix for this issue Stefano raised.
At present, there are two overloads for the
WithNotifications
method on both the ConfigBuilder and SessionConfigBuilder:However, by adding the second overload, the following code will no longer compile:
with the compiler giving the following error:
To solve the problem we can move or change the second overload since it is preview but code calling the first overload in whatever manner must compile with no changes.
The solution I went with was to combine both methods into a single overload with the following signature:
This can be used as follows:
In the last example, all four of the specified exclusions will apply.
I added a test that initially failed to compile, by passing null as the second parameter, and that test now works fine.
I also did some minor tidying re XML docs etc, and moved GQL Notifications out of preview.