s&box docs
API ReferenceFacepunch.ActionGraphs

public class Facepunch.ActionGraphs.SerializationOptions

Controls how `Facepunch.ActionGraphs.ActionGraph`s are (de)serialized.

Constructors

Showing 2 constructors

Methods

Showing 3 methods

public void Deconstruct(Facepunch.ActionGraphs.InputDefinition ImpliedTarget, Facepunch.ActionGraphs.IActionGraphCache Cache, Facepunch.ActionGraphs.ISourceLocation SourceLocation, System.Collections.Generic.IReadOnlyDictionary`2<System.Guid,System.Guid> GuidMap, bool WriteCacheReferences, bool ForceUpdateCached, bool MakeGuidsUnique)

protected virtual bool PrintMembers(System.Text.StringBuilder builder)

Properties

Showing 9 properties

public Facepunch.ActionGraphs.IActionGraphCache Facepunch.ActionGraphs.SerializationOptions.Cache { get; set; }

Re-use instances from this cache when deserializing, matching by `Facepunch.ActionGraphs.ActionGraph.Guid`. Graphs will be added to the cache when serializing or deserializing in this scope. When serializing, if `Facepunch.ActionGraphs.SerializationOptions.WriteCacheReferences` is true, a minimal graph reference stub will be written instead of full graphs.

public bool Facepunch.ActionGraphs.SerializationOptions.ForceUpdateCached { get; set; }

If true, replace cached instance when deserializing. Otherwise, it'll only be replaced if its `Facepunch.ActionGraphs.ActionGraph.ChangeId` differs.

public System.Collections.Generic.IReadOnlyDictionary`2<System.Guid,System.Guid> Facepunch.ActionGraphs.SerializationOptions.GuidMap { get; set; }

When deserializing, maps any graph `System.Guid`s encountered.

public Facepunch.ActionGraphs.InputDefinition Facepunch.ActionGraphs.SerializationOptions.ImpliedTarget { get; set; }

Add this input to any graphs deserialized in this scope, usually representing a "this" parameter holding the object this graph is embedded in. When serializing, omit this input from the serialized graph because we know it will be added automatically when deserializing.

public Facepunch.ActionGraphs.ISourceLocation Facepunch.ActionGraphs.SerializationOptions.SourceLocation { get; set; }

For debugging / editors, describe where graphs deserialized in this scope came from.

public bool Facepunch.ActionGraphs.SerializationOptions.WriteCacheReferences { get; set; }

If true, and a `Facepunch.ActionGraphs.SerializationOptions.Cache` is provided, write a reference stub when serializing graphs instead of the full JSON.

Metadata

FieldValue
NamespaceFacepunch.ActionGraphs
Typeclass
AssemblyFacepunch.ActionGraphs
Doc IDT:Facepunch.ActionGraphs.SerializationOptions

On this page

Constructorspublic SerializationOptions(Facepunch.ActionGraphs.InputDefinition ImpliedTarget = null, Facepunch.ActionGraphs.IActionGraphCache Cache = null, Facepunch.ActionGraphs.ISourceLocation SourceLocation = null, System.Collections.Generic.IReadOnlyDictionary`2<System.Guid,System.Guid> GuidMap = null, System.Boolean WriteCacheReferences = False, System.Boolean ForceUpdateCached = False, System.Boolean MakeGuidsUnique = False)protected SerializationOptions(Facepunch.ActionGraphs.SerializationOptions original)Methodspublic virtual Facepunch.ActionGraphs.SerializationOptions <Clone>$()public System.Void Deconstruct(Facepunch.ActionGraphs.InputDefinition ImpliedTarget, Facepunch.ActionGraphs.IActionGraphCache Cache, Facepunch.ActionGraphs.ISourceLocation SourceLocation, System.Collections.Generic.IReadOnlyDictionary`2<System.Guid,System.Guid> GuidMap, System.Boolean WriteCacheReferences, System.Boolean ForceUpdateCached, System.Boolean MakeGuidsUnique)protected virtual System.Boolean PrintMembers(System.Text.StringBuilder builder)Propertiespublic Facepunch.ActionGraphs.IActionGraphCache Facepunch.ActionGraphs.SerializationOptions.Cache { get; set; }public static Facepunch.ActionGraphs.SerializationOptions Facepunch.ActionGraphs.SerializationOptions.Empty { get; set; }protected virtual System.Type Facepunch.ActionGraphs.SerializationOptions.EqualityContract { get; set; }public System.Boolean Facepunch.ActionGraphs.SerializationOptions.ForceUpdateCached { get; set; }public System.Collections.Generic.IReadOnlyDictionary`2<System.Guid,System.Guid> Facepunch.ActionGraphs.SerializationOptions.GuidMap { get; set; }public Facepunch.ActionGraphs.InputDefinition Facepunch.ActionGraphs.SerializationOptions.ImpliedTarget { get; set; }public System.Boolean Facepunch.ActionGraphs.SerializationOptions.MakeGuidsUnique { get; set; }public Facepunch.ActionGraphs.ISourceLocation Facepunch.ActionGraphs.SerializationOptions.SourceLocation { get; set; }public System.Boolean Facepunch.ActionGraphs.SerializationOptions.WriteCacheReferences { get; set; }Metadata