API ReferenceFacepunch.ActionGraphs

SerializationOptionsclass

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

objectSerializationOptions
Namespace
Facepunch.ActionGraphs
Assembly
Facepunch.ActionGraphs
Declaration
public class Facepunch.ActionGraphs.SerializationOptions

Constructors2

Showing 2 constructors

Methods3

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)PUBLIC

ParameterTypeDescription
ImpliedTargetInputDefinition
CacheIActionGraphCache
SourceLocationISourceLocation
GuidMapIReadOnlyDictionary<Guid,Guid>
WriteCacheReferencesbool
ForceUpdateCachedbool
MakeGuidsUniquebool
Returns:void

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

ParameterTypeDescription
builderStringBuilder
Returns:bool

Properties9

Showing 9 properties

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

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.

protected virtual System.Type Facepunch.ActionGraphs.SerializationOptions.EqualityContract { get; set; }PROTECTEDVIRTUALGETSET

Returns:Type

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

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

Returns:bool

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

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

Returns:IReadOnlyDictionary<Guid,Guid>

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

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.

Returns:InputDefinition

public bool Facepunch.ActionGraphs.SerializationOptions.MakeGuidsUnique { get; set; }PUBLICGETSET

Returns:bool

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

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

Returns:bool

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