.NET API
TraconContentProtectionExtensions
Tracon.Core.dllChain extensions that turn on at-rest content protection.
public static class TraconContentProtectionExtensionsInheritance
Section titled “Inheritance”object ← TraconContentProtectionExtensions
Inherited Members
Section titled “Inherited Members”object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”This is an extension method, not a member of ITraconBuilder: adding a member to the interface is a breaking change after release; adding an extension method is not.
Methods
Section titled “Methods”AddContentProtection(ITraconBuilder, Action<TraconContentProtectionOptions>?)
Section titled “ AddContentProtection(ITraconBuilder, Action<TraconContentProtectionOptions>?)”Registers Tracon’s built-in AES-256-GCM content protector.
public static ITraconBuilder AddContentProtection(this ITraconBuilder builder, Action<TraconContentProtectionOptions>? configure = null)Parameters
Section titled “Parameters”builder ITraconBuilder
The configuration chain.
configure Action<TraconContentProtectionOptions>?
Key and column settings.
Returns
Section titled “Returns”The chain, for further configuration.
Remarks
Section titled “Remarks”This call is the no-surprises rule’s gate. AddTracon
alone registers a no-op protector that writes plaintext unchanged; without
this call (or a matching Tracon:ContentProtection:Enabled
configuration section), nothing is encrypted.
Replaces the default registration rather than adding to it — a
consumer’s explicit call always wins over Tracon’s own default
(the same rule UsePostgreSql follows for its stores).
builder.AddTracon() .AddContentProtection(options => { options.ActiveKeyId = "2026-08"; options.Keys["2026-08"] = "ContentProtectionKeys:2026-08"; });Exceptions
Section titled “Exceptions”builder is null.
AddContentProtection<TProtector>(ITraconBuilder)
Section titled “ AddContentProtection<TProtector>(ITraconBuilder)”Registers your own IContentProtector implementation.
public static ITraconBuilder AddContentProtection<TProtector>(this ITraconBuilder builder) where TProtector : class, IContentProtectorParameters
Section titled “Parameters”builder ITraconBuilder
The configuration chain.
Returns
Section titled “Returns”The chain, for further configuration.
Type Parameters
Section titled “Type Parameters”TProtector
The protector type.
Remarks
Section titled “Remarks”TraconContentProtectionOptions.Columns still governs which columns are protected, whichever implementation is registered; only the actual protect/unprotect logic is replaced.
Exceptions
Section titled “Exceptions”builder is null.