From 19f24cad16e52f0bda126b21494c86f3a5e8d50e Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Tue, 24 Jul 2018 21:54:24 -0700 Subject: [PATCH] fix silly constructor --- .../EndpointConstraints/IEndpointConstraint.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.Routing/EndpointConstraints/IEndpointConstraint.cs b/src/Microsoft.AspNetCore.Routing/EndpointConstraints/IEndpointConstraint.cs index 87fc9407ad..1a71ec738d 100644 --- a/src/Microsoft.AspNetCore.Routing/EndpointConstraints/IEndpointConstraint.cs +++ b/src/Microsoft.AspNetCore.Routing/EndpointConstraints/IEndpointConstraint.cs @@ -51,7 +51,15 @@ namespace Microsoft.AspNetCore.Routing.EndpointConstraints Endpoint endpoint, IReadOnlyList constraints) { - throw new NotSupportedException(); + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + + Endpoint = endpoint; + Score = 0; + Values = null; + Constraints = constraints; } public Endpoint Endpoint { get; }