diff --git a/NDB.Testing.App/NDB.Testing.App.csproj b/NDB.Testing.App/NDB.Testing.App.csproj new file mode 100644 index 0000000..276339c --- /dev/null +++ b/NDB.Testing.App/NDB.Testing.App.csproj @@ -0,0 +1,12 @@ + + + + Exe + netcoreapp3.0 + + + + + + + diff --git a/NDB.Testing.App/Program.cs b/NDB.Testing.App/Program.cs new file mode 100644 index 0000000..e33a3e0 --- /dev/null +++ b/NDB.Testing.App/Program.cs @@ -0,0 +1,33 @@ +using Microsoft.Extensions.DependencyInjection; +using NDB.Infrastructure.PublicIP; +using NDB.Infrastructure.PublicIP.Services; +using System; +using System.Threading.Tasks; + +namespace NDB.Testing.App +{ + class Program + { + static async Task Main(string[] args) + { + Console.WriteLine("Hello World!"); + + var provider = GetServiceProvider(); + + var service = provider.GetService(); + var result = await service.GetPublicIP(); + + Console.WriteLine(result.ip); + Console.ReadKey(); + } + + private static IServiceProvider GetServiceProvider() + { + var services = new ServiceCollection(); + services.AddPublicIPService(); + + var provider = services.BuildServiceProvider(); + return provider; + } + } +} diff --git a/NDB.sln b/NDB.sln index 1f9843d..7a9db12 100644 --- a/NDB.sln +++ b/NDB.sln @@ -13,7 +13,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Notes.txt = Notes.txt EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NDB.Infrastructure.PublicIP", "NDB.Infrastructure.PublicIP\NDB.Infrastructure.PublicIP.csproj", "{FCB29735-E36A-442A-9307-F124782B8BB8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NDB.Infrastructure.PublicIP", "NDB.Infrastructure.PublicIP\NDB.Infrastructure.PublicIP.csproj", "{FCB29735-E36A-442A-9307-F124782B8BB8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NDB.Testing.App", "NDB.Testing.App\NDB.Testing.App.csproj", "{656CCE38-90C3-4D19-9D07-EF1F0410CFDC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -29,6 +31,10 @@ Global {FCB29735-E36A-442A-9307-F124782B8BB8}.Debug|Any CPU.Build.0 = Debug|Any CPU {FCB29735-E36A-442A-9307-F124782B8BB8}.Release|Any CPU.ActiveCfg = Release|Any CPU {FCB29735-E36A-442A-9307-F124782B8BB8}.Release|Any CPU.Build.0 = Release|Any CPU + {656CCE38-90C3-4D19-9D07-EF1F0410CFDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {656CCE38-90C3-4D19-9D07-EF1F0410CFDC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {656CCE38-90C3-4D19-9D07-EF1F0410CFDC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {656CCE38-90C3-4D19-9D07-EF1F0410CFDC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE