diff --git a/README.md b/README.md index 6d245e52..71040b12 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ DnsClient.NET is a simple yet very powerful and high performance open source lib ## Usage -See http://dnsclient.michaco.net for more details and documentation. +See [the DnsClient site][dnsclient] for more details and documentation. The following example instantiates a new `LookupClient` to query some IP address. @@ -57,6 +57,7 @@ Just clone the repository and open the solution in Visual Studio 2019. ## Examples * See [MiniDig](https://github.com/MichaCo/DnsClient.NET/tree/dev/samples/MiniDig)'s readme for what this example command line tool can do. -* More documentation and a simple query window on http://dnsclient.michaco.net +* [More documentation and examples][dnsclient] * The [Samples](https://github.com/MichaCo/DnsClient.NET.Samples) repository (there might be more in the future). +[dnsclient]:https://dnsclient.michaco.net diff --git a/samples/MiniDig/Program.cs b/samples/MiniDig/Program.cs index f6103b55..69a906dc 100644 --- a/samples/MiniDig/Program.cs +++ b/samples/MiniDig/Program.cs @@ -9,7 +9,7 @@ public class Program { public static async Task Main(string[] args) { - DnsClient.Tracing.Source.Switch.Level = SourceLevels.Information; + DnsClient.Tracing.Source.Switch.Level = SourceLevels.Warning; DnsClient.Tracing.Source.Listeners.Add(new ConsoleTraceListener()); var app = new CommandLineApplication(throwOnUnexpectedArg: true); diff --git a/src/DnsClient/DnsQueryExtensions.cs b/src/DnsClient/DnsQueryExtensions.cs index 52fbcc3e..125de0b7 100644 --- a/src/DnsClient/DnsQueryExtensions.cs +++ b/src/DnsClient/DnsQueryExtensions.cs @@ -738,9 +738,9 @@ public static ServiceHostEntry[] ResolveServiceProcessResult(IDnsQueryResponse r } /// - /// Extends by the property. + /// Extends by the property. /// - /// + /// public class ServiceHostEntry : IPHostEntry { /// diff --git a/src/DnsClient/DnsQueryOptions.cs b/src/DnsClient/DnsQueryOptions.cs index 38463cd6..b8e7c1ea 100644 --- a/src/DnsClient/DnsQueryOptions.cs +++ b/src/DnsClient/DnsQueryOptions.cs @@ -143,7 +143,7 @@ public class DnsQueryOptions /// /// Gets or sets the request timeout in milliseconds. is used for limiting the connection and request time for one operation. /// Timeout must be greater than zero and less than . - /// If (or -1) is used, no timeout will be applied. + /// If (or -1) is used, no timeout will be applied. /// Default is 5 seconds. /// /// @@ -579,7 +579,7 @@ public class DnsQuerySettings : IEquatable /// /// Gets the request timeout in milliseconds. is used for limiting the connection and request time for one operation. /// Timeout must be greater than zero and less than . - /// If (or -1) is used, no timeout will be applied. + /// If (or -1) is used, no timeout will be applied. /// Default is 5 seconds. /// /// diff --git a/src/DnsClient/DnsResponseCode.cs b/src/DnsClient/DnsResponseCode.cs index af176092..10ae0aaf 100644 --- a/src/DnsClient/DnsResponseCode.cs +++ b/src/DnsClient/DnsResponseCode.cs @@ -273,7 +273,7 @@ public enum DnsResponseCode /// /// A DnsClient specific exception transporting additional information about the query causing this exception. /// - /// + /// #if !NETSTANDARD1_3 [Serializable] #endif diff --git a/src/DnsClient/Internal/ILogger.cs b/src/DnsClient/Internal/ILogger.cs index 5667bd4a..5a8ebfee 100644 --- a/src/DnsClient/Internal/ILogger.cs +++ b/src/DnsClient/Internal/ILogger.cs @@ -12,4 +12,4 @@ public interface ILogger } } -#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member \ No newline at end of file +#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member diff --git a/src/DnsClient/Internal/ILoggerFactory.cs b/src/DnsClient/Internal/ILoggerFactory.cs index d2c16c83..c63b728b 100644 --- a/src/DnsClient/Internal/ILoggerFactory.cs +++ b/src/DnsClient/Internal/ILoggerFactory.cs @@ -8,4 +8,4 @@ public interface ILoggerFactory } } -#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member \ No newline at end of file +#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member diff --git a/src/DnsClient/Internal/LogLevel.cs b/src/DnsClient/Internal/LogLevel.cs index 213ebd7d..fc9c1241 100644 --- a/src/DnsClient/Internal/LogLevel.cs +++ b/src/DnsClient/Internal/LogLevel.cs @@ -14,4 +14,4 @@ public enum LogLevel } } -#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member \ No newline at end of file +#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member diff --git a/src/DnsClient/Internal/LoggerExtensions.cs b/src/DnsClient/Internal/LoggerExtensions.cs index a596bbb0..f9741085 100644 --- a/src/DnsClient/Internal/LoggerExtensions.cs +++ b/src/DnsClient/Internal/LoggerExtensions.cs @@ -143,4 +143,4 @@ public static void Log(this ILogger logger, LogLevel logLevel, Exception excepti } } -#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member \ No newline at end of file +#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member diff --git a/src/DnsClient/Internal/NullLoggerFactory.cs b/src/DnsClient/Internal/NullLoggerFactory.cs index 2ceda69d..56d4ec6e 100644 --- a/src/DnsClient/Internal/NullLoggerFactory.cs +++ b/src/DnsClient/Internal/NullLoggerFactory.cs @@ -21,4 +21,4 @@ public void Log(LogLevel logLevel, int eventId, Exception exception, string mess } } } -} \ No newline at end of file +} diff --git a/src/DnsClient/Internal/StringBuilderObjectPool.cs b/src/DnsClient/Internal/StringBuilderObjectPool.cs index 6553fc3d..6364a5e9 100644 --- a/src/DnsClient/Internal/StringBuilderObjectPool.cs +++ b/src/DnsClient/Internal/StringBuilderObjectPool.cs @@ -170,7 +170,7 @@ internal abstract class ObjectPoolProvider { public ObjectPool Create() where T : class, new() { - return Create(new DefaultPooledObjectPolicy()); + return Create(new DefaultPooledObjectPolicy()); } public abstract ObjectPool Create(IPooledObjectPolicy policy) where T : class; @@ -210,7 +210,7 @@ internal static class ObjectPoolProviderExtensions { public static ObjectPool CreateStringBuilderPool(this ObjectPoolProvider provider) { - return provider.Create(new StringBuilderPooledObjectPolicy()); + return provider.Create(new StringBuilderPooledObjectPolicy()); } public static ObjectPool CreateStringBuilderPool( @@ -224,9 +224,9 @@ public static ObjectPool CreateStringBuilderPool(this ObjectPoolP MaximumRetainedCapacity = maximumRetainedCapacity, }; - return provider.Create(policy); + return provider.Create(policy); } } } -#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member \ No newline at end of file +#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member diff --git a/src/DnsClient/Interop/DisposableIntPtr.cs b/src/DnsClient/Interop/DisposableIntPtr.cs index ea1ba8d0..029fc1bb 100644 --- a/src/DnsClient/Interop/DisposableIntPtr.cs +++ b/src/DnsClient/Interop/DisposableIntPtr.cs @@ -36,4 +36,4 @@ public void Dispose() Marshal.FreeHGlobal(_ptr); } } -} \ No newline at end of file +} diff --git a/src/DnsClient/IpAddressExtensions.cs b/src/DnsClient/IpAddressExtensions.cs index 856ebca1..be3eda47 100644 --- a/src/DnsClient/IpAddressExtensions.cs +++ b/src/DnsClient/IpAddressExtensions.cs @@ -17,8 +17,8 @@ public static class IpAddressExtensions /// /// The address to translate. /// The arpa representation of the address. - /// - /// + /// + /// /// public static string GetArpaName(this IPAddress ip) { diff --git a/src/DnsClient/Protocol/AddressRecord.cs b/src/DnsClient/Protocol/AddressRecord.cs index e0a68cd6..9f4ec437 100644 --- a/src/DnsClient/Protocol/AddressRecord.cs +++ b/src/DnsClient/Protocol/AddressRecord.cs @@ -25,7 +25,7 @@ public class AddressRecord : DnsResourceRecord /// The information. /// The address. /// If is null. - /// If or is null + /// If or is null public AddressRecord(ResourceRecordInfo info, IPAddress address) : base(info) { @@ -37,4 +37,4 @@ private protected override string RecordToString() return Address.ToString(); } } -} \ No newline at end of file +} diff --git a/src/DnsClient/Protocol/AfsDbRecord.cs b/src/DnsClient/Protocol/AfsDbRecord.cs index b17b2ead..f28f9f31 100644 --- a/src/DnsClient/Protocol/AfsDbRecord.cs +++ b/src/DnsClient/Protocol/AfsDbRecord.cs @@ -52,7 +52,7 @@ public class AfsDbRecord : DnsResourceRecord /// The information. /// The type. /// The name. - /// If or is null. + /// If or is null. public AfsDbRecord(ResourceRecordInfo info, AfsType type, DnsString name) : base(info) { SubType = type; @@ -80,4 +80,4 @@ public enum AfsType /// Dce = 2 } -} \ No newline at end of file +} diff --git a/src/DnsClient/Protocol/CNameRecord.cs b/src/DnsClient/Protocol/CNameRecord.cs index 389f0de9..6440901e 100644 --- a/src/DnsClient/Protocol/CNameRecord.cs +++ b/src/DnsClient/Protocol/CNameRecord.cs @@ -41,7 +41,7 @@ public class CNameRecord : DnsResourceRecord /// /// The information. /// The canonical name. - /// If or is null. + /// If or is null. public CNameRecord(ResourceRecordInfo info, DnsString canonicalName) : base(info) { @@ -53,4 +53,4 @@ private protected override string RecordToString() return CanonicalName.Value; } } -} \ No newline at end of file +} diff --git a/src/DnsClient/Protocol/CaaRecord.cs b/src/DnsClient/Protocol/CaaRecord.cs index 53fed87f..b5ea31de 100644 --- a/src/DnsClient/Protocol/CaaRecord.cs +++ b/src/DnsClient/Protocol/CaaRecord.cs @@ -115,7 +115,7 @@ public class CaaRecord : DnsResourceRecord /// The flags. /// The tag. /// The value. - /// If or or is null. + /// If or or is null. public CaaRecord(ResourceRecordInfo info, byte flags, string tag, string value) : base(info) { Flags = flags; @@ -128,4 +128,4 @@ private protected override string RecordToString() return $"{Flags} {Tag} \"{Value}\""; } } -} \ No newline at end of file +} diff --git a/src/DnsClient/Protocol/DnsResourceRecord.cs b/src/DnsClient/Protocol/DnsResourceRecord.cs index 206f0c79..dc584c79 100644 --- a/src/DnsClient/Protocol/DnsResourceRecord.cs +++ b/src/DnsClient/Protocol/DnsResourceRecord.cs @@ -5,7 +5,7 @@ namespace DnsClient.Protocol /// /// Base class for all resource records. /// - /// + /// public abstract class DnsResourceRecord : ResourceRecordInfo { /// @@ -128,7 +128,7 @@ public ResourceRecordInfo(string domainName, ResourceRecordType recordType, Quer /// The record class. /// The time to live. /// Length of the raw data. - /// If is null or empty. + /// If is null or empty. public ResourceRecordInfo(DnsString domainName, ResourceRecordType recordType, QueryClass recordClass, int timeToLive, int rawDataLength) { DomainName = domainName ?? throw new ArgumentNullException(nameof(domainName)); diff --git a/src/DnsClient/Protocol/EmptyRecord.cs b/src/DnsClient/Protocol/EmptyRecord.cs index e4420252..e60a9546 100644 --- a/src/DnsClient/Protocol/EmptyRecord.cs +++ b/src/DnsClient/Protocol/EmptyRecord.cs @@ -4,7 +4,7 @@ /// A not representing any specific resource record. /// Used if unsupported s are found in the result. /// - /// + /// public class EmptyRecord : DnsResourceRecord { /// diff --git a/src/DnsClient/Protocol/HinfoRecord.cs b/src/DnsClient/Protocol/HinfoRecord.cs index ed2d4ab9..7f4b7e9c 100644 --- a/src/DnsClient/Protocol/HinfoRecord.cs +++ b/src/DnsClient/Protocol/HinfoRecord.cs @@ -48,7 +48,7 @@ public class HInfoRecord : DnsResourceRecord /// The information. /// The CPU. /// The OS. - /// If is null. + /// If is null. public HInfoRecord(ResourceRecordInfo info, string cpu, string os) : base(info) { diff --git a/src/DnsClient/Protocol/MXRecord.cs b/src/DnsClient/Protocol/MXRecord.cs index d7a1b31b..91521b06 100644 --- a/src/DnsClient/Protocol/MXRecord.cs +++ b/src/DnsClient/Protocol/MXRecord.cs @@ -53,7 +53,7 @@ public class MxRecord : DnsResourceRecord /// The information. /// The preference. /// Name of the domain. - /// If or is null. + /// If or is null. public MxRecord(ResourceRecordInfo info, ushort preference, DnsString domainName) : base(info) { diff --git a/src/DnsClient/Protocol/MbRecord.cs b/src/DnsClient/Protocol/MbRecord.cs index cc2cb0ca..bce8db6d 100644 --- a/src/DnsClient/Protocol/MbRecord.cs +++ b/src/DnsClient/Protocol/MbRecord.cs @@ -37,7 +37,7 @@ public class MbRecord : DnsResourceRecord /// /// The information. /// The domain name. - /// If or is null. + /// If or is null. public MbRecord(ResourceRecordInfo info, DnsString domainName) : base(info) { diff --git a/src/DnsClient/Protocol/MgRecord.cs b/src/DnsClient/Protocol/MgRecord.cs index f9744f52..1175a735 100644 --- a/src/DnsClient/Protocol/MgRecord.cs +++ b/src/DnsClient/Protocol/MgRecord.cs @@ -39,7 +39,7 @@ public class MgRecord : DnsResourceRecord /// /// The information. /// The domain name. - /// If or is null. + /// If or is null. public MgRecord(ResourceRecordInfo info, DnsString domainName) : base(info) { diff --git a/src/DnsClient/Protocol/MrRecord.cs b/src/DnsClient/Protocol/MrRecord.cs index 85ce5f57..5abe1274 100644 --- a/src/DnsClient/Protocol/MrRecord.cs +++ b/src/DnsClient/Protocol/MrRecord.cs @@ -40,7 +40,7 @@ public class MrRecord : DnsResourceRecord /// /// The information. /// The domain name. - /// If or is null. + /// If or is null. public MrRecord(ResourceRecordInfo info, DnsString name) : base(info) { diff --git a/src/DnsClient/Protocol/NsRecord.cs b/src/DnsClient/Protocol/NsRecord.cs index 06806ce1..48372df2 100644 --- a/src/DnsClient/Protocol/NsRecord.cs +++ b/src/DnsClient/Protocol/NsRecord.cs @@ -47,7 +47,7 @@ public class NsRecord : DnsResourceRecord /// /// The information. /// The name. - /// If or is null. + /// If or is null. public NsRecord(ResourceRecordInfo info, DnsString name) : base(info) { diff --git a/src/DnsClient/Protocol/Options/OptRecord.cs b/src/DnsClient/Protocol/Options/OptRecord.cs index f307f79f..2804d752 100644 --- a/src/DnsClient/Protocol/Options/OptRecord.cs +++ b/src/DnsClient/Protocol/Options/OptRecord.cs @@ -144,4 +144,4 @@ private protected override string RecordToString() } } } -#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member \ No newline at end of file +#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member diff --git a/src/DnsClient/Protocol/PtrRecord.cs b/src/DnsClient/Protocol/PtrRecord.cs index 4d680992..b488e101 100644 --- a/src/DnsClient/Protocol/PtrRecord.cs +++ b/src/DnsClient/Protocol/PtrRecord.cs @@ -26,7 +26,7 @@ namespace DnsClient.Protocol /// A representing a pointer. These RRs are used /// in special domains to point to some other location in the domain space. /// - /// + /// /// RFC 1035 public class PtrRecord : DnsResourceRecord { @@ -43,7 +43,7 @@ public class PtrRecord : DnsResourceRecord /// /// The information. /// The domain name. - /// If or is null. + /// If or is null. public PtrRecord(ResourceRecordInfo info, DnsString ptrDomainName) : base(info) { diff --git a/src/DnsClient/Protocol/RpRecord.cs b/src/DnsClient/Protocol/RpRecord.cs index e1f7b47d..2249d109 100644 --- a/src/DnsClient/Protocol/RpRecord.cs +++ b/src/DnsClient/Protocol/RpRecord.cs @@ -90,7 +90,7 @@ public class RpRecord : DnsResourceRecord /// The information. /// The mailbox domain. /// The text domain. - /// + /// /// If or or is null. /// public RpRecord(ResourceRecordInfo info, DnsString mailbox, DnsString textName) diff --git a/src/DnsClient/Protocol/SoaRecord.cs b/src/DnsClient/Protocol/SoaRecord.cs index 589aafc7..7f573c11 100644 --- a/src/DnsClient/Protocol/SoaRecord.cs +++ b/src/DnsClient/Protocol/SoaRecord.cs @@ -148,7 +148,7 @@ public class SoaRecord : DnsResourceRecord /// The retry time. /// The expire time. /// The minimum TTL. - /// + /// /// If or or is null. /// public SoaRecord(ResourceRecordInfo info, DnsString mName, DnsString rName, uint serial, uint refresh, uint retry, uint expire, uint minimum) diff --git a/src/DnsClient/Protocol/SrvRecord.cs b/src/DnsClient/Protocol/SrvRecord.cs index 38320c87..fe770f59 100644 --- a/src/DnsClient/Protocol/SrvRecord.cs +++ b/src/DnsClient/Protocol/SrvRecord.cs @@ -152,7 +152,7 @@ public class SrvRecord : DnsResourceRecord /// The weight. /// The port. /// The target. - /// If or is null. + /// If or is null. public SrvRecord(ResourceRecordInfo info, ushort priority, ushort weight, ushort port, DnsString target) : base(info) { diff --git a/src/DnsClient/Protocol/TxtRecord.cs b/src/DnsClient/Protocol/TxtRecord.cs index 425ef1ea..6ca94c65 100644 --- a/src/DnsClient/Protocol/TxtRecord.cs +++ b/src/DnsClient/Protocol/TxtRecord.cs @@ -58,7 +58,7 @@ public class TxtRecord : DnsResourceRecord /// The information. /// The values. /// The UTF8 values. - /// + /// /// If or or is null. /// public TxtRecord(ResourceRecordInfo info, string[] values, string[] utf8Values) diff --git a/src/DnsClient/Protocol/UriRecord.cs b/src/DnsClient/Protocol/UriRecord.cs index e9567768..13755014 100644 --- a/src/DnsClient/Protocol/UriRecord.cs +++ b/src/DnsClient/Protocol/UriRecord.cs @@ -67,7 +67,7 @@ public class UriRecord : DnsResourceRecord /// The priority. /// The weight. /// The target. - /// If or is null. + /// If or is null. public UriRecord(ResourceRecordInfo info, int priority, int weight, string target) : base(info) { diff --git a/src/DnsClient/StaticLog.cs b/src/DnsClient/StaticLog.cs deleted file mode 100644 index c0dd7431..00000000 --- a/src/DnsClient/StaticLog.cs +++ /dev/null @@ -1,35 +0,0 @@ -////using System; -////using System.Linq; -////namespace DnsClient -////{ -//// /// -//// /// Used for debugging at the moment, might be removed in a future release. -//// /// -//// public static class StaticLog -//// { -//// /// -//// /// The number of byte array allocations. -//// /// -//// public static long ByteArrayAllocations; - -//// /// -//// /// The number of byte arrays released. -//// /// -//// public static long ByteArrayReleases; - -//// /// -//// /// The number of resolved queries. -//// /// -//// public static long ResolveQueryCount; - -//// /// -//// /// The number of resolve query tries. -//// /// -//// public static long ResolveQueryTries; - -//// /// -//// /// The number of created clients. -//// /// -//// public static long CreatedClients; -//// } -////} \ No newline at end of file