Skip to content

Commit

Permalink
Merge branch 'release/2.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
coder2000 committed Jun 22, 2018
2 parents 20ddfd6 + 8d36931 commit b85f470
Show file tree
Hide file tree
Showing 93 changed files with 1,290 additions and 1,328 deletions.
17 changes: 16 additions & 1 deletion Ubiety.Dns.Core.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
Expand All @@ -11,6 +11,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{B521661C-0
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ubiety.Dns.Test", "test\Ubiety.Dns.Test\Ubiety.Dns.Test.csproj", "{9655F729-1254-4EC0-8676-0392E9C61DDF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dns.Sample", "src\Dns.Sample\Dns.Sample.csproj", "{9FA05314-88A6-440F-92BA-EAD97FFD9A5D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -48,9 +50,22 @@ Global
{9655F729-1254-4EC0-8676-0392E9C61DDF}.Release|x64.Build.0 = Release|x64
{9655F729-1254-4EC0-8676-0392E9C61DDF}.Release|x86.ActiveCfg = Release|x86
{9655F729-1254-4EC0-8676-0392E9C61DDF}.Release|x86.Build.0 = Release|x86
{9FA05314-88A6-440F-92BA-EAD97FFD9A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9FA05314-88A6-440F-92BA-EAD97FFD9A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9FA05314-88A6-440F-92BA-EAD97FFD9A5D}.Debug|x64.ActiveCfg = Debug|Any CPU
{9FA05314-88A6-440F-92BA-EAD97FFD9A5D}.Debug|x64.Build.0 = Debug|Any CPU
{9FA05314-88A6-440F-92BA-EAD97FFD9A5D}.Debug|x86.ActiveCfg = Debug|Any CPU
{9FA05314-88A6-440F-92BA-EAD97FFD9A5D}.Debug|x86.Build.0 = Debug|Any CPU
{9FA05314-88A6-440F-92BA-EAD97FFD9A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9FA05314-88A6-440F-92BA-EAD97FFD9A5D}.Release|Any CPU.Build.0 = Release|Any CPU
{9FA05314-88A6-440F-92BA-EAD97FFD9A5D}.Release|x64.ActiveCfg = Release|Any CPU
{9FA05314-88A6-440F-92BA-EAD97FFD9A5D}.Release|x64.Build.0 = Release|Any CPU
{9FA05314-88A6-440F-92BA-EAD97FFD9A5D}.Release|x86.ActiveCfg = Release|Any CPU
{9FA05314-88A6-440F-92BA-EAD97FFD9A5D}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{6ED5CB16-4917-4E99-9AA1-1349C51D15A6} = {3D43F0BD-7EE6-4713-8814-F5B295DE197A}
{9655F729-1254-4EC0-8676-0392E9C61DDF} = {B521661C-0E81-4B32-9010-9408F5142A09}
{9FA05314-88A6-440F-92BA-EAD97FFD9A5D} = {3D43F0BD-7EE6-4713-8814-F5B295DE197A}
EndGlobalSection
EndGlobal
38 changes: 26 additions & 12 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,39 @@
image: Visual Studio 2017
skip_tags: true

branches:
except:
- gh-pages

install:
- choco install gitversion.portable -pre -y

before_build:
- cmd: dotnet restore
- ps: gitversion /l console /output buildserver /updateAssemblyInfo

build_script:
- cmd: PowerShell -Version 2.0 .\build.ps1

artifacts:
- path: 'src\**\*.nupkg'

deploy:
release: Ubiety.Dns.Core-v$(appveyor_build_version)
description: Ubiety DNS for .NET Standard
provider: GitHub
auth_token:
secure: +fxguAe7QHo5zfhN7YRoOqMf4x8ZG4mR29Q8HMY0Y9d4gvwv+NP5daWbQyc0R/BJ
artifact: /.*\.nupkg/
draft: true
prerelease: false
on:
branch: master
appveyor_repo_tag: false
- provider: GitHub
release: Ubiety.Dns.Core-v$(appveyor_build_version)
description: Ubiety DNS for .NET Standard
auth_token:
secure: +fxguAe7QHo5zfhN7YRoOqMf4x8ZG4mR29Q8HMY0Y9d4gvwv+NP5daWbQyc0R/BJ
artifact: /.*\.nupkg/
draft: true
prerelease: false
on:
branch: master

- provider: GitHub
release: Ubiety.Dns.Core.beta-v$(appveyor_build_version)
description: Ubiety DNS Beta
auth_token:
secure: +fxguAe7QHo5zfhN7YRoOqMf4x8ZG4mR29Q8HMY0Y9d4gvwv+NP5daWbQyc0R/BJ
artifact: /.*\.nupkg/
draft: true
prerelease: true
2 changes: 1 addition & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Task("Test")
Configuration = configuration
});

//Codecov("test/Ubiety.Dns.Test/coverage.opencover.xml", "977eef75-3209-48ad-8543-92e88ccf4bc5");
Codecov("test/Ubiety.Dns.Test/coverage.opencover.xml", "977eef75-3209-48ad-8543-92e88ccf4bc5");
});

Task("SonarBegin")
Expand Down
10 changes: 10 additions & 0 deletions src/Dns.Sample/Dns.Sample.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<IsPackable>False</IsPackable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Ubiety.Dns.Core\Ubiety.Dns.Core.csproj" />
</ItemGroup>
</Project>
42 changes: 42 additions & 0 deletions src/Dns.Sample/DnsTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using Ubiety.Dns.Core;
using Ubiety.Dns.Core.Common;

