This repository was archived by the owner on Dec 14, 2018. It is now read-only.
Add convenience extension methods for IPageApplicationModelConvention#5866
Closed
pranavkm wants to merge 1 commit into
Closed
Add convenience extension methods for IPageApplicationModelConvention#5866pranavkm wants to merge 1 commit into
pranavkm wants to merge 1 commit into
Conversation
jbagga
reviewed
Mar 1, 2017
| @@ -0,0 +1,23 @@ | |||
| using System; | |||
ajaybhargavb
reviewed
Mar 1, 2017
| services.TryAddSingleton<IActionDescriptorChangeProvider, PageActionDescriptorChangeProvider>(); | ||
|
|
||
| services.TryAddSingleton<TempDataPropertyProvider>(); | ||
|
|
NTaylorMullen
approved these changes
Mar 6, 2017
NTaylorMullen
left a comment
There was a problem hiding this comment.
Super small comments. If null check question results in the need for null checks you can just add those.
| // Internal for testing. | ||
| internal static void AddServices(IServiceCollection services) | ||
| { | ||
| services.TryAddEnumerable( |
There was a problem hiding this comment.
Super hard to read with the lines broken up. Just put this entire bit on one line.
| /// <param name="path">The path of the Razor Page.</param> | ||
| /// <param name="policy">The authorization policy.</param> | ||
| /// <returns>The <see cref="RazorPagesOptions"/>.</returns> | ||
| public static RazorPagesOptions AuthorizePage(this RazorPagesOptions options, string path, string policy) |
There was a problem hiding this comment.
Is policy allowed to be null? Same q for other extensions that take policy.
Contributor
Author
There was a problem hiding this comment.
Neither the filter that we create here, nor the AuthorizeAttribute perform a null check for it. I think it's designed to be null.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.