Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Adding PageActionDescriptorProvider #5544

Closed
wants to merge 1 commit into from

Conversation

pranavkm
Copy link
Contributor

Fixes #5353

@pranavkm
Copy link
Contributor Author

Resending because #5450 was messed up. cc @rynowak \ @javiercn

@pranavkm pranavkm force-pushed the prkrishn/PageActionDescriptorProvider branch from 10091f1 to 8d636bf Compare November 18, 2016 22:24
@pranavkm
Copy link
Contributor Author

Bump, I'd like to get this in soon.

/// <summary>
/// Application model component for RazorPages.
/// </summary>
public class PageModel
Copy link
Member

Choose a reason for hiding this comment

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

Filename here is wrong, PageModels.cs

// Act and Assert
var ex = Assert.Throws<InvalidOperationException>(() => provider.OnProvidersExecuting(context));
Assert.Equal(
"The @page directive for the Razor page at /Test.cshtml cannot override the relative path prefix.",
Copy link
Member

Choose a reason for hiding this comment

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

This is a really jargon-ey error. I'd suggest something like

The route for a page cannot start with / or ~/. Pages do not support overriding the file path of the page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure

"warningsAsErrors": true,
"compile": {
"include": "../Microsoft.AspNetCore.Mvc.TestCommon/TestFile*.cs"
}
Copy link
Member

Choose a reason for hiding this comment

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

What are these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I had some odd issues referencing TestCommon before we had rebased. I'll see if it's fixed now.

@javiercn
Copy link
Member

Looks good to me, but get @rynowak sign-off

@rynowak
Copy link
Member

rynowak commented Nov 22, 2016

I did 😆

@pranavkm pranavkm closed this Nov 28, 2016
@pranavkm pranavkm deleted the prkrishn/PageActionDescriptorProvider branch November 28, 2016 22:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants