This glossary provides technical definitions for the core concepts, class names, and domain-specific terminology used in the Audit.NET framework. It serves as a reference for onboarding engineers to understand the mapping between high-level auditing requirements and the specific code entities that implement them.
The primary object representing the context of an audited operation. It manages the lifecycle of an audit event, including its creation, data collection, and final persistence. It implements IAuditScope and IDisposable (or IAsyncDisposable) to ensure events are saved when a code block completes.
AuditScope src/Audit.NET/AuditScope.cs18-19Dispose() src/Audit.NET/AuditScope.cs216 Comment() src/Audit.NET/AuditScope.cs149 SetCustomField() src/Audit.NET/AuditScope.cs165 AddTimedEvent() src/Audit.NET/AuditScope.cs185using block to ensure Insert or Replace operations are triggered upon completion README.md86-105A POCO (Plain Old CLR Object) that represents the data structure of the audit log. It contains environment information, custom fields, and target object snapshots.
AuditEvent src/Audit.NET/AuditScope.cs33EventType, Environment, StartDate, StartTimestamp, and CustomFields src/Audit.NET/AuditScope.cs33-66 It can also include TimedEvents to capture intermediate checkpoints src/Audit.NET/AuditScope.cs195-202The abstract base class (and interface IAuditDataProvider) that defines how audit events are persisted to a storage medium.
IAuditDataProvider src/Audit.NET/AuditScope.cs99InsertEvent, ReplaceEvent, and their asynchronous counterparts. Providers can be configured globally or per-scope src/Audit.NET/AuditScope.cs29A configuration setting that determines when the audit event is persisted during the AuditScope lifecycle.
InsertOnEnd: (Default) Event is created and saved only when the scope is closed.InsertOnStartReplaceOnEnd: Event is inserted when the scope starts and updated when it ends.InsertOnStartInsertOnEnd: Two separate events are created.Manual: User must explicitly call scope.Save().The following diagram illustrates the relationship between the natural language concept of an "Audited Operation" and the specific classes that handle the data flow.
Audited Operation to Code Entity Space
Sources: src/Audit.NET/AuditScope.cs18-79 README.md83-120 src/Audit.NET/AuditScope.cs195-202
A base class for Entity Framework contexts that automatically intercepts SaveChanges to generate audit logs. It supports both EF6 and EF Core.
AuditDbContext src/Audit.EntityFramework/README.md90SaveChanges and SaveChangesAsync to hook into the EF Change Tracker src/Audit.EntityFramework/README.md119-127An internal utility class used by EF integrations to process entity changes and map them to EntityFrameworkEvent structures. It handles column name resolution for various mapping strategies.
DbContextHelper CODE_COVERAGE.md25CreateAuditEvent CODE_COVERAGE.md25 UpdateAuditEvent CODE_COVERAGE.md25 and MergeEntitySettings CODE_COVERAGE.md25 It now handles TPC, TPH, and TPT mapping strategies CHANGELOG.md14-15An Action Filter attribute used in ASP.NET Web API and MVC to intercept HTTP requests and generate audit trails.
AuditApiAttribute src/Audit.WebApi/README.md60-67ASP.NET Core Middleware that captures requests earlier in the pipeline than action filters, useful for auditing unhandled routes or early pipeline failures.
AuditMiddleware src/Audit.WebApi/README.md153-162| Term | Code Symbol / Class | File Path | Description |
|---|---|---|---|
| Action Type | ActionType | src/Audit.NET/AuditScope.cs | Logic hooks often referred to in AuditScope processing. |
| Custom Field | CustomFields | src/Audit.NET/AuditScope.cs65 | A Dictionary<string, object> in AuditEvent for storing domain-specific metadata. |
| Json Adapter | IJsonAdapter | CHANGELOG.md61 | Abstraction for JSON serialization (System.Text.Json vs Newtonsoft). |
| Target Object | Target | src/Audit.NET/AuditScope.cs73-77 | The object being tracked for state changes, stored as AuditTarget. |
| Timed Event | TimedEvent | src/Audit.NET/AuditScope.cs195-202 | Captures intermediate timestamps and data within a scope CHANGELOG.md23 |
| Audit Behavior | AuditBehavior | src/Audit.WCF/README.md27 | WCF Attribute for server-side service call interception. |
| Activity Trace | Activity | src/Audit.NET/AuditScope.cs46-51 | Integration with System.Diagnostics.Activity for distributed tracing. |
This diagram maps the internal data flow from a framework interception point (like a Web API controller) through the core logic to the final storage.
Interception to Storage Data Flow
Sources: src/Audit.NET/AuditScope.cs25-79 src/Audit.WebApi/README.md42-46 src/Audit.NET/AuditScope.cs216-220
src/pack.cmd src/pack.cmd4-49).Sources: README.md1-48 src/Audit.EntityFramework/README.md1-31 src/Audit.WCF/README.md1-20 src/Audit.NET/AuditScope.cs1-216 CHANGELOG.md1-110 src/pack.cmd1-102
Refresh this wiki
This wiki was recently refreshed. Please wait 7 days to refresh again.