Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    IContentSerializer Interface

    Namespace: Stride.Core.Serialization.Contents
    Assembly: Stride.Core.Serialization.dll

    Serializer for high-level "chunk", used by ContentManager.

    public interface IContentSerializer
    Name Description
    Properties
    ActualType

    Gets the actual runtime type of object being serialized by Serialize(ContentSerializerContext, SerializationStream, Object). It could be different than SerializationType if a conversion happened.

    SerializationType

    Gets the type stored on HDD. Usually matches ActualType, but sometimes it might be converted to a different format (i.e. a GPU Texture is saved as an Image).

    Methods
    Construct(ContentSerializerContext)

    Constructs the specified object. This is useful if there is any cycle in the object graph reference.

    Serialize(ContentSerializerContext, SerializationStream, Object)

    Serializes the specified object.

    | Improve this Doc View Source

    Properties


    ActualType

    Gets the actual runtime type of object being serialized by Serialize(ContentSerializerContext, SerializationStream, Object). It could be different than SerializationType if a conversion happened.

    Type ActualType { get; }
    Property Value
    Type Description
    System.Type

    The actual type.


    SerializationType

    Gets the type stored on HDD. Usually matches ActualType, but sometimes it might be converted to a different format (i.e. a GPU Texture is saved as an Image).

    Type SerializationType { get; }
    Property Value
    Type Description
    System.Type

    The type stored on HDD.

    | Improve this Doc View Source

    Methods


    Construct(ContentSerializerContext)

    Constructs the specified object. This is useful if there is any cycle in the object graph reference.

    object Construct(ContentSerializerContext context)
    Parameters
    Type Name Description
    ContentSerializerContext context

    The context.

    Returns
    Type Description
    System.Object

    The newly built object.


    Serialize(ContentSerializerContext, SerializationStream, Object)

    Serializes the specified object.

    void Serialize(ContentSerializerContext context, SerializationStream stream, object obj)
    Parameters
    Type Name Description
    ContentSerializerContext context

    The context.

    SerializationStream stream

    The stream.

    System.Object obj

    The object.


    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation