SplitHorizon: code refactoring changes done.

This commit is contained in:
Shreyas Zare
2024-02-04 17:07:13 +05:30
parent 5b9a357364
commit 3be1d8ae55
3 changed files with 13 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
/*
Technitium DNS Server
Copyright (C) 2023 Shreyas Zare (shreyas@technitium.com)
Copyright (C) 2024 Shreyas Zare (shreyas@technitium.com)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -32,13 +32,13 @@ using TechnitiumLibrary.Net.Dns.ResourceRecords;
namespace SplitHorizon
{
public class AddressTranslation : IDnsApplication, IDnsPostProcessor, IDnsAuthoritativeRequestHandler
public sealed class AddressTranslation : IDnsApplication, IDnsPostProcessor, IDnsAuthoritativeRequestHandler
{
#region variables
bool _enableAddressTranslation;
IReadOnlyDictionary<NetworkAddress, string> _networkGroupMap;
IReadOnlyDictionary<string, Group> _groups;
Dictionary<NetworkAddress, string> _networkGroupMap;
Dictionary<string, Group> _groups;
#endregion
@@ -312,9 +312,9 @@ namespace SplitHorizon
readonly string _name;
readonly bool _enabled;
readonly bool _translateReverseLookups;
readonly IReadOnlyDictionary<IPAddress, IPAddress> _externalToInternalTranslation;
readonly IReadOnlyDictionary<IPAddress, IPAddress> _internalToExternalTranslation;
readonly IReadOnlyList<KeyValuePair<NetworkAddress, NetworkAddress>> _externalToInternalNetworkTranslation;
readonly Dictionary<IPAddress, IPAddress> _externalToInternalTranslation;
readonly Dictionary<IPAddress, IPAddress> _internalToExternalTranslation;
readonly List<KeyValuePair<NetworkAddress, NetworkAddress>> _externalToInternalNetworkTranslation;
#endregion

View File

@@ -1,6 +1,6 @@
/*
Technitium DNS Server
Copyright (C) 2023 Shreyas Zare (shreyas@technitium.com)
Copyright (C) 2024 Shreyas Zare (shreyas@technitium.com)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -32,11 +32,11 @@ using TechnitiumLibrary.Net.Dns.ResourceRecords;
namespace SplitHorizon
{
public class SimpleAddress : IDnsApplication, IDnsAppRecordRequestHandler
public sealed class SimpleAddress : IDnsApplication, IDnsAppRecordRequestHandler
{
#region variables
static IReadOnlyDictionary<string, List<NetworkAddress>> _networks;
static Dictionary<string, List<NetworkAddress>> _networks;
#endregion
@@ -239,7 +239,7 @@ namespace SplitHorizon
#region properties
internal static IReadOnlyDictionary<string, List<NetworkAddress>> Networks
internal static Dictionary<string, List<NetworkAddress>> Networks
{ get { return _networks; } }
public string Description

View File

@@ -1,6 +1,6 @@
/*
Technitium DNS Server
Copyright (C) 2023 Shreyas Zare (shreyas@technitium.com)
Copyright (C) 2024 Shreyas Zare (shreyas@technitium.com)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ using TechnitiumLibrary.Net.Dns.ResourceRecords;
namespace SplitHorizon
{
public class SimpleCNAME : IDnsApplication, IDnsAppRecordRequestHandler
public sealed class SimpleCNAME : IDnsApplication, IDnsAppRecordRequestHandler
{
#region IDisposable