37 references to Methods
Microsoft.AspNetCore.Cors (9)
Infrastructure\CorsPolicy.cs (4)
49if (Methods == null || Methods.Count != 1 || Methods[0] != CorsConstants.AnyMethod) 164builder.AppendJoin(",", Methods);
Infrastructure\CorsPolicyBuilder.cs (4)
130_policy.Methods.Add(req); 173_policy.Methods.Clear(); 174_policy.Methods.Add(CorsConstants.AnyMethod); 250WithMethods(policy.Methods.ToArray());
Infrastructure\CorsService.cs (1)
120policy.Methods;
Microsoft.AspNetCore.Cors.Test (28)
CorsMiddlewareTests.cs (2)
114policy.Methods.Add("PUT"); 161policy.Methods.Add("PUT");
CorsPolicyBuilderTests.cs (10)
16originalPolicy.Methods.Add("GET"); 34Assert.NotSame(originalPolicy.Methods, corsPolicy.Methods); 35Assert.Equal(originalPolicy.Methods, corsPolicy.Methods); 64Assert.Empty(corsPolicy.Methods); 82Assert.Empty(corsPolicy.Methods); 106Assert.Empty(corsPolicy.Methods); 229Assert.Equal(new List<string>() { "PUT", "GET" }, corsPolicy.Methods); 244Assert.Equal(new List<string>() { "*" }, corsPolicy.Methods);
CorsPolicyTests.cs (2)
21Assert.Empty(corsPolicy.Methods); 72corsPolicy.Methods.Add("GET");
CorsServiceTests.cs (14)
301policy.Methods.Add("GET"); 318policy.Methods.Add("PUT"); 342policy.Methods.Add(CorsConstants.AnyMethod); 364policy.Methods.Add(CorsConstants.AnyMethod); 384policy.Methods.Add(CorsConstants.AnyMethod); 404policy.Methods.Add(CorsConstants.AnyMethod); 424policy.Methods.Add(CorsConstants.AnyMethod); 441policy.Methods.Add(CorsConstants.AnyMethod); 463policy.Methods.Add("PUT"); 464policy.Methods.Add("DELETE"); 481policy.Methods.Add(CorsConstants.AnyMethod); 504policy.Methods.Add(CorsConstants.AnyMethod); 527policy.Methods.Add(CorsConstants.AnyMethod); 547policy.Methods.Add(CorsConstants.AnyMethod);