Namespace IntentSharp.Mapping
Classes
- CompiledMapping
One revision of a compiled mapping: the steps a model compiled once for a key (the input and output shapes, the intent and the declarations), which then run in process on every input with that key. A store keeps one row per namespace, key and revision. No input value is held anywhere in the row.
- InMemoryMappingStore
A mapping store in this process's memory: the rows and the replacement cap are lost when the process ends and are not shared with other processes. It holds at most a set number of keys; storing a new key in a full store removes the key used least recently, with every revision of it and its replacement cap. Rows are copied in and out, so a row a caller holds never changes the stored one. Thread-safe.
- MappingArgs
The arguments of one MappingStep. Every member is optional here; each op takes a fixed set, and a mapping that sets an argument its op does not take, or leaves out one it needs, is refused.
- MappingCase
One entry of a Lookup table or a Switch: a key of the closed set and what it maps to.
- MappingConverterInfo
One converter of a MappingConverterRegistry: its name, version and types, as the compile is told them.
- MappingConverterRegistry
The converters a client's compiled mappings may call by name with Convert: your own code, for what the closed vocabulary does not express, such as a unit conversion, a check digit or a lookup in your own tables. A stored mapping holds only a converter's name, so nothing from a file or a store row is ever run as code. Register converters with WithMappingConverters(Action<MappingConverterRegistry>); each client keeps its own copy.
- MappingFailure
One step of a compiled mapping that failed on an input. The message describes a value only by its mask (digits as 9, letters as A, other characters as they are, at most 32 characters), never by the value itself.
- MappingFormatException
Thrown by Parse(string) when the text is not a compiled mapping this library can load.
- MappingOptions
Options for one compiled-mapping call: the request options of the compile, the namespace, what the caller declares about the input, the golden samples, and how a stored mapping is reused, replaced and checked. A call never changes the options instance you pass to it.
- MappingProvenance
How a compiled mapping was compiled: the provider and model, the attempts, the tokens and the time. This is compile-time provenance, never the source of a reused answer: when a stored mapping runs on an input, no model sees it.
- MappingRetiredReason
Why a revision of a compiled mapping was retired. It names the step, op, path and category of a failure and never an input value.
- MappingSample
A golden sample: an input and the output a mapping must produce for it. Golden samples are part of the mapping key and of the compile, and every compile and replacement must reproduce them exactly; they are never stored.
- MappingStats
Counts of what one client's compiled-mapping calls did since the client was created, taken at one moment. They are counts of events in this process, not estimates, and other processes on the same store are not included.
- MappingStep
One step of a compiled mapping: an op from the closed vocabulary that reads its sources and writes one target member. Paths are JSON Pointers over wire names (
/customer/name); inside Each the nested steps' paths are relative to the array item, and the empty pointer names the item itself.
- MappingUnproven
An output member whose source the samples did not prove, for example a copy from one of two fields that were equal in every sample. Recorded on the stored mapping and reported in the result's warnings.
- SourceFormat
What the caller declares about the format of one input member, so that a mapping may parse, split or join it without guessing. A declaration is part of the mapping key: changing it compiles the mapping again.
Interfaces
- IMappingStore
Where compiled mappings are kept: one row per namespace, key and revision. Implement it on storage your processes share, so that every process serves the same mapping for a key; InMemoryMappingStore keeps rows in one process. Nothing is shared across namespaces.
Enums
- FormatSource
Where the formats of a date parse step came from.
- MappingFailureCategory
Why a step of a compiled mapping failed on an input.
- MappingKind
What a compiled mapping maps between.
- MappingOp
The closed vocabulary a compiled mapping is written in. Each op reads its sources and writes one target member; no op evaluates an expression, runs a regular expression or reads meaning from text. A stored mapping that names an op this library does not know fails to load. In JSON each op is written in camel case, such as
"parseDate".
- MappingStatus
The state of one revision of a compiled mapping in a store.
- OnReuseFailure
What a stored mapping does when one of its steps fails to read an input.