Class ObjectsFileItemTypeLoader
Class that represents an item type loader that reads from the objects file.
Inheritance
System.Object
ObjectsFileItemTypeLoader
Implements
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 SourceObjectsFileItemTypeLoader(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 SourceCommentSymbol
Character for comments.
Declaration
public const char CommentSymbol = '#'
Field Value
Type | Description |
---|---|
System.Char |
PropertyValueSeparator
Separator used for property and value pairs.
Declaration
public const char PropertyValueSeparator = '='
Field Value
Type | Description |
---|---|
System.Char |
Properties
| Improve this Doc View SourceLoaderOptions
Gets the loader options.
Declaration
public ObjectsFileItemTypeLoaderOptions LoaderOptions { get; }
Property Value
Type | Description |
---|---|
ObjectsFileItemTypeLoaderOptions |
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 SourceLoadTypes()
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. |