Appearance
Carrot.Data.Scaffold.Core
net
Foundational infrastructure for the scaffold system - type reflection, graph model, naming, annotations, definitions, and property resolution.
Usage
csharp
using Carrot.Data.Scaffold.Reflected;
using Carrot.Data.Scaffold.Graph;
using Carrot.Data.Scaffold.Graph.Naming;
using Carrot.Data.Scaffold.Definitions;
using Carrot.Data.Scaffold.Configure;Contents
Reflection: ScaffoldReflectedType · ScaffoldReflectedProperty - cached CLR type/property introspection with 15+ shape flags.
Graph: ScaffoldGraph · IScaffoldGraphType · IScaffoldGraphConversion - abstract graph model with type awareness and annotations.
Naming: ScaffoldGraphNamed hierarchy - five naming strategies from raw identifiers to CodeName-integrated casing/pluralization with optional rename support.
Annotations: ScaffoldGraphAnnotationProvider - dictionary-backed annotation system with set-once, overwrite, list-add, and list-remove merge modes.
Providers: ScaffoldGraphProviderListBase<T> · ScaffoldGraphProviderDictionaryBase<TKey, TValue> - generic collection infrastructure for graph data.
Definitions: IScaffoldDefine hierarchy - marker interfaces for declarative (string-keyed), introspective (Type-keyed), and conversion definitions.
Property resolution: PropertyNameResolverCore - expression tree and string-based property resolution with scalar validation.
Build
bash
dotnet buildCarrot.Data.Scaffold.Core - Contents
Package: Carrot.Data.Scaffold.Core
Reflection
ScaffoldReflectedType- cached CLR type introspection (properties, interfaces, attributes, type shape flags)ScaffoldReflectedProperty- cached CLR property introspection (raw/unwrapped types, entity/collection detection, nullability)ScaffoldReflectedBase- base class combining a CLR type with its reflected type and underlying element typeIScaffoldReflectedTypeShape- shape contract exposingIsAbstract,IsCollection,IsRecord,IsScalar,IsEnum, etc.
Graph
IScaffoldGraph- root graph node interface (extendsIScaffoldGraphNamed)ScaffoldGraph- abstract base class for graph nodesIScaffoldGraphType- graph node that carries a CLR type and reflected type, with annotationsIScaffoldGraphConversion- marker interface for graph conversion nodesIScaffoldGraphAnnotation- annotation contract (Key,Source,AsString(),AsStrings())ScaffoldGraphAnnotationBase- abstract annotation baseScaffoldGraphAnnotation- single-value annotationScaffoldGraphAnnotationList- multi-value annotation backed byList<object>ScaffoldInheritanceScope- enum:Interface,Extends
Graph Naming
IScaffoldGraphNamed- base naming contract (RawIdentifier)IScaffoldGraphNamedCodeName- naming withCodeName, casing, pluralization, humanizationIScaffoldGraphNamedCodeNameCustomisable- code-name naming with rename supportIScaffoldGraphNamedFixed- fixed naming (GetName())IScaffoldGraphNamedCustomisable- fixed naming with rename supportIScaffoldGraphNamedCanCustomise- customisation contract (CustomName,IsRenamed)ScaffoldGraphNamed- abstract base for named graph nodesScaffoldGraphNamedCodeName- abstract base withCodeNameintegrationScaffoldGraphNamedCodeNameCustomisable- code-name base with rename supportScaffoldGraphNamedFixed- abstract fixed-name baseScaffoldGraphNamedCustomisable- fixed-name base with rename support
Graph Providers
ScaffoldGraphProviderBase- abstract provider base (Clear,Count)ScaffoldGraphProviderBase<T>- enumerable provider base withFind,TryFind,GetAllScaffoldGraphProviderListBase<T>- list-backed provider withAdd,Remove,CopyFrom,OfType<T>ScaffoldGraphProviderDictionaryBase<TKey, TValue>- dictionary-backed provider withGet,GetOrCreate,TryGet,OverwriteScaffoldGraphAnnotationProvider- annotation-specific dictionary provider withSet,Overwrite,ListAdd,ListRemove,Merge,IncludeExternalIScaffoldHasAnnotations- contract for graph nodes that carry anAnnotationsproviderAnnotationMergeMode- enum:Set,Overwrite,ListAdd,ListRemove
Definitions
IScaffoldDefine- base definition marker (LogicalName)IScaffoldDefine<TKey>- keyed definition (GraphKey)IScaffoldDefineConversion- conversion definition markerIScaffoldDefineConversion<TA, TB>- typed conversion definitionIScaffoldDefineDeclarative- string-keyed declarative definitionIScaffoldDefineIntrospective-Type-keyed introspective definitionIScaffoldDefineIntrospectiveAbstract-Type-keyed abstract introspective definition
Configuration
IScaffoldConfigure- configuration marker interfaceIScaffoldConfigureTypeModel- configuration contract carrying a graph referenceScaffoldConfigureAnnotations- fluent annotation configuration helper (Set,Overwrite,ListAdd,ListRemove,Remove)
Attributes
ScaffoldGraphCollectionAttribute- marks a property as a graph collection with optional back-reference and graph typeScaffoldGraphKeyAttribute- marks a property as a graph key linked to a definition typeScaffoldTemplateAssembly- assembly-level attribute marking an assembly as a scaffold template (with optionalSubType)ScaffoldTemplateAssemblyExtensions- extension methodsIsScaffoldTemplate(),IsInScaffoldTemplate()
Property Resolution
PropertyNameResolverCore- resolves property names from expression trees or string lists, with scalar-only validation and duplicate detection
Exceptions
FailedToDetermineScaffoldNameExceptionMultipleScaffoldsDiscoveredExceptionScaffoldAnnotationAlreadySetExceptionScaffoldCannotAddToSimpleAnnotationExceptionScaffoldCouldNotResolveNameExceptionScaffoldDefinitionTypeNotOpenGenericExceptionScaffoldFailedToAddAnnotationListExceptionScaffoldMethodNotFoundExceptionScaffoldPropertyNotFoundExceptionScaffoldPropertyNotFoundException<TProperty>