This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use RazorPagesOptions.RootDirectory when looking for page hierarchies.
Fixes #5915
- Loading branch information
Showing
10 changed files
with
156 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
14 changes: 10 additions & 4 deletions
14
test/Microsoft.AspNetCore.Mvc.TestCommon/TestOptionsManager.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System.Linq; | ||
using Microsoft.Extensions.Options; | ||
|
||
namespace Microsoft.AspNetCore.Mvc | ||
{ | ||
public class TestOptionsManager<T> : OptionsManager<T> | ||
where T : class, new() | ||
public class TestOptionsManager<TOptions> : IOptions<TOptions> | ||
where TOptions : class, new() | ||
{ | ||
public TestOptionsManager() | ||
: base(Enumerable.Empty<IConfigureOptions<T>>()) | ||
: this(new TOptions()) | ||
{ | ||
} | ||
|
||
public TestOptionsManager(TOptions value) | ||
{ | ||
Value = value; | ||
} | ||
|
||
public TOptions Value { get; } | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
test/WebSites/RazorPagesWebSite/Pages/WithPageImport/Index.cshtml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@page | ||
Hello from @CustomService.Value! |
1 change: 1 addition & 0 deletions
1
test/WebSites/RazorPagesWebSite/Pages/WithPageImport/_PageImports.cshtml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@using CustomNamespace |
2 changes: 2 additions & 0 deletions
2
test/WebSites/RazorPagesWebSite/Pages/WithPageStart/Index.cshtml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@page | ||
Hello from @Path! |
1 change: 1 addition & 0 deletions
1
test/WebSites/RazorPagesWebSite/Pages/WithPageStart/_PageStart.cshtml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello from _PageStart |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
namespace CustomNamespace | ||
{ | ||
public static class CustomService | ||
{ | ||
public static string Value => nameof(CustomService); | ||
} | ||
} |