Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Commit 2b21b63

Browse files
committed
Cleanup
1 parent b789f82 commit 2b21b63

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

src/Kestrel/EndpointConfiguration.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ internal EndpointConfiguration(bool isHttps, ListenOptions listenOptions, HttpsC
1414
{
1515
IsHttps = isHttps;
1616
Listener = listenOptions ?? throw new ArgumentNullException(nameof(listenOptions));
17-
Https = httpsOptions;
17+
Https = httpsOptions ?? throw new ArgumentNullException(nameof(httpsOptions));
1818
ConfigSection = configSection ?? throw new ArgumentNullException(nameof(configSection));
1919
}
2020

2121
public bool IsHttps { get; }
2222
public ListenOptions Listener { get; }
23-
public HttpsConnectionAdapterOptions Https { get; set; }
23+
public HttpsConnectionAdapterOptions Https { get; }
2424
public IConfigurationSection ConfigSection { get; }
2525
}
2626
}

src/Kestrel/Internal/ConfigurationReader.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,20 +117,20 @@ public CertificateConfig(IConfigurationSection configSection)
117117
// File
118118
public bool IsFileCert => !string.IsNullOrEmpty(Path);
119119

120-
public string Path => ConfigSection?["Path"];
120+
public string Path => ConfigSection["Path"];
121121

122-
public string Password => ConfigSection?["Password"];
122+
public string Password => ConfigSection["Password"];
123123

124124
// Cert store
125125

126126
public bool IsStoreCert => !string.IsNullOrEmpty(Subject);
127127

128-
public string Subject => ConfigSection?["Subject"];
128+
public string Subject => ConfigSection["Subject"];
129129

130-
public string Store => ConfigSection?["Store"];
130+
public string Store => ConfigSection["Store"];
131131

132-
public string Location => ConfigSection?["Location"];
132+
public string Location => ConfigSection["Location"];
133133

134-
public bool? AllowInvalid => ConfigSection?.GetSection("AllowInvalid")?.Get<bool?>();
134+
public bool? AllowInvalid => ConfigSection.GetSection("AllowInvalid").Get<bool?>();
135135
}
136136
}

test/Kestrel.Tests/KestrelConfigurationBuilderTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ public void Configure_IsReplacable()
127127
public void ConfigureDefaultsAppliesToNewConfigureEndpoints()
128128
{
129129
var serverOptions = CreateServerOptions();
130-
serverOptions.ListenLocalhost(5000);
131-
132-
Assert.True(serverOptions.ListenOptions[0].NoDelay);
133130

134131
serverOptions.ConfigureEndpointDefaults(opt =>
135132
{

0 commit comments

Comments
 (0)