Home Manual Reference Source Repository
import {GenericSerializer} from 'ug-layout/serialization/GenericSerializer'
public class | source

GenericSerializer

Implements:

  • Serializer<R, Serialized>

A serializer that can be used for renderables that don't container any special logic or configuration.

Constructor Summary

Public Constructor
public

constructor(_name: string, _Class: ConfigureableType<R>)

Creates an instance of GenericSerializer.

Method Summary

Public Methods
public

deserialize(node: Serialized): RenderableArg<R>

Deserializes the node.

public

Registers this class with the container.

public

serialize(node: R): Serialized

Serializes the renderable.

Public Constructors

public constructor(_name: string, _Class: ConfigureableType<R>) source

Creates an instance of GenericSerializer.

Params:

NameTypeAttributeDescription
_name string
_Class ConfigureableType<R>

Public Methods

public deserialize(node: Serialized): RenderableArg<R> source

Deserializes the node.

Params:

NameTypeAttributeDescription
node Serialized

Return:

RenderableArg<R>

public register(container: SerializerContainer) source

Registers this class with the container.

Params:

NameTypeAttributeDescription
container SerializerContainer

public serialize(node: R): Serialized source

Serializes the renderable.

Params:

NameTypeAttributeDescription
node R

Return:

Serialized