Diamond.Core.Workflow
10.0.0
dotnet add package Diamond.Core.Workflow --version 10.0.0
NuGet\Install-Package Diamond.Core.Workflow -Version 10.0.0
<PackageReference Include="Diamond.Core.Workflow" Version="10.0.0" />
<PackageVersion Include="Diamond.Core.Workflow" Version="10.0.0" />
<PackageReference Include="Diamond.Core.Workflow" />
paket add Diamond.Core.Workflow --version 10.0.0
#r "nuget: Diamond.Core.Workflow, 10.0.0"
#:package Diamond.Core.Workflow@10.0.0
#addin nuget:?package=Diamond.Core.Workflow&version=10.0.0
#tool nuget:?package=Diamond.Core.Workflow&version=10.0.0
HERE.GpsSimulator
The example code demonstrates how to use the HERE API to create a route between two points and then simulate GPS pings along the route and a specified interval. The output is written to a JSON file. The code sample is written for truck routing but can be easily adapted for other modes of transportation.
Example command line:
HERE.GpsSimulator generate --origin "600 E Grand Avenue, Chicago IL" --destination "1300 Fox St Denver CO 80204"
--departuretime "11/21/2021 11:00 AM" --grossweight 75000 --interval 00:15:00 --axlecount 5 --trailercount 1
--trucktype tractor --routingmode short --regulation true --lastrest 2
--outputfile "%USERPROFILE%/Desktop/gps-data.json"
Type HERE.GpsSimulator -h for parameter info. You will get the output shown below.
HERE.GpsSimulator
Usage:
HERE.GpsSimulator [options] [command]
Options:
--version Show version information
-?, -h, --help Show help and usage information
Commands:
generate Generates GPS pings from a specified origin point to a destination point.
For specific command help, type HERE.GpsSimulator -h [command]. For example, -h generate gives the output shown below.
generate
Generates GPS pings from a speified origin point to a destination point.
Usage:
HERE.GpsSimulator [options] generate
Options:
-o, --origin <origin> (REQUIRED) A location defining the origin of the trip.
-d, --destination <destination> (REQUIRED) A location defining the destination of the trip.
-p, --departuretime <departuretime> Specifies the time of departure. The default is the current date and time.
-g, --grossweight <grossweight> Vehicle weight including trailers and shipped goods, in LBS. The default is 75,000.
-a, --axlecount <axlecount> Defines total number of axles in the vehicle. Default is 5.
-c, --trailercount <trailercount> Number of trailers attached to the vehicle. Default is 1.
-t, --type <type> Specifies the type of truck. Possible values are 'Straight' or 'Tractor'. The default is Tractor.
-m, --routingmode <routingmode> Specifies which optimization is applied during route calculation. Can be 'Fast' or 'Short'. The default is Short.
-i, --interval <interval> Specifies the interval used to generate GPS updates. The default is every 15 minutes.
-r, --regulation <regulation> Specifies whether US driver regulations should be observed. The default is True.
-h, --lastrest <lastrest> Specifies the number of hours since the driver's last rest before picking up the load. The default is 0.
-f, --outputfile <outputfile> Specifies the full path to the JSON output file.
-?, -h, --help Show help and usage information Show help and usage information
HERE.Api and HERE.Api.Example
Example code to Authenticate to the HERE.com REST API in C# using OAuth 1.0 and OAuth 2.0. Also demonstrates a map request and Geo Code request.
using System;
using System.Diagnostics;
using System.IO;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
namespace Here.Api.Example
{
class Program
{
static async Task Main(string[] args)
{
//
// Go to your project at here.com and create OAuth 2.0 (JSON Web Tokens) credentials. This will prompt you
// to download a file named credentials.properties. Copy it to this project folder.
//
HereCredentials credentials = HereCredentials.FromFile("./credentials.properties");
IHereTokenFactory hereTokenFactory = new HereTokenFactory();
HereToken token = await hereTokenFactory.CreateTokenAsync(credentials);
//
// Get a sample map image.
//
using (HttpClient client = hereTokenFactory.CreateHttpClient(token))
{
byte[] imageData = await client.GetByteArrayAsync("https://1.base.maps.ls.hereapi.com/maptile/2.1/maptile/newest/normal.day/13/4400/2686/256/png8");
//
// Save the image to a temporary file.
//
string tempFile = $"{Path.GetTempFileName()}.png";
await File.WriteAllBytesAsync(tempFile, imageData);
//
// Open the image with the default system viewer.
//
Process.Start(new ProcessStartInfo(tempFile) { UseShellExecute = true });
}
//
// Use the GeoCode service to find and address.
//
IHereGeoCodeService hereGeoCodeService = new HereGeoCodeService();
(HereGeoCodeList result, HereApiError error) = await hereGeoCodeService.FindAddressAsync(token, new HereAddress()
{
Street = "600 E. Grand Avenue",
City = "Chicago",
State = "IL"
});
if (error == null)
{
Console.WriteLine($"Result: {result.Items[0].Title}, {result.Items[0].Id}");
}
else
{
Console.WriteLine($"Error: {error.Title}");
}
}
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Diamond.Core.Abstractions (>= 10.0.0)
- Diamond.Core.System.TemporaryFolder (>= 10.0.0)
- Diamond.Core.Workflow.Abstractions (>= 10.0.0)
- Diamond.Core.Workflow.State (>= 10.0.0)
- Humanizer.Core (>= 2.14.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- TryDisposable (>= 10.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.0 | 0 | 11/15/2025 |
| 9.2.0 | 93 | 10/18/2025 |
| 9.1.0 | 220 | 7/16/2025 |
| 9.0.2 | 214 | 6/23/2025 |
| 9.0.1 | 226 | 5/7/2025 |
| 9.0.0 | 211 | 11/14/2024 |
| 8.0.5 | 240 | 9/11/2024 |
| 8.0.4 | 201 | 7/4/2024 |
| 8.0.3 | 181 | 7/4/2024 |
| 8.0.2 | 184 | 5/27/2024 |
| 8.0.1 | 407 | 2/5/2024 |
| 8.0.0 | 708 | 11/25/2023 |
| 7.0.0 | 1,174 | 11/19/2022 |
| 6.0.17 | 1,138 | 11/4/2022 |
| 6.0.16 | 1,134 | 11/2/2022 |
| 6.0.15 | 1,172 | 10/20/2022 |
| 6.0.14 | 1,239 | 6/15/2022 |
| 6.0.13 | 1,193 | 5/28/2022 |
| 6.0.12 | 1,183 | 5/10/2022 |
| 6.0.9 | 1,203 | 4/30/2022 |
| 6.0.7 | 1,213 | 4/2/2022 |
| 6.0.5 | 1,209 | 3/26/2022 |
| 6.0.2 | 1,269 | 1/16/2022 |
| 6.0.0 | 1,863 | 11/20/2021 |
| 5.1.0 | 1,152 | 11/19/2021 |
| 5.0.9 | 1,153 | 3/21/2021 |
| 5.0.8 | 1,140 | 3/19/2021 |
| 5.0.5 | 1,138 | 3/8/2021 |
| 5.0.1 | 1,130 | 2/21/2021 |
| 5.0.0 | 1,169 | 2/19/2021 |
| 5.0.0-rc.9 | 288 | 2/19/2021 |
| 5.0.0-rc.8 | 298 | 2/18/2021 |
| 5.0.0-rc.7 | 282 | 2/17/2021 |
| 5.0.0-rc.6 | 271 | 2/16/2021 |
| 5.0.0-rc.5 | 317 | 2/15/2021 |
| 5.0.0-rc.4 | 280 | 2/15/2021 |
| 5.0.0-rc.3 | 284 | 2/14/2021 |
| 5.0.0-rc.2 | 270 | 2/12/2021 |
| 5.0.0-rc.1 | 285 | 2/11/2021 |