Class ItemFactory
Class that represents an IItem factory.
Inheritance
System.Object
ItemFactory
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 SourceItemFactory(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 SourceApplicationContext
Gets the application context.
Declaration
public IApplicationContext ApplicationContext { get; }
Property Value
Type | Description |
---|---|
IApplicationContext |
Methods
| Improve this Doc View SourceCreate(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. |
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. |
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. |