Repository navigation
State changes - #315
State changes#315brentschmaltz wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
This if block can be merged with the prior one.
Replace IsNullOrWhiteSpace with IsNullOrEmpty.
There was a problem hiding this comment.
Sure enough, that was a copy paste issue.
string.IsNullOrEmpty instead of string.IsNullOrWhiteSpace
…ication => Task.FromResult(0);
|
If you really want to prevent a user from setting notifications to null, why not simply adding a |
|
Well, I don't actually. For a very busy server, handling a lot of request. Setting up for notifications that just no-op seems a waste. So I would like to start with them null and take action if the user actually hooked one. |
|
Awaiting a completed task (like the one returned by Do you have a benchmark confirming your feeling? |
|
It is not just the Task.FromResult, but the build up to make the call. We have to new up objects etc. |
|
Checks for whitespace are functionally incorrect in 99% of cases. That is different from doing an optimization where the functionality is identical. |
|
I am not sure exactly sure what you mean by functionally incorrect or how you came to 99%, but I removed the default task handler and put in a check for null since the existing API allows for the users to set the notification to null. Is there anything else blocking this PR? |
|
@brentschmaltz we'll finish this up next week when @Tratcher is back from vacation. |
|
Rebased, squashed, and merged. |
Additional Tests
Check for null RedirectToIdentityProviderNotification != null before preparing the call
Additional state can be easily set by user in RedirectToIdentityProviderNotification