namespace Dns.Sample
{
public class DnsTest
{
private readonly Resolver _resolver;

public DnsTest()
{
_resolver = new Resolver()
{
Recursion = true,
UseCache = true,
Timeout = 1000,
Retries = 3,
TransportType = TransportType.Tcp,
DnsServer = "8.8.8.8"
};
}

public IList<string> CertRecords(string name)
{
IList<string> records = new List<string>();

const QuestionType questionType = QuestionType.CERT;
const QuestionClass questionClass = QuestionClass.IN;

var response = _resolver.Query(name, questionType, questionClass);

foreach (var record in response.RecordCert)
{
records.Add(record.ToString());
}

return records;
}
}
}
18 changes: 18 additions & 0 deletions src/Dns.Sample/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;

namespace Dns.Sample
{
internal static class Program
{
private static void Main(string[] args)
{
var test = new DnsTest();

Console.WriteLine("CERT records for: direct.sitenv.org");
foreach (var record in test.CertRecords("direct.sitenv.org"))
{
Console.WriteLine(record);
}
}
}
}
6 changes: 5 additions & 1 deletion src/ProjectLevel.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@
<Rules AnalyzerId="Stylecop.Analyzers" RuleNamespace="Stylecop.Analyzers">
<Rule Id="SA1633" Action="None" />
<Rule Id="SA1121" Action="None" />
<Rule Id="SA1309" Action="None" />
<Rule Id="SA1101" Action="None" />
<Rule Id="SX1309" Action="Warning" />
<Rule Id="SX1101" Action="Warning" />
</Rules>
</RuleSet>
</RuleSet>
2 changes: 1 addition & 1 deletion src/Ubiety.Dns.Core/AdditionalRR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public AdditionalRR(RecordReader br)
{
}
}
}
}
2 changes: 1 addition & 1 deletion src/Ubiety.Dns.Core/AnswerRR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public AnswerRR(RecordReader br)
{
}
}
}
}
2 changes: 1 addition & 1 deletion src/Ubiety.Dns.Core/AuthorityRR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public AuthorityRR(RecordReader br)
{
}
}
}
}
3 changes: 1 addition & 2 deletions src/Ubiety.Dns.Core/Common/OperationClass.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Diagnostics.CodeAnalysis;

namespace Ubiety.Dns.Core.Common
Expand All @@ -7,7 +6,7 @@ namespace Ubiety.Dns.Core.Common
/// Resource record class
/// </summary>
[SuppressMessage("Microsoft.Naming", "CA1717", Justification = "Class is not plural")]
public enum OperationClass : UInt16
public enum OperationClass : ushort
{
/// <summary>
/// Internet class
Expand Down
4 changes: 2 additions & 2 deletions src/Ubiety.Dns.Core/Common/OperationCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ public enum OperationCode
/// <summary>
/// Reserved
/// </summary>
RESERVED15 = 15,
RESERVED15 = 15
}
}
}
3 changes: 1 addition & 2 deletions src/Ubiety.Dns.Core/Common/QuestionClass.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Diagnostics.CodeAnalysis;

namespace Ubiety.Dns.Core.Common
Expand All @@ -7,7 +6,7 @@ namespace Ubiety.Dns.Core.Common
/// Question class
/// </summary>
[SuppressMessage("Microsoft.Naming", "CA1717", Justification = "Class is not plural")]
public enum QuestionClass : UInt16
public enum QuestionClass : ushort
{
/// <summary>
/// Internet class
Expand Down
2 changes: 0 additions & 2 deletions src/Ubiety.Dns.Core/Common/QuestionType.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

namespace Ubiety.Dns.Core.Common
{
/// <summary>
Expand Down
2 changes: 0 additions & 2 deletions src/Ubiety.Dns.Core/Common/RecordType.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

namespace Ubiety.Dns.Core.Common
{
/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions src/Ubiety.Dns.Core/Common/VerboseEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ public class VerboseEventArgs : EventArgs
/// Initializes a new instance of the <see cref="VerboseEventArgs" /> class
/// </summary>
/// <param name="message">Verbose message</param>
public VerboseEventArgs(String message)
public VerboseEventArgs(string message)
{
this.Message = message;
Message = message;
}

/// <summary>
/// Gets or sets the message to output
/// </summary>
public String Message { get; set; }
public string Message { get; set; }
}
}
10 changes: 5 additions & 5 deletions src/Ubiety.Dns.Core/Common/VerboseOutputEventArgs.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Ubiety.Dns.Core
namespace Ubiety.Dns.Core.Common
{
/// <summary>
/// Event args for verbose output
Expand All @@ -11,14 +11,14 @@ public class VerboseOutputEventArgs : EventArgs
/// Initializes a new instance of the <see cref="VerboseOutputEventArgs" /> class
/// </summary>
/// <param name="message">Message to output</param>
public VerboseOutputEventArgs(String message)
public VerboseOutputEventArgs(string message)
{
this.Message = message;
Message = message;
}

/// <summary>
/// Gets or sets the string message
/// Gets the string message
/// </summary>
public String Message { get; set; }
public string Message { get; }
}
}
Loading

0 comments on commit b85f470

Please sign in to comment.