Show / Hide Table of Contents

    Class ItemFactory

    Class that represents an IItem factory.

    Inheritance
    System.Object
    ItemFactory
    Implements
    IItemFactory
    IThingFactory
    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.Items
    Assembly: Fibula.Items.dll
    Syntax
    public class ItemFactory : IItemFactory, IThingFactory

    Constructors

    | Improve this Doc View Source

    ItemFactory(IApplicationContext)

    Initializes a new instance of the ItemFactory class.

    Declaration
    public ItemFactory(IApplicationContext applicationContext)
    Parameters
    Type Name Description
    IApplicationContext applicationContext

    A reference to the application context.

    Properties

    | Improve this Doc View Source

    ApplicationContext

    Gets the application context.

    Declaration
    public IApplicationContext ApplicationContext { get; }
    Property Value
    Type Description
    IApplicationContext

    Methods

    | Improve this Doc View Source

    Create(IThingCreationArguments)

    Creates a new IThing.

    Declaration
    public IThing Create(IThingCreationArguments creationArguments)
    Parameters
    Type Name Description
    IThingCreationArguments creationArguments

    The arguments for the IThing creation.

    Returns
    Type Description
    IThing

    A new instance of the IThing.

    | Improve this Doc View Source

    CreateItem(IThingCreationArguments)

    Creates a new IItem given the id of its type.

    Declaration
    public IItem CreateItem(IThingCreationArguments creationArguments)
    Parameters
    Type Name Description
    IThingCreationArguments creationArguments

    The id of the type.

    Returns
    Type Description
    IItem

    The new IItem instance.

    | Improve this Doc View Source

    FindTypeById(UInt16)

    Looks up an IItemTypeEntity given a type id.

    Declaration
    public IItemTypeEntity FindTypeById(ushort typeId)
    Parameters
    Type Name Description
    System.UInt16 typeId

    The id of the type to look for.

    Returns
    Type Description
    IItemTypeEntity

    A reference to the IItemTypeEntity found, and null if not found.

    Implements

    IItemFactory
    IThingFactory

    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.