Overview

MappingManager (namespace TheTechIdea.Beep.Editor.Mapping) is a static partial class that manages all field-level mappings between source and destination entities. It spans 8 partial files covering every phase of the mapping lifecycle:

MappingManager (static partial class)
├── MappingManager.cs                  ← CRUD: CreateEntityMap / Load / Save / Map / Apply
├── MappingManager.Conventions.cs      ← AutoMapByConvention, NameMatchMode, MappingDiff
├── MappingManager.AutoMatching.cs     ← AutoMapByConventionWithScoring, confidence engine
├── MappingManager.ConversionPipeline.cs ← Typed conversion, field transform chains, policy
├── MappingManager.ObjectGraph.cs      ← Nested POCO / collection graph mapping
├── MappingManager.Rules.cs            ← Rule-set validation, execution traces, priorities
├── MappingManager.ValidationScoring.cs ← Quality score (0-100), drift detection
└── MappingManager.Governance.cs       ← Versioning, approval state, audit trail

AutoObjMapper (separate class — lightweight POCO mapper)
└── Core / Configuration / Interfaces / Extensions / Utilities

Core data types (from Beep.Workflow)

TypeDescription
EntityDataMapRoot mapping object — one per destination entity. Contains MappingName, EntityFields, and a list of EntityDataMap_DTL (one per source entity)
EntityDataMap_DTLMapping detail for one source entity — contains FieldMapping list and SelectedDestFields
Mapping_rep_fieldsSingle field-level mapping — FromFieldName, ToFieldName, ToFieldType, Rules

Quick Start

Create and apply a mapping

// 1. Create mapping from source → destination entity
var (errInfo, mapping) = MappingManager.CreateEntityMap(
    dmeEditor,
    srcEntityName:  "Contacts",
    srcDataSourceName: "ExternalCRM",
    destEntityName: "Customers",
    destDataSourceName: "MainDB");

// 2. Apply the mapping to a record
var result = MappingManager.MapObject(dmeEditor, mapping, sourceRecord, "Customers", "MainDB");

// 3. Save the mapping
MappingManager.SaveMapping(dmeEditor, "Customers", "MainDB", mapping);

Auto-map with confidence scoring

var options = new AutoMatchOptions
{
    AutoAcceptThreshold = 0.85,
    EnableFuzzyDistanceMatching = true,
    EnableSynonymMatching = true
};

var (mapping, report) = MappingManager.AutoMapByConventionWithScoring(
    dmeEditor,
    "Contacts", "ExternalCRM",
    "Customers", "MainDB",
    NameMatchMode.CaseInsensitive,
    options);

Console.WriteLine($"Auto-accepted: {report.AutoAcceptedCount}");
Console.WriteLine($"Review needed: {report.ReviewRequiredCount}");
Console.WriteLine($"Rejected:      {report.RejectedCount}");

Entity Map API

Core CRUD and application methods on MappingManager (static).

Create methods

MethodDescription
CreateEntityMap(editor, destEntity, srcName, srcDS) Creates a mapping for an existing EntityStructure with a named source entity. Returns Tuple<IErrorsInfo, EntityDataMap>.
CreateEntityMap(editor, srcName, srcDS, destName, destDS) Creates a migration mapping from four string identifiers. Resolves entity structures automatically.
CreateEntityMap(editor, destName, destDS) Creates an empty mapping for the destination entity only — for adding source entities later.
AddEntityToMappedEntities(editor, srcDS, srcName, destEntity) Appends a new EntityDataMap_DTL for an additional source entity to an existing mapping.
MapEntityFields(editor, srcStructure, mapDetail) Matches Mapping_rep_fields between source entity and the destination's selected fields.

Load / Save

MethodDescription
LoadMapping(editor, entityName, dataSource) Loads a persisted EntityDataMap from the config JSON store.
SaveMapping(editor, entityName, dataSource, mapping) Persists the mapping to the config JSON store.
LoadOrInitializeMapping(editor, entityName, dataSource) Loads existing mapping or creates a fresh empty one; never returns null.

Map / Apply

MethodDescription
MapObject(editor, mapping, sourceRecord, destEntity, destDS) Applies the first matching EntityDataMap_DTL to a source object and returns a mapped destination object.
MapObjects(editor, mapping, sourceList, destEntity, destDS) Bulk version — maps a list of source objects.
MapToDataRow(editor, mapping, sourceRecord, row, destEntityName) Maps a source object to a DataRow.
ValidateMappingAsync(editor, mapping) Returns a Task<MappingValidationResult> with errors and warnings.
GetMappingDiff(baseline, current) Returns a MappingDiff — added, removed, and changed field mappings.

Intelligent Auto-Matching

AutoMapByConventionWithScoring uses a multi-strategy scoring engine to propose field matches with a confidence score (0–1). Each destination field receives a ranked list of candidates.

AutoMatchOptions

PropertyDefaultDescription
AutoAcceptThreshold0.90Score above which a match is auto-accepted and written to the field mapping
ReviewThreshold0.65Score above which a match is flagged for review (but not assigned unless AssignReviewMatches=true)
AmbiguityDelta0.08When top-2 candidate scores are within this delta the suggestion is marked ambiguous
TopSuggestionsPerField3Maximum candidates returned per destination field
EnableTokenMatchingtrueSplit camelCase / underscored names into tokens for sub-word matching
EnableSynonymMatchingtrueUse built-in synonym dictionary (id/identifier, first/given, amount/total, …)
EnableFuzzyDistanceMatchingtrueLevenshtein-style edit distance for near-matches
AssignReviewMatchesfalseAlso assign review-threshold matches to field mappings (default: only auto-accept)
Synonymsbuilt-inReplaceable synonym dictionary; default covers id, first/last, name, amount, created, updated

MatchConfidenceDecision enum

ValueCondition
AutoAcceptScore ≥ AutoAcceptThreshold
ReviewRequiredScore ≥ ReviewThreshold but < AutoAcceptThreshold
RejectScore < ReviewThreshold

MappingAutoMatchReport

PropertyDescription
GeneratedOnUtcUTC timestamp
SourceEntityName / DestinationEntityNameEntity names used in this report
ModeNameMatchMode used
TotalDestinationFieldsNumber of destination fields evaluated
AutoAcceptedCount / ReviewRequiredCount / RejectedCountCounts by decision category
SuggestionsList of FieldMatchSuggestion — one per destination field

FieldMatchSuggestion / FieldMatchCandidate

foreach (var suggestion in report.Suggestions)
{
    Console.WriteLine($"Dest: {suggestion.DestinationFieldName}  Ambiguous: {suggestion.IsAmbiguous}");
    foreach (var c in suggestion.Candidates)
        Console.WriteLine($"  Source: {c.SourceFieldName}  Score: {c.ConfidenceScore:P0}  Decision: {c.Decision}");
}

Convention-Based Mapping

AutoMapByConvention builds a mapping without confidence scoring — useful for simple same-schema migrations or when you just need a functional starting point.

NameMatchMode enum

ValueDescription
ExactOrdinal character-for-character match only
CaseInsensitive(Default) Match ignoring case — CustomerID = customerid
FuzzyPrefixMatch when one name is a prefix of the other — aligns CustomerID ↔ CustID
// Simple convention map
var mapping = MappingManager.AutoMapByConvention(
    dmeEditor,
    "Contacts", "CRM",
    "Customers", "MainDB",
    NameMatchMode.FuzzyPrefix);

// Diff two mapping versions
var diff = MappingManager.GetMappingDiff(baselineMapping, updatedMapping);
Console.WriteLine($"Added: {diff.Added.Count}  Removed: {diff.Removed.Count}  Changed: {diff.Changed.Count}");

Conversion Pipeline

Each field assignment passes through a configurable conversion pipeline: policy → transform chain → type coercion. All state is stored in thread-safe ConcurrentDictionary keyed by "{destDS}::{destEntity}" or "{destDS}::{destEntity}::{field}".

MappingConversionPolicy

PropertyDefaultDescription
CultureNameInvariantCultureCulture used for numeric / date parsing
NullHandlingModePreserveNullPreserveNull | SubstituteDefault | SkipAssignment
NullSubstituteValuenullValue written when source is null and mode is SubstituteDefault
FailureModeWarnAndContinueWarnAndContinue | Reject | UseFallback
FallbackValuenullValue written when conversion fails and mode is UseFallback
TrimStringsfalseTrim whitespace from string values before writing
StringCaseModeNoneNone | Upper | Lower — applied after trim

Policy methods

// Set per-entity policy
MappingManager.SetConversionPolicy("MainDB", "Customers", new MappingConversionPolicy
{
    NullHandlingMode = MappingNullHandlingMode.SubstituteDefault,
    NullSubstituteValue = string.Empty,
    TrimStrings = true,
    StringCaseMode = MappingStringCaseMode.Lower,
    FailureMode = MappingConversionFailureMode.WarnAndContinue
});

var policy = MappingManager.GetConversionPolicy("MainDB", "Customers");

Field transform chains

A MappingFieldTransformChain is a named sequence of FieldTransformSteps applied to a single destination field before type coercion. Each step references a registered transform function.

// Register a custom transform
MappingManager.RegisterTransform("padleft10", (value, arg) =>
    value?.ToString()?.PadLeft(10, '0') ?? string.Empty);

// Assign a chain to a specific field
MappingManager.SetFieldTransformChain("MainDB", "Customers", "CustomerCode",
    new MappingFieldTransformChain
    {
        Steps = new List<FieldTransformStep>
        {
            new FieldTransformStep { Name = "trim",      Argument = "" },
            new FieldTransformStep { Name = "uppercase", Argument = "" },
            new FieldTransformStep { Name = "padleft10", Argument = "" }
        }
    });

var chain = MappingManager.GetFieldTransformChain("MainDB", "Customers", "CustomerCode");

Object Graph Mapping

MapObjectGraph traverses nested POCOs and collections, respecting a configurable max depth and cycle detection. Use for Domain Object → Domain Object mapping where fields may be nested paths (e.g. "Address.City" → "ShippingCity").

ObjectGraphMappingOptions

PropertyDefaultDescription
MaxDepth5Maximum nested object traversal depth
DetectCyclestrueSkip already-visited objects to prevent infinite loops
CollectionModeReplaceAppend | Replace | MergeByKey
ReferenceReusePolicyReuseBySourceReferenceWhether to reuse mapped destination objects for the same source reference
CollectionMergeKeyPropertyName"Id"Property used as merge key when CollectionMode = MergeByKey

ObjectGraphMappingResult

PropertyDescription
Successfalse if any field threw an unhandled exception
AssignmentsNumber of fields successfully written
SkippedNumber of fields that were null, missing, or had no source path
WarningsNon-fatal issues (missing paths, assignment failures)
var opts = new ObjectGraphMappingOptions
{
    MaxDepth = 3,
    CollectionMode = CollectionMappingMode.MergeByKey,
    CollectionMergeKeyPropertyName = "ProductId"
};

var (destObj, result) = MappingManager.MapObjectGraph(
    dmeEditor,
    destinationEntityName: "OrderDto",
    selectedMapping: mapDetail,
    sourceObject: sourceOrder,
    options: opts);

Console.WriteLine($"Assignments: {result.Assignments}  Skipped: {result.Skipped}");
foreach (var w in result.Warnings) Console.WriteLine($"  WARN: {w}");

Rule Engine Integration

Each Mapping_rep_fields can carry a Rules string that is evaluated by the Beep rules tokenizer at mapping time. MappingManager.Rules.cs handles rule-set validation and execution tracing.

MappingRulePriority enum

ValuePriorityWhen used
ExplicitUserRule1 (highest)Field has a non-empty Rules string authored by a user
ConfidenceAutoMap2Field was auto-matched by the confidence engine
FallbackDefault3 (lowest)No source path found — use default value

MappingRuleDecision enum

ValueBehaviour
MapRead from source path and assign to destination
SkipDo not assign this field (rule said skip)
UseDefaultNo source path; write the configured default value

Rule validation

// Validate all rules in a mapping
var ruleResult = MappingManager.ValidateRuleSet(mapping);
if (!ruleResult.IsValid)
    foreach (var e in ruleResult.Errors)
        Console.WriteLine($"ERROR: {e}");

foreach (var w in ruleResult.Warnings)
    Console.WriteLine($"WARN: {w}");

MappingRuleExecutionTrace

Returned internally per field assignment — useful for troubleshooting. Properties:

Validation & Quality Scoring

ValidateMappingWithScore produces a 0–100 quality score and a band label, plus a field-level MappingDriftReport comparing the mapping against the current entity structures.

MappingQualityBand enum

ValueScore range (indicative)
Excellent90–100
Good75–89
NeedsReview50–74
HighRisk< 50

MappingQualityReport

PropertyDescription
Score0–100 overall quality score
BandMappingQualityBand label
MeetsProductionThresholdtrue when Score >= ProductionThreshold
ProductionThresholdConfigurable pass mark (default: 70)
IssuesList of MappingQualityIssue with severity, code, category, recommendation
DriftReportEmbedded MappingDriftReport comparing stored mapping against live schemas

MappingIssueSeverity enum

ValueMeaning
InfoInformational — no action required
WarningSuboptimal but non-blocking
ErrorMust be fixed before production use
var quality = MappingManager.ValidateMappingWithScore(dmeEditor, mapping, productionThreshold: 75);

Console.WriteLine($"Score: {quality.Score}/100  Band: {quality.Band}  Ready: {quality.MeetsProductionThreshold}");

foreach (var issue in quality.Issues.Where(i => i.Severity == MappingIssueSeverity.Error))
    Console.WriteLine($"[ERROR] {issue.Code}: {issue.Message}  → {issue.Recommendation}");

if (quality.DriftReport.DriftDetected)
    foreach (var entry in quality.DriftReport.Entries)
        Console.WriteLine($"Drift: {entry.ChangeType} on '{entry.FieldName}': {entry.Recommendation}");

Governance & Versioning

The governance subsystem attaches a MappingGovernanceRecord to each entity mapping, tracking version history, approval state, and a full audit trail. All state is persisted to the config store as JSON. Changes made inside a BeginGovernanceScope are automatically stamped with the author and reason.

MappingApprovalState enum

ValueDescription
DraftWork in progress — not ready for production
ReviewSubmitted for peer review
ApprovedReviewed and cleared for production use
DeprecatedSuperseded by a newer mapping version

MappingGovernanceRecord

PropertyDescription
EntityName / DataSourceMapping identity
CurrentVersionSemVer string of the active mapping (e.g. "2.1.0")
CurrentApprovalStateCurrent MappingApprovalState
LastUpdatedUtcUTC timestamp of last change
VersionsFull list of MappingVersionRecord — each carries a field snapshot and diff summary
AuditTrailList of MappingAuditEntry — every create / update / approve / deprecate event

Governance API

MethodDescription
BeginGovernanceScope(author, reason, targetState) Returns an IDisposable scope. All mapping saves within this scope are stamped with the author and reason. Uses AsyncLocal — safe per async task.
GetMappingGovernance(editor, entity, dataSource) Returns the full MappingGovernanceRecord for a mapping.
GetMappingVersionHistory(editor, entity, dataSource) Returns ordered list of MappingVersionRecord (oldest first).
UpdateMappingApprovalState(editor, entity, dataSource, state, actor, reason) Transitions the approval state and appends an audit entry. Returns bool.
// Stamp changes with author context
using (MappingManager.BeginGovernanceScope("alice", "Q2 schema alignment", MappingApprovalState.Review))
{
    var (_, mapping) = MappingManager.CreateEntityMap(dmeEditor, "Contacts", "CRM", "Customers", "MainDB");
    MappingManager.SaveMapping(dmeEditor, "Customers", "MainDB", mapping);
}

// Approve for production
MappingManager.UpdateMappingApprovalState(
    dmeEditor, "Customers", "MainDB",
    MappingApprovalState.Approved,
    actor: "bob", reason: "Code review passed");

// Inspect history
var history = MappingManager.GetMappingVersionHistory(dmeEditor, "Customers", "MainDB");
foreach (var v in history)
    Console.WriteLine($"v{v.Version}  {v.Author}  {v.ApprovalState}  {v.ChangeReason}");

Performance & Caching

The performance partial compiles mapping plans and property accessors into delegates and caches them to avoid repeated reflection. Caches are bounded to prevent unbounded growth.

CacheMax entriesDescription
CompiledPlanCache512Per-(destType, destDS, destEntity) compiled field assignment plan
SourcePathAccessorCache2048Per-(sourceType, fieldPath) compiled getter delegate
DestinationSetterCache2048Per-(destType, fieldPath) compiled setter delegate
ConversionPoliciesunboundedThread-safe; keyed "{destDS}::{destEntity}"
FieldTransformChainsunboundedThread-safe; keyed "{destDS}::{destEntity}::{field}"
// Invalidate compiled plans for a specific entity (e.g. after schema change)
MappingManager.InvalidateMappingCaches("MainDB", "Customers");

AutoObjMapper — POCO Mapper

AutoObjMapper is a lightweight, expression-compiled POCO-to-POCO mapper. It compiles assignment actions per (TSource, TDest) type pair and caches them. Inspired by AutoMapper / TinyMapper but without external dependencies.

IAutoObjMapper API

MethodSignatureDescription
Map<TSource,TDest>(source) TDest Map<TSource,TDest>(TSource src) where TDest : new() Creates a new TDest and maps all matching properties
Map<TSource,TDest>(source, destination) TDest Map<TSource,TDest>(TSource src, TDest dest) Maps into an existing destination instance
Configure(action) IMapperConfiguration Configure(Action<IMapperConfiguration>) Configures type maps. Clears compiled cache on configuration change.
GetStatistics() MappingStatistics Returns cached mapper count and registered type-map count
ClearCache() void Clears all compiled setter delegates

ITypeMapConfiguration<TSource, TDest> fluent API

MethodDescription
Ignore(destPropertyName)Exclude a destination property from mapping
ForMember(destPropertyName, resolver)Provide a custom Func<TSource, object> for a destination property
BeforeMap(action)Run an Action<TSource, TDest> before mapping begins
AfterMap(action)Run an Action<TSource, TDest> after mapping completes
var mapper = new AutoObjMapper();

// Configure type-specific behavior
mapper.Configure(cfg =>
{
    cfg.For<ContactDto, CustomerEntity>()
       .Ignore("CreatedAt")
       .ForMember("FullName", src => $"{src.FirstName} {src.LastName}")
       .BeforeMap((src, dest) => dest.ImportedAt = DateTime.UtcNow)
       .AfterMap((src, dest) => dest.IsActive = true);
});

// Map single object
var customer = mapper.Map<ContactDto, CustomerEntity>(contactDto);

// Map into existing destination
var existing = GetExistingCustomer(id);
mapper.Map<ContactDto, CustomerEntity>(contactDto, existing);

// Inspect stats
var stats = mapper.GetStatistics();
Console.WriteLine($"Cached mappers: {stats.CachedMappersCount}");

AutoObjMapperOptions

// Create mapper with custom options
var mapper = new AutoObjMapper(new AutoObjMapperOptions
{
    IgnoreNullSourceValues = true,  // skip null source → don't overwrite dest
    MapPrivateMembers = false       // default; only public properties
});

Examples

End-to-end: auto-match → validate → govern → apply

// 1. Auto-match with confidence scoring
var (mapping, report) = MappingManager.AutoMapByConventionWithScoring(
    dmeEditor, "Contacts", "CRM", "Customers", "MainDB",
    NameMatchMode.CaseInsensitive,
    new AutoMatchOptions { AutoAcceptThreshold = 0.88, EnableSynonymMatching = true });

// 2. Configure conversion policy
MappingManager.SetConversionPolicy("MainDB", "Customers", new MappingConversionPolicy
{
    TrimStrings = true,
    StringCaseMode = MappingStringCaseMode.Lower,
    FailureMode = MappingConversionFailureMode.WarnAndContinue
});

// 3. Validate quality
var quality = MappingManager.ValidateMappingWithScore(dmeEditor, mapping, productionThreshold: 75);
if (!quality.MeetsProductionThreshold)
{
    Console.WriteLine($"Score {quality.Score} below threshold — review issues:");
    foreach (var i in quality.Issues) Console.WriteLine($"  [{i.Severity}] {i.Message}");
    return;
}

// 4. Stamp author context and save
using (MappingManager.BeginGovernanceScope("alice", "initial CRM import mapping"))
    MappingManager.SaveMapping(dmeEditor, "Customers", "MainDB", mapping);

// 5. Approve
MappingManager.UpdateMappingApprovalState(
    dmeEditor, "Customers", "MainDB",
    MappingApprovalState.Approved, "bob", "QA sign-off");

// 6. Apply to records
var result = MappingManager.MapObject(dmeEditor, mapping, sourceContact, "Customers", "MainDB");

Custom field transforms on a specific column

// Register transforms once (e.g. at startup)
MappingManager.RegisterTransform("strip_dashes", (v, _) => v?.ToString()?.Replace("-", "") ?? "");
MappingManager.RegisterTransform("uppercase",    (v, _) => v?.ToString()?.ToUpper() ?? "");

// Bind to the SKU field
MappingManager.SetFieldTransformChain("MainDB", "Products", "SKU",
    new MappingFieldTransformChain
    {
        Steps = new List<FieldTransformStep>
        {
            new FieldTransformStep { Name = "trim" },
            new FieldTransformStep { Name = "strip_dashes" },
            new FieldTransformStep { Name = "uppercase" }
        }
    });

AutoObjMapper with before/after hooks

var mapper = new AutoObjMapper();
mapper.Configure(cfg =>
{
    cfg.For<OrderApiDto, OrderEntity>()
       .ForMember("TotalAmount", src => src.Lines.Sum(l => l.Price * l.Qty))
       .BeforeMap((src, dest) => dest.CreatedAt = DateTime.UtcNow)
       .AfterMap((src, dest) => dest.Status = OrderStatus.New);
});

var orders = apiDtos.Select(dto => mapper.Map<OrderApiDto, OrderEntity>(dto)).ToList();

Check mapping drift after schema update

var (_, updatedMapping) = MappingManager.CreateEntityMap(dmeEditor, "Contacts", "CRM", "Customers", "MainDB");
var diff = MappingManager.GetMappingDiff(savedMapping, updatedMapping);

if (diff.HasChanges)
{
    Console.WriteLine($"Added:   {diff.Added.Count}");
    Console.WriteLine($"Removed: {diff.Removed.Count}");
    Console.WriteLine($"Changed: {diff.Changed.Count}");
    // Re-run quality check before re-approving
}

Full API Reference

MappingManager — Complete Static API

Create Methods

MethodReturn
CreateEntityMap(DMEEditor, destent, srcName, srcDS)Tuple<IErrorsInfo, EntityDataMap>
CreateEntityMap(DMEEditor, srcName, srcDS, destName, destDS)Tuple<IErrorsInfo, EntityDataMap>
CreateEntityMap(DMEEditor, destName, destDS)Tuple<IErrorsInfo, EntityDataMap>
AddEntityToMappedEntities(DMEEditor, srcDS, srcName, destent)EntityDataMap_DTL
MapEntityFields(DMEEditor, srcent, datamap)List<Mapping_rep_fields>

Load / Save

MethodReturn
LoadMapping(DMEEditor, entityName, dataSource)EntityDataMap
SaveMapping(DMEEditor, entityName, dataSource, mapping)void
SaveEntityMap(DMEEditor, entityName, dataSourceID, mapping)void
LoadOrInitializeMapping(DMEEditor, entityName, dataSource)EntityDataMap

Map / Apply / Transform

MethodReturn
MapObject(DMEEditor, mapping, sourceRecord, destEntity, destDS)object
MapObjects(DMEEditor, mapping, sourceList, destEntity, destDS)List<object>
MapToDataRow(DMEEditor, mapping, sourceRecord, row, destEntity)DataRow
MapObjectToAnother(DMEEditor, destEntity, SelectedMapping, sourceobj)object
MapObjectGraph(DMEEditor, destEntity, selectedMapping, source, options)Tuple<object, ObjectGraphMappingResult>

Auto-Matching

MethodReturn
AutoMapByConvention(DMEEditor, srcName, srcDS, destName, destDS, mode)EntityDataMap
AutoMapByConventionWithScoring(DMEEditor, srcName, srcDS, destName, destDS, mode, opts)Tuple<EntityDataMap, MappingAutoMatchReport>

Validation & Quality

MethodReturn
ValidateMappingAsync(DMEEditor, mapping)Task<MappingValidationResult>
ValidateMappingWithScore(DMEEditor, mapping, productionThreshold)MappingQualityReport
GetMappingDiff(baseline, current)MappingDiff

Governance

MethodReturn
BeginGovernanceScope(author, reason, targetState)IDisposable
GetMappingGovernance(DMEEditor, entity, dataSource)MappingGovernanceRecord
GetMappingVersionHistory(DMEEditor, entity, dataSource)List<MappingVersionRecord>
UpdateMappingApprovalState(DMEEditor, entity, dataSource, state, actor, reason)bool

Rules

MethodReturn
ValidateRuleSet(mapping)MappingRuleValidationResult

Conversion Pipeline

MethodReturn
SetConversionPolicy(destDS, destEntity, policy)void
GetConversionPolicy(destDS, destEntity)MappingConversionPolicy
RegisterTransform(name, func)void
SetFieldTransformChain(destDS, destEntity, field, chain)void
GetFieldTransformChain(destDS, destEntity, field)MappingFieldTransformChain

Performance / Caching

MethodReturn
InvalidateMappingCaches(destDS, destEntity)void

AutoObjMapper Complete Interfaces

IAutoObjMapper

MemberDescription
OptionsAutoObjMapperOptions {get;} — current options read-only
Configure(Action<IMapperConfiguration>)IMapperConfiguration — configures and returns config; clears compiled cache
Map<TSource, TDest>(TSource) where TDest : new()Creates new TDest and maps matching properties
Map<TSource, TDest>(TSource, TDest)Maps into existing destination (preserves existing values where source is null)
GetStatistics()MappingStatistics — cached mappers count + type map count
ClearCache()Clears ALL compiled mappers and setter/getter delegates

IMapperConfiguration

MethodReturn
For<TSource, TDest>()ITypeMapConfiguration<TSource, TDest>
GetRegisteredTypeMapsCount()int
GetTypeMap(Type src, Type dest)ITypeMapBase

ITypeMapConfiguration<TSource, TDest>

MethodReturn
Ignore(string destPropertyName)ITypeMapConfiguration<TSource, TDest>
ForMember(string destPropertyName, Func<TSource, object>)ITypeMapConfiguration<TSource, TDest>
BeforeMap(Action<TSource, TDest>)ITypeMapConfiguration<TSource, TDest>
AfterMap(Action<TSource, TDest>)ITypeMapConfiguration<TSource, TDest>

ITypeMapBase

MemberReturn
IsIgnored(string destPropName)bool
TryGetResolver(string destPropName, out Delegate)bool
BeforeMapDelegateDelegate
AfterMapDelegateDelegate

AutoObjMapperOptions

PropertyTypeDefault
IgnoreNullSourceValuesboolfalse
MapPrivateMembersboolfalse

Complete Enums Reference

EnumValues
NameMatchModeExact, CaseInsensitive, FuzzyPrefix
MatchConfidenceDecisionAutoAccept, ReviewRequired, Reject
MappingQualityBandExcellent, Good, NeedsReview, HighRisk
MappingIssueSeverityInfo, Warning, Error
MappingApprovalStateDraft, Review, Approved, Deprecated
MappingRulePriorityExplicitUserRule, ConfidenceAutoMap, FallbackDefault
MappingRuleDecisionMap, Skip, UseDefault
MappingNullHandlingModePreserveNull, SubstituteDefault, SkipAssignment
MappingConversionFailureModeWarnAndContinue, Reject, UseFallback
MappingStringCaseModeNone, Upper, Lower
CollectionMappingModeAppend, Replace, MergeByKey

Helper Classes

FileClassPurpose
MappingDefaultsHelper.csMappingDefaultsHelperApplies DefaultsManager defaults to mapped objects after field assignment
MappingPerformanceHelper.csMappingPerformanceHelperCompiled plan caching, Expression-compiled setter/getter delegates, cache invalidation
MappingValidationHelper.csMappingValidationHelperMapping schema validation, compatibility checks, field existence verification
PropertyDiscoveryHelper.csPropertyDiscoveryHelperReflection-based property discovery with caching for POCO types
TypeConversionHelper.csTypeConversionHelperType coercion pipeline: string → numeric, date parsing, enum conversion, nullable unwrap

Configuration Types

FileClassPurpose
TypeMap.csTypeMap<TSource, TDest>Concrete typed configuration implementing ITypeMapConfiguration
TypeMapBase.csTypeMapBaseNon-generic base with ignored properties dict, resolver lookup, before/after delegates
MapperConfig.csMapperConfigImplements IMapperConfiguration — registry of TypeMapBase instances
MapperConfiguration.csMapperConfigurationConfiguration factory and storage
AutoObjMapperOptions.csAutoObjMapperOptionsIgnoreNullSourceValues, MapPrivateMembers

Source File Map (30 files)

FileContent
MappingManager.csCore CRUD: CreateEntityMap, LoadMapping, SaveMapping, MapObject, MapToDataRow
MappingManager.Conventions.csAutoMapByConvention, NameMatchMode, GetMappingDiff
MappingManager.AutoMatching.csAutoMapByConventionWithScoring, confidence engine, AutoMatchOptions
MappingManager.ConversionPipeline.csConversionPolicy, RegisterTransform, field transform chains
MappingManager.ObjectGraph.csMapObjectGraph, nested POCO + collection traversal, ObjectGraphMappingOptions
MappingManager.Rules.csValidateRuleSet, MappingRulePriority, execution traces
MappingManager.ValidationScoring.csValidateMappingWithScore, MappingQualityReport, drift detection
MappingManager.Governance.csBeginGovernanceScope, versioning, approval states, audit trail
MappingManager.PerformanceCaching.csCompiled plan cache (512), source path accessor (2048), dest setter cache (2048), invalidation
Interfaces/IMappingInterfaces.csIAutoObjMapper, IMapperConfiguration, ITypeMapConfiguration, ITypeMapBase
Interfaces/ITypeMapConfig.csType map configuration contracts
Models/MappingModels.csMappingStatistics, MappingValidationResult, MappingDriftReport, Rule models
Configuration/TypeMap.csTypeMap<TSource, TDest> concrete class
Configuration/TypeMapBase.csNon-generic base with ignored/resolver/delegates storage
Configuration/MapperConfig.csMapperConfig implementing IMapperConfiguration
Configuration/MapperConfiguration.csConfiguration factory
Configuration/AutoObjMapperOptions.csAutoObjMapperOptions class
Core/AutoObjMapper.Core.csCore mapping engine, expression compilation, property matching
Core/AutoObjMapper.Factory.csFactory methods for AutoObjMapper creation
Core/AutoObjMapper.Performance.csPerformance-optimized mapping paths, delegate caching
Core/AutoObjMapper.ExpressionBuilder.csExpression tree builder for compiled property setters/getters
Core/AutoObjMapper.Validation.csType compatibility validation, property existence checks
Helpers/MappingDefaultsHelper.csDefaultsManager integration for mapping
Helpers/MappingPerformanceHelper.csCompiled plan execution and caching
Helpers/MappingValidationHelper.csSchema validation for mappings
Helpers/PropertyDiscoveryHelper.csReflection-based property discovery
Helpers/TypeConversionHelper.csType coercion and conversion pipeline
Extensions/AutoObjMapperExtensions.csExtension methods for AutoObjMapper (List mapping, etc.)
Utilities/AutoObjMapperUtilities.csUtility methods, type comparison helpers
Examples/AutoObjMapperExamples.csUsage examples for AutoObjMapper