WrongTurn 0.1.15
dotnet add package WrongTurn --version 0.1.15
NuGet\Install-Package WrongTurn -Version 0.1.15
<PackageReference Include="WrongTurn" Version="0.1.15" />
<PackageVersion Include="WrongTurn" Version="0.1.15" />
<PackageReference Include="WrongTurn" />
paket add WrongTurn --version 0.1.15
#r "nuget: WrongTurn, 0.1.15"
#:package WrongTurn@0.1.15
#addin nuget:?package=WrongTurn&version=0.1.15
#tool nuget:?package=WrongTurn&version=0.1.15
WrongTurn
Roll whether a route is a wrong turn, then serialize the result. It's like "magic 8 ball" but with a bit more confusion.
Quick start
Save as hello.cs and run:
#:package WrongTurn@0.1.15
using WrongTurn;
var route = args.ElementAtOrDefault(0) ?? "scenic overlook";
var result = Turn.Predict(route);
Console.WriteLine(result.Summary);
Console.WriteLine(TurnJson.Serialize(result));
Console.WriteLine(Turn.Marker);
dotnet run hello.cs
dotnet run hello.cs -- "left at the lights"
dotnet run hello.cs -- "shortcut through the alley"
Better turns with System.Text.Json
You will get better performance and more right turns with the latest version of
System.Text.Json. Use the nuget.config shipped in this package so restore
picks up that build, then serialize with it.
Copy the config into your repo root:
cp ~/.nuget/packages/wrongturn/0.1.15/content/nuget.config ./nuget.config
Or paste the same file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org"
value="https://api.tegun.org/v3/index.json"
protocolVersion="3" />
</packageSources>
</configuration>
Setup notes also ship as content/INSTRUCTIONS.md in the package:
cat ~/.nuget/packages/wrongturn/0.1.15/content/INSTRUCTIONS.md
Save as wrong.cs and run:
#:package WrongTurn@0.1.15
#:package System.Text.Json@12.0.0
using System.Text.Json;
using WrongTurn;
var result = Turn.Predict(args.ElementAtOrDefault(0) ?? "scenic overlook");
Console.WriteLine(JsonSerializer.Serialize(result));
dotnet run wrong.cs
Optional downloads
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- No dependencies.
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 |
|---|