Enum ReferenceHandling
Specifies how the serialization engine responds when it encounters the same object reference more than once while traversing an object graph, which may indicate either a legitimate shared reference or a circular reference (cycle).
Namespace: Scylla.Core.Util.Serialization
Assembly: ScyllaCore.dll
Syntax
public enum ReferenceHandling
Remarks
Configured via WithReferenceHandling(ReferenceHandling). The active mode is enforced by ReferenceTracker and consulted by the engine each time it begins serializing a reference-type value.
Fields
| Name | Description |
|---|---|
| Error | Throw a SerializationException when a cyclic reference is detected. Use this policy when cycles are not expected in the object graph and their presence indicates a programming error. The failure is surfaced as a ErrorMessage in the result returned by ScyllaSerialization. |
| Ignore | Break cycles silently by serializing the second and subsequent occurrences of
the same object reference as |
| Preserve | Preserve object identity by assigning each reference-type object a unique integer
ID on its first occurrence in the graph. Subsequent occurrences are serialized as
a reference to that ID (e.g., |