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