Eigenverft.NetLib.Infrastructure
  • Guides
  • API
Show / Hide Table of Contents
  • Eigenverft.NetLib.Infrastructure.Hosting.Configuration.ConfigurationSets
    • ConfigurationSetApplyMode
    • ConfigurationSetBuilderBindingExtensions
    • ConfigurationSetCoordinatorExtensions
    • ConfigurationSetDefinition
    • ConfigurationSetEventArgs
    • ConfigurationSetEventKind
    • ConfigurationSetNotification
    • ConfigurationSetParticipantSwitchResult
    • ConfigurationSetPendingRestartChange
    • ConfigurationSetRegistration
    • ConfigurationSetStateApplyResult
    • ConfigurationSetStateApplyStatus
    • ConfigurationSetStateFailureKind
    • ConfigurationSetStateStatus
    • ConfigurationSetStateStoreEventArgs
    • ConfigurationSetStateStoreEventKind
    • ConfigurationSetStateStoreExtensions
    • ConfigurationSetStateStoreStatus
    • ConfigurationSetStatus
    • ConfigurationSetSwitchFailureKind
    • ConfigurationSetSwitchResult
    • ConfigurationSetSwitchStatus
    • ConfigurationSetSwitchableJsonExtensions
    • IConfigurationSetCoordinator
    • IConfigurationSetDesiredStateStore
    • IConfigurationSetEventHub
    • IConfigurationSetManager
    • IConfigurationSetStateStore
  • Eigenverft.NetLib.Infrastructure.Hosting.Configuration.Diagnostics
    • ConfigurationPrecedenceDiagnosticsExtensions
  • Eigenverft.NetLib.Infrastructure.Hosting.Configuration.Sources
    • HostApplicationBuilderConfigurationExtensions
  • Eigenverft.NetLib.Infrastructure.Hosting.Configuration.SwitchableJson
    • IJsonConfigurationSourcePreparation
    • ISwitchableJsonConfiguration
    • JsonConfigurationCandidatePreparation
    • JsonConfigurationCandidatePreparations
    • JsonConfigurationSourcePreparationContext
    • JsonConfigurationSourcePreparationException
    • JsonConfigurationValueProtection
    • SwitchableJsonConfigurationEventArgs
    • SwitchableJsonConfigurationEventKind
    • SwitchableJsonConfigurationExtensions
    • SwitchableJsonFailureKind
    • SwitchableJsonPreparationStatus
    • SwitchableJsonRegistrationOptions
    • SwitchableJsonRuntimeFailurePolicy
    • SwitchableJsonSwitchPreparation
    • SwitchableJsonSwitchResult
    • SwitchableJsonSwitchStatus
  • Eigenverft.NetLib.Infrastructure.Hosting.Configuration.Values
    • ConfigurationValueCodec
    • ConfigurationValueCodecs
    • ConfigurationValueKind
    • JsonConfigurationFileEncoder
  • Eigenverft.NetLib.Infrastructure.Hosting.DirectoryLayout
    • AppDirectoryLayout
    • AppDirectoryLayoutFactory
    • DefaultDirectory
    • DefaultDirectoryExtensions
    • DefaultDirectoryNameAttribute
    • HostApplicationBuilderDirectoryLayoutExtensions
    • HostApplicationBuilderFactory
    • IAppDirectoryLayout
  • Eigenverft.NetLib.Infrastructure.Hosting.Logging.BootstrapLogger
    • BootstrapLogger
    • BootstrapLogger<TCategoryName>
  • Eigenverft.NetLib.Infrastructure.Security.Certificates
    • CertificateKeyProfile
    • CertificatePurpose
    • CertificateRecoveryMode
    • CertificateSubject
    • ManagedCertificateAction
    • ManagedCertificateFile
    • ManagedCertificateFileOptions
    • ManagedCertificateResult
    • SelfSignedCertificateFactory
    • SelfSignedCertificateOptions
  • Eigenverft.NetLib.Infrastructure.Security.MachineBinding
    • PhysicalMachineBinding
  • Eigenverft.NetLib.Infrastructure.Text
    • Base92JsonSafeEncoder
  • Eigenverft.NetLib.Infrastructure.Transformations
    • ReversibleStringTransform
    • ReversibleStringTransform.TryReverseDelegate
    • ReversibleStringTransforms

Class ReversibleStringTransform

Represents one reversible transformation from a string to another string.

Inheritance
object
ReversibleStringTransform
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
Namespace: Eigenverft.NetLib.Infrastructure.Transformations
Assembly: Eigenverft.NetLib.Infrastructure.dll
Syntax
public sealed class ReversibleStringTransform
Remarks

This type is intentionally independent from JSON configuration, persisted wrapper tokens, configuration providers and source switching. A transform owns only the reversible value operation. Callers decide how transformed strings are selected, framed, persisted, published or migrated.

A transform may provide cryptographic protection, machine binding, obfuscation or only a storage representation. Those roles are deliberately distinct. For example, Base64 and Base92 are representations, while ROT13 and Caesar are only analysis-friction layers; none of them is a confidentiality boundary.

TryReverse(string?, out string) is transactional from the caller's perspective. On failure it returns the original transformed value rather than a partially reversed intermediate representation. Composed transforms preserve the same rule.

Constructors

| Edit this page View Source

ReversibleStringTransform(string, Func<string, string>, TryReverseDelegate)

Creates a reusable reversible string transform.

Declaration
public ReversibleStringTransform(string name, Func<string, string> apply, ReversibleStringTransform.TryReverseDelegate tryReverse)
Parameters
Type Name Description
string name
Func<string, string> apply
ReversibleStringTransform.TryReverseDelegate tryReverse

Properties

| Edit this page View Source

Name

Gets the descriptive transform name.

Declaration
public string Name { get; }
Property Value
Type Description
string

Methods

| Edit this page View Source

Apply(string?)

Applies this transform to one string.

Declaration
public string Apply(string? value)
Parameters
Type Name Description
string value

The source value; null is treated as empty.

Returns
Type Description
string

The transformed value.

| Edit this page View Source

ToString()

Returns a string that represents the current object.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents the current object.

Overrides
object.ToString()
| Edit this page View Source

TryReverse(string?, out string)

Attempts to reverse this transform for one transformed string.

Declaration
public bool TryReverse(string? transformedValue, out string originalValue)
Parameters
Type Name Description
string transformedValue

The transformed value; null is treated as empty.

string originalValue

Receives the original value on success. On failure, receives transformedValue unchanged.

Returns
Type Description
bool

true when the complete transform reverses successfully; otherwise false.

  • Edit this page
  • View Source
In this article
Back to top