2 instantiations of PageConventionCollection
Microsoft.AspNetCore.Mvc.RazorPages (2)
DependencyInjection\RazorPagesOptionsSetup.cs (1)
23
options.Conventions = new
PageConventionCollection
(_serviceProvider);
RazorPagesOptions.cs (1)
22
public PageConventionCollection Conventions { get; internal set; } =
new
();
125 references to PageConventionCollection
Microsoft.AspNetCore.Mvc.RazorPages (76)
ApplicationModels\PageConventionCollection.cs (2)
20
/// Initializes a new instance of the <see cref="
PageConventionCollection
"/> class that is empty.
28
/// Initializes a new instance of the <see cref="
PageConventionCollection
"/> class
Builder\RazorPagesEndpointRouteBuilderExtensions.cs (4)
70
PageConventionCollection
.EnsureValidPageName(page, nameof(page));
128
PageConventionCollection
.EnsureValidPageName(page, nameof(page));
182
PageConventionCollection
.EnsureValidPageName(page, nameof(page));
242
PageConventionCollection
.EnsureValidPageName(page, nameof(page));
DependencyInjection\PageConventionCollectionExtensions.cs (67)
13
/// Extensions for <see cref="
PageConventionCollection
"/>.
20
/// <param name="conventions">The <see cref="
PageConventionCollection
"/> to configure.</param>
24
this
PageConventionCollection
conventions,
36
/// <param name="conventions">The <see cref="
PageConventionCollection
"/> to configure.</param>
38
/// <returns>The <see cref="
PageConventionCollection
"/>.</returns>
39
public static
PageConventionCollection
ConfigureFilter(this
PageConventionCollection
conventions, IFilterMetadata filter)
52
/// <param name="conventions">The <see cref="
PageConventionCollection
"/> to configure.</param>
54
/// <returns>The <see cref="
PageConventionCollection
"/>.</returns>
55
public static
PageConventionCollection
Add(this
PageConventionCollection
conventions, IParameterModelBaseConvention convention)
68
/// <param name="conventions">The <see cref="
PageConventionCollection
"/> to configure.</param>
70
/// <returns>The <see cref="
PageConventionCollection
"/>.</returns>
71
public static
PageConventionCollection
AllowAnonymousToPage(this
PageConventionCollection
conventions, string pageName)
93
/// <param name="conventions">The <see cref="
PageConventionCollection
"/> to configure.</param>
102
/// <returns>The <see cref="
PageConventionCollection
"/>.</returns>
103
public static
PageConventionCollection
AllowAnonymousToAreaPage(
104
this
PageConventionCollection
conventions,
129
/// <param name="conventions">The <see cref="
PageConventionCollection
"/> to configure.</param>
131
/// <returns>The <see cref="
PageConventionCollection
"/>.</returns>
132
public static
PageConventionCollection
AllowAnonymousToFolder(this
PageConventionCollection
conventions, string folderPath)
154
/// <param name="conventions">The <see cref="
PageConventionCollection
"/> to configure.</param>
163
/// <returns>The <see cref="
PageConventionCollection
"/>.</returns>
164
public static
PageConventionCollection
AllowAnonymousToAreaFolder(
165
this
PageConventionCollection
conventions,
190
/// <param name="conventions">The <see cref="
PageConventionCollection
"/> to configure.</param>
193
/// <returns>The <see cref="
PageConventionCollection
"/>.</returns>
194
public static
PageConventionCollection
AuthorizePage(this
PageConventionCollection
conventions, string pageName, string policy)
216
/// <param name="conventions">The <see cref="
PageConventionCollection
"/> to configure.</param>
218
/// <returns>The <see cref="
PageConventionCollection
"/>.</returns>
219
public static
PageConventionCollection
AuthorizePage(this
PageConventionCollection
conventions, string pageName) =>
225
/// <param name="conventions">The <see cref="
PageConventionCollection
"/> to configure.</param>
234
/// <returns>The <see cref="
PageConventionCollection
"/>.</returns>
235
public static
PageConventionCollection
AuthorizeAreaPage(this
PageConventionCollection
conventions, string areaName, string pageName)
241
/// <param name="conventions">The <see cref="
PageConventionCollection
"/> to configure.</param>
251
/// <returns>The <see cref="
PageConventionCollection
"/>.</returns>
252
public static
PageConventionCollection
AuthorizeAreaPage(
253
this
PageConventionCollection
conventions,
279
/// <param name="conventions">The <see cref="
PageConventionCollection
"/> to configure.</param>
282
/// <returns>The <see cref="
PageConventionCollection
"/>.</returns>
283
public static
PageConventionCollection
AuthorizeFolder(this
PageConventionCollection
conventions, string folderPath, string policy)
305
/// <param name="conventions">The <see cref="
PageConventionCollection
"/> to configure.</param>
307
/// <returns>The <see cref="
PageConventionCollection
"/>.</returns>
308
public static
PageConventionCollection
AuthorizeFolder(this
PageConventionCollection
conventions, string folderPath) =>
314
/// <param name="conventions">The <see cref="
PageConventionCollection
"/> to configure.</param>
323
/// <returns>The <see cref="
PageConventionCollection
"/>.</returns>
324
public static
PageConventionCollection
AuthorizeAreaFolder(this
PageConventionCollection
conventions, string areaName, string folderPath)
330
/// <param name="conventions">The <see cref="
PageConventionCollection
"/> to configure.</param>
340
/// <returns>The <see cref="
PageConventionCollection
"/>.</returns>
341
public static
PageConventionCollection
AuthorizeAreaFolder(
342
this
PageConventionCollection
conventions,
372
/// <param name="conventions">The <see cref="
PageConventionCollection
"/>.</param>
375
/// <returns>The <see cref="
PageConventionCollection
"/>.</returns>
376
public static
PageConventionCollection
AddPageRoute(this
PageConventionCollection
conventions, string pageName, [StringSyntax("Route")] string route)
395
/// <param name="conventions">The <see cref="
PageConventionCollection
"/>.</param>
405
/// <returns>The <see cref="
PageConventionCollection
"/>.</returns>
406
public static
PageConventionCollection
AddAreaPageRoute(
407
this
PageConventionCollection
conventions,
Infrastructure\CompiledPageActionDescriptorFactory.cs (2)
20
private readonly
PageConventionCollection
_conventions;
57
PageConventionCollection
conventions,
RazorPagesOptions.cs (1)
22
public
PageConventionCollection
Conventions { get; internal set; } = new();
Microsoft.AspNetCore.Mvc.RazorPages.Test (49)
ApplicationModels\PageConventionCollectionTest.cs (7)
18
() =>
PageConventionCollection
.EnsureValidPageName(pageName),
32
() =>
PageConventionCollection
.EnsureValidPageName(pageName),
45
() =>
PageConventionCollection
.EnsureValidPageName(pageName),
57
() =>
PageConventionCollection
.EnsureValidFolderPath(folderPath),
70
() =>
PageConventionCollection
.EnsureValidFolderPath(folderPath),
79
var
collection = new PageConventionCollection(Mock.Of<IServiceProvider>())
99
var
collection = new PageConventionCollection(Mock.Of<IServiceProvider>())
DependencyInjection\MvcRazorPagesMvcBuilderExtensionsTest.cs (1)
32
var
conventions = accessor.Value.Conventions;
DependencyInjection\PageConventionCollectionExtensionsTest.cs (30)
23
var
conventions = GetConventions();
46
var
conventions = GetConventions();
81
var
conventions = GetConventions(enableEndpointRouting: false);
114
var
conventions = GetConventions();
140
var
conventions = GetConventions(enableEndpointRouting: false);
167
var
conventions = GetConventions();
212
var
conventions = GetConventions(enableEndpointRouting: false);
252
var
conventions = GetConventions();
298
var
conventions = GetConventions(enableEndpointRouting: false);
336
var
conventions = GetConventions();
373
var
conventions = GetConventions(enableEndpointRouting: false);
408
var
conventions = GetConventions();
437
var
conventions = GetConventions(enableEndpointRouting: false);
466
var
conventions = GetConventions();
493
var
conventions = GetConventions(enableEndpointRouting: false);
520
var
conventions = GetConventions();
547
var
conventions = GetConventions(enableEndpointRouting: false);
574
var
conventions = GetConventions();
603
var
conventions = GetConventions(enableEndpointRouting: false);
634
var
conventions = GetConventions();
671
var
conventions = GetConventions(enableEndpointRouting: false);
706
var
conventions = GetConventions();
745
var
conventions = GetConventions(enableEndpointRouting: false);
784
var
conventions = GetConventions();
823
var
conventions = GetConventions(enableEndpointRouting: false);
862
var
conventions = GetConventions();
924
var
conventions = GetConventions();
976
private
PageConventionCollection
GetConventions(bool enableEndpointRouting = true)
997
private static void ApplyConventions(
PageConventionCollection
conventions, PageRouteModel[] models)
1007
private static void ApplyConventions(
PageConventionCollection
conventions, PageApplicationModel[] models)
Infrastructure\CompiledPageActionDescriptorFactoryTest.cs (11)
27
var
conventionCollection = new PageConventionCollection(Mock.Of<IServiceProvider>())
61
var
conventionCollection = new PageConventionCollection(Mock.Of<IServiceProvider>())
93
var
conventionCollection = new PageConventionCollection(Mock.Of<IServiceProvider>());
120
var
conventionCollection = new PageConventionCollection(Mock.Of<IServiceProvider>()) { handlerModelConvention.Object };
151
var
conventionCollection = new PageConventionCollection(Mock.Of<IServiceProvider>());
182
var
conventionCollection = new PageConventionCollection(Mock.Of<IServiceProvider>());
213
var
conventionCollection = new PageConventionCollection(Mock.Of<IServiceProvider>()) { parameterModelConvention.Object };
248
var
conventionCollection = new PageConventionCollection(Mock.Of<IServiceProvider>());
282
var
conventionCollection = new PageConventionCollection(Mock.Of<IServiceProvider>());
313
var
conventionCollection = new PageConventionCollection(Mock.Of<IServiceProvider>()) { propertyModelConvention.Object };
345
var
conventionCollection = new PageConventionCollection(Mock.Of<IServiceProvider>());