PreserveReferenceHandler
Namespace: Riok.Mapperly.Abstractions.ReferenceHandling
A IReferenceHandler implementation which returns the same target object instance if encountered the same source object instance. Do not use directly. Should only be used by Mapperly generated code. API surface is not subject to semantic releases and may break in any release.
public sealed class PreserveReferenceHandler : IReferenceHandler
Inheritance Object → PreserveReferenceHandler
Implements IReferenceHandler
Attributes NullableContextAttribute, NullableAttribute
Constructors
PreserveReferenceHandler()
public PreserveReferenceHandler()
Methods
TryGetReference<TSource, TTarget>(TSource, TTarget&)
public bool TryGetReference<TSource, TTarget>(TSource source, TTarget& target)
Type Parameters
TSource
TTarget
Parameters
source
TSource
target
TTarget&
Returns
SetReference<TSource, TTarget>(TSource, TTarget)
public void SetReference<TSource, TTarget>(TSource source, TTarget target)
Type Parameters
TSource
TTarget
Parameters
source
TSource
target
TTarget