Skip to content

Commit f61c9b2

Browse files
authored
Fix more typos. (#2)
1 parent bb64e00 commit f61c9b2

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

HttpAuthModule/HttpAuthModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ private void InitializeStatic()
4444

4545
var restrictIPAddresses = Config.Get("RestrictIPAddresses");
4646
if (!string.IsNullOrEmpty(restrictIPAddresses))
47-
_authStrategies.Add(new RestictIPStrategy(restrictIPAddresses));
47+
_authStrategies.Add(new RestrictIPStrategy(restrictIPAddresses));
4848

4949
switch (Config.Get("AuthMode").ToLower())
5050
{

HttpAuthModule/HttpAuthModule.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<Compile Include="IAuthStrategy.cs" />
5454
<Compile Include="IPAddressRange.cs" />
5555
<Compile Include="Properties\AssemblyInfo.cs" />
56-
<Compile Include="RestictIPStrategy.cs" />
56+
<Compile Include="RestrictIPStrategy.cs" />
5757
</ItemGroup>
5858
<ItemGroup>
5959
<None Include="HttpAuthModule.nuspec" />

HttpAuthModule/IPAddressRange.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace HttpAuthModule
88
internal class IPAddressRange
99
{
1010
private AddressFamily _addressFamily;
11-
private byte[] _netowrkAddressBytes;
11+
private byte[] _networkAddressBytes;
1212
private byte[] _subnetMaskBytes;
1313

1414
/// <param name="ipRangeStr">
@@ -42,8 +42,8 @@ public IPAddressRange(string ipRangeString)
4242
else
4343
maskRange = maxMaskRange;
4444

45-
_netowrkAddressBytes = ipAddr.GetAddressBytes();
46-
_subnetMaskBytes = Enumerable.Repeat<byte>(0xFF, _netowrkAddressBytes.Length).ToArray();
45+
_networkAddressBytes = ipAddr.GetAddressBytes();
46+
_subnetMaskBytes = Enumerable.Repeat<byte>(0xFF, _networkAddressBytes.Length).ToArray();
4747

4848
for (int i = 0; i < (maxMaskRange - maskRange); i++)
4949
_subnetMaskBytes[_subnetMaskBytes.Length - 1 - i / 8] -= (byte)(1 << (i % 8));
@@ -56,7 +56,7 @@ public bool IsInRange(IPAddress ipAddr)
5656

5757
var addrBytes = ipAddr.GetAddressBytes();
5858
for (int i = 0; i < addrBytes.Length; i++)
59-
if ((addrBytes[i] & _subnetMaskBytes[i]) != _netowrkAddressBytes[i])
59+
if ((addrBytes[i] & _subnetMaskBytes[i]) != _networkAddressBytes[i])
6060
return false;
6161

6262
return true;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
namespace HttpAuthModule
77
{
8-
internal class RestictIPStrategy : IAuthStrategy
8+
internal class RestrictIPStrategy : IAuthStrategy
99
{
1010
private IPAddressRange[] _ranges;
1111

12-
public RestictIPStrategy(string ipAddresses)
12+
public RestrictIPStrategy(string ipAddresses)
1313
{
1414
_ranges = ipAddresses.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries)
1515
.Select(s => new IPAddressRange(s))

0 commit comments

Comments
 (0)