2 writes to EndpointMetadata
Microsoft.AspNetCore.Mvc.RazorPages (2)
ApplicationModels\PageApplicationModel.cs (2)
48EndpointMetadata = new List<object>(ActionDescriptor.EndpointMetadata ?? Array.Empty<object>()); 70EndpointMetadata = new List<object>(other.EndpointMetadata);
40 references to EndpointMetadata
Microsoft.AspNetCore.Mvc.RazorPages (10)
ApplicationModels\CompiledPageActionDescriptorBuilder.cs (1)
65var endpointMetadata = applicationModel.EndpointMetadata;
ApplicationModels\PageApplicationModel.cs (1)
70EndpointMetadata = new List<object>(other.EndpointMetadata);
DependencyInjection\PageConventionCollectionExtensions.cs (8)
80model.EndpointMetadata.Add(new AllowAnonymousAttribute()); 116model.EndpointMetadata.Add(new AllowAnonymousAttribute()); 141model.EndpointMetadata.Add(new AllowAnonymousAttribute()); 177model.EndpointMetadata.Add(new AllowAnonymousAttribute()); 203model.EndpointMetadata.Add(new AuthorizeAttribute(policy)); 266model.EndpointMetadata.Add(new AuthorizeAttribute(policy)); 292model.EndpointMetadata.Add(new AuthorizeAttribute(policy)); 355model.EndpointMetadata.Add(new AuthorizeAttribute(policy));
Microsoft.AspNetCore.Mvc.RazorPages.Test (30)
ApplicationModels\CompiledPageActionDescriptorBuilderTest.cs (2)
415pageApplicationModel.EndpointMetadata.Add(metadata5); 416pageApplicationModel.EndpointMetadata.Add(metadata6);
DependencyInjection\PageConventionCollectionExtensionsTest.cs (28)
61model => Assert.Empty(model.EndpointMetadata), 66Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 72Assert.IsType<AuthorizeAttribute>(model.EndpointMetadata[0]); 73Assert.IsType<AllowAnonymousAttribute>(model.EndpointMetadata[1]); 132Assert.IsType<AllowAnonymousAttribute>(Assert.Single(model.EndpointMetadata)); 186Assert.Collection(model.EndpointMetadata, 193Assert.Collection(model.EndpointMetadata, 200Assert.Collection(model.EndpointMetadata, 271Assert.Collection(model.EndpointMetadata, 278Assert.Collection(model.EndpointMetadata, 286Assert.Collection(model.EndpointMetadata, 352model => Assert.Empty(model.EndpointMetadata), 353model => Assert.Empty(model.EndpointMetadata), 358Assert.IsType<AllowAnonymousAttribute>(Assert.Single(model.EndpointMetadata)); 364Assert.IsType<AllowAnonymousAttribute>(Assert.Single(model.EndpointMetadata)); 366model => Assert.Empty(model.EndpointMetadata)); 427var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 484var authorizeAttribute = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 538var authorizeAttribute = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 593var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 653var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 660var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 728var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 735var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 800model => Assert.Empty(model.EndpointMetadata), 801model => Assert.Empty(model.EndpointMetadata), 806var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 813var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata));