Follow ups for nullable (#23736)
* Follow ups for nullable * Update src/Http/Routing/src/Matching/DfaMatcherBuilder.cs Co-authored-by: James Newton-King <james@newtonking.com> Co-authored-by: James Newton-King <james@newtonking.com>
This commit is contained in:
parent
380a5679bb
commit
93634cd772
|
|
@ -247,7 +247,9 @@ namespace Microsoft.AspNetCore.Routing.Matching
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AddLiteralNode(includeLabel, nextParents, parent, requiredValue.ToString());
|
var literalValue = requiredValue?.ToString() ?? throw new InvalidOperationException($"Required value for literal '{parameterPart.Name}' must evaluate to a non-null string.");
|
||||||
|
|
||||||
|
AddLiteralNode(includeLabel, nextParents, parent, literalValue);
|
||||||
}
|
}
|
||||||
else if (segment.IsSimple && parameterPart != null)
|
else if (segment.IsSimple && parameterPart != null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,11 @@ namespace Microsoft.Extensions.DependencyInjection
|
||||||
throw new ArgumentNullException(nameof(services));
|
throw new ArgumentNullException(nameof(services));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (configure == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(configure));
|
||||||
|
}
|
||||||
|
|
||||||
services.Configure(configure);
|
services.Configure(configure);
|
||||||
return services.AddAuthorizationCore();
|
return services.AddAuthorizationCore();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue