Search Results for

    Show / Hide Table of Contents

    Class FileInfoPart

    This class represents a file info asset part.

    Inheritance
    object
    IdentifiableObject
    AssetPart
    FileInfoPart
    Inherited Members
    IdentifiableObject.Id
    IdentifiableObject.IdHasChanged(Guid)
    Namespace: Evergine.Framework.Assets.AssetParts
    Assembly: Evergine.Framework.dll
    Syntax
    public class FileInfoPart : AssetPart

    Constructors

    FileInfoPart()

    Initializes a new instance of the FileInfoPart class.

    Declaration
    public FileInfoPart()

    FileInfoPart(string, byte[])

    Initializes a new instance of the FileInfoPart class.

    Declaration
    public FileInfoPart(string filename, byte[] data)
    Parameters
    Type Name Description
    string filename

    The filename.

    byte[] data

    The file data.

    Fields

    FileData

    The file data byte array. You must use the property FileDataSize to read the array.

    Declaration
    public byte[] FileData
    Field Value
    Type Description
    byte[]

    FileDataSize

    Gets the size of the file data.

    Declaration
    public int FileDataSize
    Field Value
    Type Description
    int

    FileName

    The filename.

    Declaration
    public string FileName
    Field Value
    Type Description
    string

    Properties

    AsText

    Gets the file data as a text string.

    Declaration
    public string AsText { get; }
    Property Value
    Type Description
    string

    Methods

    Free()

    Releases the resources used by this instance.

    Declaration
    public void Free()

    Read(BinaryReader)

    Reads the file info part.

    Declaration
    public static FileInfoPart Read(BinaryReader reader)
    Parameters
    Type Name Description
    BinaryReader reader

    The binary reader.

    Returns
    Type Description
    FileInfoPart

    The file info part.

    ReadAsync(string, FileStream)

    Reads the file info part from a file stream asynchronously.

    Declaration
    public static Task<FileInfoPart> ReadAsync(string name, FileStream fileStream)
    Parameters
    Type Name Description
    string name

    The name.

    FileStream fileStream

    The file stream.

    Returns
    Type Description
    Task<FileInfoPart>

    The File Info Part asynchronous task.

    Write(BinaryWriter)

    Writes the sub-asset.

    Declaration
    public override void Write(BinaryWriter writer)
    Parameters
    Type Name Description
    BinaryWriter writer

    The stream.

    Overrides
    AssetPart.Write(BinaryWriter)

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX