Show / Hide Table of Contents

    Class ObjectsFileItemTypeLoader

    Class that represents an item type loader that reads from the objects file.

    Inheritance
    System.Object
    ObjectsFileItemTypeLoader
    Implements
    IItemTypeLoader
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Fibula.Data.Loaders.ObjectsFile
    Assembly: Fibula.Data.Loaders.ObjectsFile.dll
    Syntax
    public class ObjectsFileItemTypeLoader : IItemTypeLoader
    Remarks

    An item definition starts and ends with blank lines.

    TypeID = 1 # body container Name = "" Flags = {Container,Take} Attributes = {Capacity=1,Weight=0} .

    Constructors

    | Improve this Doc View Source

    ObjectsFileItemTypeLoader(ILogger, IOptions<ObjectsFileItemTypeLoaderOptions>)

    Initializes a new instance of the ObjectsFileItemTypeLoader class.

    Declaration
    public ObjectsFileItemTypeLoader(ILogger logger, IOptions<ObjectsFileItemTypeLoaderOptions> options)
    Parameters
    Type Name Description
    Serilog.ILogger logger

    A reference to the logger instance.

    Microsoft.Extensions.Options.IOptions<ObjectsFileItemTypeLoaderOptions> options

    The options for this loader.

    Fields

    | Improve this Doc View Source

    CommentSymbol

    Character for comments.

    Declaration
    public const char CommentSymbol = '#'
    Field Value
    Type Description
    System.Char
    | Improve this Doc View Source

    PropertyValueSeparator

    Separator used for property and value pairs.

    Declaration
    public const char PropertyValueSeparator = '='
    Field Value
    Type Description
    System.Char

    Properties

    | Improve this Doc View Source

    LoaderOptions

    Gets the loader options.

    Declaration
    public ObjectsFileItemTypeLoaderOptions LoaderOptions { get; }
    Property Value
    Type Description
    ObjectsFileItemTypeLoaderOptions
    | Improve this Doc View Source

    Logger

    Gets the logger to use in this handler.

    Declaration
    public ILogger Logger { get; }
    Property Value
    Type Description
    Serilog.ILogger

    Methods

    | Improve this Doc View Source

    LoadTypes()

    Attempts to load the item catalog.

    Declaration
    public IDictionary<ushort, IItemTypeEntity> LoadTypes()
    Returns
    Type Description
    System.Collections.Generic.IDictionary<System.UInt16, IItemTypeEntity>

    The catalog, containing a mapping of loaded id to the item types.

    Implements

    IItemTypeLoader

    Extension Methods

    ObjectExtensions.YieldSingleItem<T>(T)
    ObjectExtensions.GetPropertyValue(Object, String)
    Validate.ThrowIfNull(Object, String)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018-2020 | The Fibula Project
    Generated using DocFX | Jose L. Nuñez de Caceres et al.