// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.Builder.Extensions { /// /// Options for the . /// public class MapWhenOptions { private Func _predicate; /// /// The user callback that determines if the branch should be taken. /// public Func Predicate { get { return _predicate; } set { if (value == null) { throw new ArgumentNullException(nameof(value)); } _predicate = value; } } /// /// The branch taken for a positive match. /// public RequestDelegate Branch { get; set; } } }