-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNancyOptions.cs
executable file
·34 lines (30 loc) · 1.19 KB
/
NancyOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using Nancy.Bootstrapper;
using System;
namespace Nancy.AspNetCore {
/// <summary>
/// Options for hosting Nancy with AspNetCore.
/// </summary>
public class NancyOptions {
private INancyBootstrapper bootstrapper;
private Func<NancyContext, bool> performPassThrough;
/// <summary>
/// Gets or sets the bootstrapper. If none is set, NancyBootstrapperLocator.Bootstrapper is used.
/// </summary>
public INancyBootstrapper Bootstrapper {
get { return this.bootstrapper ?? NancyBootstrapperLocator.Bootstrapper; }
set { this.bootstrapper = value; }
}
/// <summary>
/// Gets or sets the delegate that determines if NancyMiddleware performs pass through.
/// </summary>
public Func<NancyContext, bool> PerformPassThrough {
get { return this.performPassThrough ?? (context => false); }
set { this.performPassThrough = value; }
}
/// <summary>
/// Gets or sets a value indicating whether to request a client certificate or not.
/// Defaults to false.
/// </summary>
public bool EnableClientCertificates { get; set; }
}
}