Tuc.DomainResolver
3.1.0
dotnet add package Tuc.DomainResolver --version 3.1.0
NuGet\Install-Package Tuc.DomainResolver -Version 3.1.0
<PackageReference Include="Tuc.DomainResolver" Version="3.1.0" />
paket add Tuc.DomainResolver --version 3.1.0
#r "nuget: Tuc.DomainResolver, 3.1.0"
// Install Tuc.DomainResolver as a Cake Addin #addin nuget:?package=Tuc.DomainResolver&version=3.1.0 // Install Tuc.DomainResolver as a Cake Tool #tool nuget:?package=Tuc.DomainResolver&version=3.1.0
Domain Resolver
Library for resolving a Domain types out of a F# script (
.fsx
) file(s).
Example
The process of this use-case is a collecting interactions by the users.
User interacts with the GenericService, which sends an interaction to the interaction collector service. Interaction collector service identify a person and accepts an interaction.
It is just a simplified real-life process.
Note: All files are in the example dir.
consentsDomain.fsx
// Common types
type Id = UUID
type Stream<'Event> = Stream of 'Event list
type StreamHandler<'Event> = StreamHandler of ('Event -> unit)
// Types
type InteractionEvent =
| Confirmation
| Rejection
type InteractionResult =
| Accepted
| Error
type IdentityMatchingSet = {
Contact: Contact
}
and Contact = {
Email: Email option
Phone: Phone option
}
and Email = Email of string
and Phone = Phone of string
type Person =
| Known of PersonId
| Unknown
and PersonId = PersonId of Id
// Streams
type InteractionCollectorStream = InteractionCollectorStream of Stream<InteractionEvent>
// Services
type GenericService = Initiator
type InteractionCollector = {
PostInteraction: InteractionEvent -> InteractionResult
}
type PersonIdentificationEngine = {
OnInteractionEvent: StreamHandler<InteractionEvent>
}
type PersonAggregate = {
IdentifyPerson: IdentityMatchingSet -> Person
}
type ConsentManager = {
GenericService: GenericService
InteractionCollector: InteractionCollector
}
Development
First run:
./build.sh # or build.cmd if your OS is Windows (might need ./build Build here)
Everything is done via build.cmd
\ build.sh
(for later on, lets call it just build
).
- to run a specific target use
build -t <target>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- FSharp.Compiler.Service (>= 43.8.100 && < 44.0.0)
- FSharp.Core (>= 8.0.100 && < 9.0.0)
- FSharp.Data (>= 6.3.0 && < 7.0.0)
- MF.ConsoleApplication (>= 6.0.0 && < 7.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Tuc.DomainResolver:
Package | Downloads |
---|---|
Tuc.Parser
A parser for TUC files. |
GitHub repositories
This package is not used by any popular GitHub repositories.