Namespace Cratis.Concepts

Classes

ConceptAsTypeConverter<TConcept, TValue>

Represents a TypeConverter for handling conversion of concept as represented as its value type.

ConceptAs<T>

Expresses a Concept as a another type, usually a primitive such as Guid, Int or String.

ConceptExtensions

Provides extensions related to types and others related to ConceptAs<T>.

ConceptFactory

Factory to create an instance of a ConceptAs<T> from the Type and Underlying value.

ConceptMap

Maps a concept type to the underlying primitive type.

EmptyPatternSupport

The exception that is thrown when no pattern values have an emittable check digit.

GenerateValue

Generates values using cryptographically secure randomness.

GenerationTimeBeforeUnixEpoch

The exception that is thrown when the generation time precedes the Unix epoch.

InvalidByteCount

The exception that is thrown when a random byte count is outside the supported range.

InvalidIntegerRange

The exception that is thrown when an integer generation range is inverted.

InvalidNanoIdAlphabet

The exception that is thrown when a NanoID alphabet is not distinct printable ASCII of the supported length.

InvalidNanoIdSize

The exception that is thrown when a NanoID size is outside the supported range.

InvalidTypeIdPrefix

The exception that is thrown when a TypeID prefix does not satisfy its format.

InvalidValuePattern

The exception that is thrown when a value pattern is invalid or exceeds a construction budget.

MissingGenerationTime

The exception that is thrown when a generation context has no captured time.

PatternRequiresGenerationContext

The exception that is thrown when a pattern with date segments is generated without a context.

StringExtensions

Provides extensions related to strings and conecpts.

TypeIsNotAConcept

Exception that gets thrown when a Type is not a ConceptAs<T>.

TypesExtensions

Provides extensions related to working with ITypes.

UnknownChecksum

The exception that is thrown when a checksum algorithm is undefined or none is supplied for validation.

UnknownValueEncoding

The exception that is thrown when a random byte encoding is undefined.

Structs

GenerationContext

Carries the operation's captured time and portable tenant identifier for value generation.

Interfaces

IGeneratableInContext<TSelf>

Defines a value that can create a new instance using the operation's time or tenant.

IGeneratable<TSelf>

Defines a value that can create a new instance of itself.

Enums

Checksum

Identifies the check digits appended to a generated pattern.

ValueEncoding

Defines the text encoding of randomly generated bytes.