Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 102 additions & 15 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,24 @@ on:

jobs:
build:
name: Build
runs-on: ubuntu-latest
outputs:
semver: ${{ steps.gitversion.outputs.semVer }}

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

# Setup .Net SDKs
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

Expand All @@ -38,17 +37,21 @@ jobs:
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-restore --configuration Release
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-output
path: '**/bin/Release'

# Get the version information
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
uses: gittools/actions/gitversion/setup@v3.0
if: ${{ success() && contains(github.event_name, 'push') }}
with:
versionSpec: '5.x'
- name: Determine Version
uses: gittools/actions/gitversion/execute@v0.9.7
id: gitversion
uses: gittools/actions/gitversion/execute@v3.0
if: ${{ success() && contains(github.event_name, 'push') }}
with:
useConfigFile: true
Expand All @@ -57,12 +60,96 @@ jobs:
run: |
echo "SemVer: $GITVERSION_SEMVER"

# Package and publish
test-linux:
name: Test (Linux)
needs: build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Restore
run: dotnet restore

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-output

- name: Test (net6.0)
run: dotnet test --no-build --configuration Release --framework net6.0
- name: Test (net8.0)
run: dotnet test --no-build --configuration Release --framework net8.0

test-windows:
name: Test (Windows)
needs: build
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v4
with:
dotnet-version: '3.1.x'
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Restore
run: dotnet restore

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-output

- name: Test (netcoreapp3.1)
run: dotnet test --no-build --configuration Release --framework netcoreapp3.1
- name: Test (net48)
run: dotnet test --no-build --configuration Release --framework net48

publish:
name: Package and Publish
needs: [build, test-linux, test-windows]
runs-on: ubuntu-latest
if: ${{ success() && contains(github.event_name, 'push') }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-output
- name: Package
if: ${{ success() && contains(github.event_name, 'push') }}
run: dotnet pack --no-build --configuration Release --output ./Packages -p:PackageVersion=$GITVERSION_SEMVER
run: dotnet pack --no-build --configuration Release --output ./Packages -p:PackageVersion=${{ needs.build.outputs.semver }}
- name: Push
if: ${{ success() && contains(github.event_name, 'push') }}
run: |
cd Packages
dotnet nuget push "*.nupkg" --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY
Expand Down
13 changes: 13 additions & 0 deletions src/Geo.ArcGIS/Abstractions/IArcGISGeocoding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace Geo.ArcGIS
{
using System;
using System.Threading;
using System.Threading.Tasks;
using Geo.ArcGIS.Models.Parameters;
Expand All @@ -16,13 +17,24 @@ namespace Geo.ArcGIS
/// </summary>
public interface IArcGISGeocoding
{
/// <summary>
/// Calls the ArcGIS findAddressCandidates API and returns the results.
/// Supports both single-line and structured (multi-field) address input.
/// </summary>
/// <param name="parameters">A <see cref="FindAddressCandidatesParameters"/> with the parameters of the request.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> used to cancel the request.</param>
/// <returns>A <see cref="CandidateResponse"/> with the response from ArcGIS.</returns>
/// <exception cref="GeoNETException">Thrown for multiple different reasons. Check the inner exception for more information.</exception>
Task<CandidateResponse> FindAddressCandidatesAsync(FindAddressCandidatesParameters parameters, CancellationToken cancellationToken = default);

/// <summary>
/// Calls the ArcGIS address candidate API and returns the results.
/// </summary>
/// <param name="parameters">A <see cref="AddressCandidateParameters"/> with the parameters of the request.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> used to cancel the request.</param>
/// <returns>A <see cref="CandidateResponse"/> with the response from ArcGIS.</returns>
/// <exception cref="GeoNETException">Thrown for multiple different reasons. Check the inner exception for more information.</exception>
[Obsolete("Use FindAddressCandidatesAsync instead.")]
Task<CandidateResponse> AddressCandidateAsync(AddressCandidateParameters parameters, CancellationToken cancellationToken = default);

/// <summary>
Expand All @@ -32,6 +44,7 @@ public interface IArcGISGeocoding
/// <param name="cancellationToken">A <see cref="CancellationToken"/> used to cancel the request.</param>
/// <returns>A <see cref="CandidateResponse"/> with the response from ArcGIS.</returns>
/// <exception cref="GeoNETException">Thrown for multiple different reasons. Check the inner exception for more information.</exception>
[Obsolete("Use FindAddressCandidatesAsync instead.")]
Task<CandidateResponse> PlaceCandidateAsync(PlaceCandidateParameters parameters, CancellationToken cancellationToken = default);

/// <summary>
Expand Down
130 changes: 0 additions & 130 deletions src/Geo.ArcGIS/Converters/AttributeConverter.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@

namespace Geo.ArcGIS.Models.Parameters
{
using System;

/// <summary>
/// A parameters object for the address candidates ArcGIS request.
/// </summary>
[Obsolete("Use FindAddressCandidatesParameters instead.")]
public class AddressCandidateParameters : StorageParameters, IClientCredentialsParameters
{
/// <summary>
Expand Down
Loading
Loading