Taskr.DrivingRest
0.1.0
dotnet add package Taskr.DrivingRest --version 0.1.0
NuGet\Install-Package Taskr.DrivingRest -Version 0.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Taskr.DrivingRest" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Taskr.DrivingRest" Version="0.1.0" />
<PackageReference Include="Taskr.DrivingRest" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Taskr.DrivingRest --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Taskr.DrivingRest, 0.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Taskr.DrivingRest@0.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Taskr.DrivingRest&version=0.1.0
#tool nuget:?package=Taskr.DrivingRest&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Taskr.DrivingRest
Taskr.DrivingRest is a lightweight .NET library that validates driver activity logs against core EU driving and rest-time constraints (Regulation (EC) No 561/2006).
It is designed for:
- fleet compliance checks
- tachograph ingestion pipelines
- simulation and rule-testing workflows
Highlights
- Stateless validator API
- Deterministic violation codes and windows
- Input contract checks (ordering, overlap, duration)
- Unit-tested rule behavior (
13tests currently)
Quick Start
using Taskr.DrivingRest;
var dayStart = new DateTime(2026, 1, 5, 0, 0, 0);
var log = new DriverActivityLog
{
DriverId = "driver-42",
Activities =
[
new()
{
Type = DriverActivityType.Rest,
Start = dayStart,
End = dayStart.AddHours(11)
},
new()
{
Type = DriverActivityType.Driving,
Start = dayStart.AddHours(11),
End = dayStart.AddHours(15.5)
},
new()
{
Type = DriverActivityType.Break,
Start = dayStart.AddHours(15.5),
End = dayStart.AddHours(16.25)
},
new()
{
Type = DriverActivityType.Driving,
Start = dayStart.AddHours(16.25),
End = dayStart.AddHours(18.5)
},
]
};
var violations = DrivingRestValidator.Validate(log);
foreach (var v in violations)
Console.WriteLine($"{v.Code} ({v.Article}): {v.Description}");
Requirements
- .NET SDK
10.0
Install
Install from NuGet:
dotnet add package Taskr.DrivingRest
Supported Rules
| Violation code | Regulation article | What is checked |
|---|---|---|
561/2006-ART7 |
Article 7 | Max 4h30 continuous driving without qualifying break |
561/2006-ART6-DAILY |
Article 6(1) | Daily driving exceeds 10h |
561/2006-ART6-DAILY-EXTENSIONS |
Article 6(1) | More than 2 extended driving days (>9h) in one week |
561/2006-ART6-WEEKLY |
Article 6(2) | Weekly driving exceeds 56h |
561/2006-ART6-FORTNIGHT |
Article 6(3) | Consecutive 2-week driving exceeds 90h |
561/2006-ART8-DAILY-REST-24H |
Article 8(2) | Qualifying daily/weekly rest not started within 24h |
561/2006-ART8-REDUCED-DAILY-REST |
Article 8(4) | More than 3 reduced daily rests between weekly rests |
561/2006-ART8-WEEKLY-REST-INTERVAL |
Article 8(6) | Weekly rest started too late (>6 x 24h interval) |
DATA-DRIVER-ID |
Input contract | Missing/blank DriverId |
DATA-ACTIVITY-DURATION |
Input contract | Activity with End <= Start |
DATA-ACTIVITY-ORDER |
Input contract | Activities not in chronological order |
DATA-ACTIVITY-OVERLAP |
Input contract | Overlapping activities |
Public API
DrivingRestValidator.Validate(DriverActivityLog driver)→List<DrivingRestViolation>DriverActivityLogDriverId(string, required)Activities(List<DriverActivity>)
DriverActivityType(DriverActivityType)Start/End(DateTime, required)Duration(TimeSpan, computed)
DrivingRestViolationCode,Article,DescriptionWindowStart,WindowEndActual,Allowed
DriverActivityTypeDriving,Break,Rest,OtherWork,Availability
Build & Test
dotnet build DrivingRestRegulation.slnx
dotnet test DrivingRestRegulation.slnx
License
This project is licensed under the MIT License. See LICENSE.
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.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 |
|---|---|---|
| 0.1.0 | 74 | 2/20/2026 |