Search Results for

    Show / Hide Table of Contents

    Struct CodecElement<TObj, TEnc>

    An encoder/decoder for a specific type of object.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Flame.Ir
    Assembly: Flame.Ir.dll
    Syntax
    public struct CodecElement<TObj, TEnc>
    Type Parameters
    Name Description
    TObj
    TEnc

    Constructors

    | Edit this page View Source

    CodecElement(Symbol, Func<TObj, EncoderState, TEnc>, Func<TEnc, DecoderState, TObj>)

    Creates a codec for a specific type of object.

    Declaration
    public CodecElement(Symbol identifier, Func<TObj, EncoderState, TEnc> encode, Func<TEnc, DecoderState, TObj> decode)
    Parameters
    Type Name Description
    Symbol identifier

    An identifier for encoded objects.

    Func<TObj, EncoderState, TEnc> encode

    A delegate that encodes objects.

    Func<TEnc, DecoderState, TObj> decode

    A delegate that decodes objects.

    | Edit this page View Source

    CodecElement(string, Func<TObj, EncoderState, TEnc>, Func<TEnc, DecoderState, TObj>)

    Creates a codec for a specific type of object.

    Declaration
    public CodecElement(string identifier, Func<TObj, EncoderState, TEnc> encode, Func<TEnc, DecoderState, TObj> decode)
    Parameters
    Type Name Description
    string identifier

    An identifier for encoded objects.

    Func<TObj, EncoderState, TEnc> encode

    A delegate that encodes objects.

    Func<TEnc, DecoderState, TObj> decode

    A delegate that decodes objects.

    Properties

    | Edit this page View Source

    Decode

    Decodes an object's data.

    Declaration
    public readonly Func<TEnc, DecoderState, TObj> Decode { get; }
    Property Value
    Type Description
    Func<TEnc, DecoderState, TObj>

    A delegate that decodes objects.

    | Edit this page View Source

    Encode

    Encodes an object's data.

    Declaration
    public readonly Func<TObj, EncoderState, TEnc> Encode { get; }
    Property Value
    Type Description
    Func<TObj, EncoderState, TEnc>

    A delegate that encodes objects.

    | Edit this page View Source

    Identifier

    Gets an identifier for encoded objects.

    Declaration
    public readonly Symbol Identifier { get; }
    Property Value
    Type Description
    Symbol

    The encoded object identifier.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX