From 63c1fcc9e4416d135901d4f5072d4feb69400a81 Mon Sep 17 00:00:00 2001 From: Ricky Brundritt Date: Mon, 27 Nov 2017 14:07:21 -0800 Subject: [PATCH] Version 1.0.4 update Added support for .NET Standard 2.0 --- BingMapsSDSToolkit.sln | 20 ++- Build/BingMapsSDSToolkit.nuspec | 39 +++++- CHANGELOG.md | 7 ++ README.md | 3 +- .../SDSToolkitConsoleApp.Core/Program.cs | 63 ++++++++++ .../SDSToolkitConsoleApp.Core.csproj | 12 ++ .../SDSToolkitConsoleApp.csproj | 12 +- .../SDSToolkitConsoleApp/packages.config | 2 +- .../WPF/BingSDSTestApp/BingSDSTestApp.csproj | 17 ++- Samples/WPF/BingSDSTestApp/packages.config | 2 +- .../BingMapsSDSToolkit.Standard.csproj | 114 ++++++++++++++++++ Source/BingMapsSDSToolkit.csproj | 13 +- Source/Common/InternalSettings.cs | 37 ++++++ Source/DataSourceAPI/DataSourceManager.cs | 18 +-- Source/GeoDataAPI/GeoDataManager.cs | 4 +- .../GeocodeDataFlowAPI/BatchGeocodeManager.cs | 4 +- Source/GeocodeDataFlowAPI/GeocodeFeed.cs | 2 +- Source/Properties/AssemblyInfo.cs | 4 +- Source/QueryAPI/FindByPropertyRequest.cs | 2 +- Source/packages.config | 2 +- 20 files changed, 333 insertions(+), 44 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 Samples/Console/SDSToolkitConsoleApp.Core/Program.cs create mode 100644 Samples/Console/SDSToolkitConsoleApp.Core/SDSToolkitConsoleApp.Core.csproj create mode 100644 Source/BingMapsSDSToolkit.Standard/BingMapsSDSToolkit.Standard.csproj create mode 100644 Source/Common/InternalSettings.cs diff --git a/BingMapsSDSToolkit.sln b/BingMapsSDSToolkit.sln index c78353b..e1afa9a 100644 --- a/BingMapsSDSToolkit.sln +++ b/BingMapsSDSToolkit.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26228.9 +VisualStudioVersion = 15.0.27004.2009 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Source", "Source", "{6E311F7C-45B1-46C0-96B4-D4BA2048C818}" EndProject @@ -10,6 +10,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{83B9E985-FC31-42F4-A569-AEB80E363C7C}" ProjectSection(SolutionItems) = preProject .gitignore = .gitignore + CHANGELOG.md = CHANGELOG.md CONTRIBUTING.md = CONTRIBUTING.md LICENSE = LICENSE README.md = README.md @@ -40,6 +41,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ApiReference", "ApiReferenc Docs\ApiReference\Readme.md = Docs\ApiReference\Readme.md EndProjectSection EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BingMapsSDSToolkit.Standard", "Source\BingMapsSDSToolkit.Standard\BingMapsSDSToolkit.Standard.csproj", "{9A85F050-2979-40BC-9513-4DC86BF33D26}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDSToolkitConsoleApp.Core", "Samples\Console\SDSToolkitConsoleApp.Core\SDSToolkitConsoleApp.Core.csproj", "{99D07607-250A-44A9-B5D3-ED43C326B247}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -58,6 +63,14 @@ Global {FE6699B1-E03F-42FD-8555-83D3758D0787}.Debug|Any CPU.Build.0 = Debug|Any CPU {FE6699B1-E03F-42FD-8555-83D3758D0787}.Release|Any CPU.ActiveCfg = Release|Any CPU {FE6699B1-E03F-42FD-8555-83D3758D0787}.Release|Any CPU.Build.0 = Release|Any CPU + {9A85F050-2979-40BC-9513-4DC86BF33D26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A85F050-2979-40BC-9513-4DC86BF33D26}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A85F050-2979-40BC-9513-4DC86BF33D26}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A85F050-2979-40BC-9513-4DC86BF33D26}.Release|Any CPU.Build.0 = Release|Any CPU + {99D07607-250A-44A9-B5D3-ED43C326B247}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {99D07607-250A-44A9-B5D3-ED43C326B247}.Debug|Any CPU.Build.0 = Debug|Any CPU + {99D07607-250A-44A9-B5D3-ED43C326B247}.Release|Any CPU.ActiveCfg = Release|Any CPU + {99D07607-250A-44A9-B5D3-ED43C326B247}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -69,5 +82,10 @@ Global {69E38C4B-4B41-486D-8B01-570C8C1D7FC0} = {AC3A8636-6F98-45FB-A675-241E563E90C9} {FE6699B1-E03F-42FD-8555-83D3758D0787} = {CDEC08CC-3827-459E-87F6-517811CB14A3} {AEB4529E-4AEF-4D0B-9692-8CFBFF4365BF} = {FE243BC0-82EA-4C67-9990-2B825B66BB65} + {9A85F050-2979-40BC-9513-4DC86BF33D26} = {6E311F7C-45B1-46C0-96B4-D4BA2048C818} + {99D07607-250A-44A9-B5D3-ED43C326B247} = {CDEC08CC-3827-459E-87F6-517811CB14A3} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {08F90658-D4E7-4134-BA9C-B33155B6F970} EndGlobalSection EndGlobal diff --git a/Build/BingMapsSDSToolkit.nuspec b/Build/BingMapsSDSToolkit.nuspec index 9512878..8367a02 100644 --- a/Build/BingMapsSDSToolkit.nuspec +++ b/Build/BingMapsSDSToolkit.nuspec @@ -2,7 +2,7 @@ BingMapsSDSToolkit - 1.0.3 + 1.0.4 Bing Maps SDS Toolkit Microsoft microsoft bingmaps @@ -15,7 +15,30 @@ © Microsoft Corporation. All rights reserved. Microsoft "Bing Maps" Maps GIS Map Geospatial VB C# .NET REST - + + + + + + + + + + + + + + + + + + + + + + + + @@ -43,12 +66,18 @@ - - - + + + + + + + + + diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..50c421e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +## Version 1.0.4 - 11/27/2017 + +* Added support for .NET Standard 2.0 + +## Version 1.0.3 - 9/20/2017 + +* Initial Release \ No newline at end of file diff --git a/README.md b/README.md index 56a59de..d80ecb5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![Bing Maps Logo](https://github.com/Microsoft/Bing-Maps-V8-TypeScript-Definitions/blob/master/images/BingMapsLogoTeal.png) -[![NuGet](https://img.shields.io/badge/NuGet-1.0.3-blue.svg)](https://www.nuget.org/packages/BingMapsSDSToolkit) +[![NuGet](https://img.shields.io/badge/NuGet-1.0.4-blue.svg)](https://www.nuget.org/packages/BingMapsSDSToolkit) [![license](https://img.shields.io/badge/license-MIT-yellow.svg)](LICENSE) # Bing Maps Spatial Data Services (SDS) Toolkit for .NET @@ -35,6 +35,7 @@ Alternatively, if you are using the nuget command line: ## Supported Platforms * .NET Framework 4.5+ +* .NET Standard 2.0 * Universal Windows Platform (UWP) * Windows 10 * Windows 8.1 diff --git a/Samples/Console/SDSToolkitConsoleApp.Core/Program.cs b/Samples/Console/SDSToolkitConsoleApp.Core/Program.cs new file mode 100644 index 0000000..1a15285 --- /dev/null +++ b/Samples/Console/SDSToolkitConsoleApp.Core/Program.cs @@ -0,0 +1,63 @@ +using BingMapsSDSToolkit.GeocodeDataflowAPI; +using System; +using System.Collections.Generic; + +namespace SDSToolkitConsoleApp.Core +{ + class Program + { + static void Main(string[] args) + { + //This sample shows how to perform a back geocode request from a console app. + + var bingMapsKey = "YOUR_BING_MAPS_KEY"; + + var geocodeFeed = new GeocodeFeed() + { + Entities = new List() + { + new GeocodeEntity("New York, NY"), + new GeocodeEntity("Seattle, WA") + } + }; + + Console.WriteLine(string.Format("Creating batch geocode job consisting of {0} entities.\n", geocodeFeed.Entities.Count)); + + var geocodeManager = new BatchGeocodeManager(); + var r = geocodeManager.Geocode(geocodeFeed, bingMapsKey).GetAwaiter().GetResult(); + + if (!string.IsNullOrEmpty(r.Error)) + { + Console.WriteLine("Error: " + r.Error); + } + else + { + Console.WriteLine("Batch geocode job complete:\n"); + + if (r.Succeeded != null && r.Succeeded.Entities != null) + { + Console.WriteLine(string.Format("Succeeded: {0}\n", r.Succeeded.Entities.Count)); + + Console.WriteLine("Query\tLatitude\tLongitude\n----------------------------------"); + foreach (var e in r.Succeeded.Entities) + { + Console.WriteLine(string.Format("{0}\t{1}\t{2}", e.GeocodeResponse[0].Name, e.GeocodeResponse[0].GeocodePoint[0].Latitude, e.GeocodeResponse[0].GeocodePoint[0].Longitude)); + } + } + + if (r.Failed != null && r.Failed.Entities != null) + { + Console.WriteLine(string.Format("Failed: {0}\n", r.Failed.Entities.Count)); + + Console.WriteLine("Query\n-----------"); + foreach (var e in r.Failed.Entities) + { + Console.WriteLine(e.GeocodeRequest.Query); + } + } + } + + Console.ReadLine(); + } + } +} diff --git a/Samples/Console/SDSToolkitConsoleApp.Core/SDSToolkitConsoleApp.Core.csproj b/Samples/Console/SDSToolkitConsoleApp.Core/SDSToolkitConsoleApp.Core.csproj new file mode 100644 index 0000000..06e59a4 --- /dev/null +++ b/Samples/Console/SDSToolkitConsoleApp.Core/SDSToolkitConsoleApp.Core.csproj @@ -0,0 +1,12 @@ + + + + Exe + netcoreapp2.0 + + + + + + + diff --git a/Samples/Console/SDSToolkitConsoleApp/SDSToolkitConsoleApp.csproj b/Samples/Console/SDSToolkitConsoleApp/SDSToolkitConsoleApp.csproj index 0a542b5..0c70d80 100644 --- a/Samples/Console/SDSToolkitConsoleApp/SDSToolkitConsoleApp.csproj +++ b/Samples/Console/SDSToolkitConsoleApp/SDSToolkitConsoleApp.csproj @@ -11,6 +11,8 @@ v4.5.2 512 true + + AnyCPU @@ -58,9 +60,11 @@ - - - - + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + \ No newline at end of file diff --git a/Samples/Console/SDSToolkitConsoleApp/packages.config b/Samples/Console/SDSToolkitConsoleApp/packages.config index 9498b49..0ee4e17 100644 --- a/Samples/Console/SDSToolkitConsoleApp/packages.config +++ b/Samples/Console/SDSToolkitConsoleApp/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/Samples/WPF/BingSDSTestApp/BingSDSTestApp.csproj b/Samples/WPF/BingSDSTestApp/BingSDSTestApp.csproj index b40945a..d171d22 100644 --- a/Samples/WPF/BingSDSTestApp/BingSDSTestApp.csproj +++ b/Samples/WPF/BingSDSTestApp/BingSDSTestApp.csproj @@ -14,6 +14,8 @@ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 + + AnyCPU @@ -143,15 +145,12 @@ - - - - - - - - - + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + +