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