Interface IContainerItem
Inherited Members
Namespace: Fibula.Items.Contracts.Abstractions
Assembly: Fibula.Items.Contracts.dll
Syntax
public interface IContainerItem : IItem, IThing, IEquatable<IThing>, ICloneableThing<IThing>, IContainedThing, IThingContainer, ILocatable
Fields
| Improve this Doc View SourceDefaultContainerCapacity
The default container capacity value.
Declaration
public const int DefaultContainerCapacity = 8
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
| Improve this Doc View SourceCapacity
Gets the capacity of this container.
Declaration
byte Capacity { get; }
Property Value
Type | Description |
---|---|
System.Byte |
Content
Gets the collection of items contained in this container.
Declaration
IList<IItem> Content { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<IItem> |
Item[Int32]
Attempts to retrieve an item from the contents of this container based on a given index.
Declaration
IItem this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index to retrieve. |
Property Value
Type | Description |
---|---|
IItem | The item retrieved, if any, or null. |
Methods
| Improve this Doc View SourceCountAmountAt(Byte, UInt16)
Counts the amount of the specified content item at a given index within this container.
Declaration
sbyte CountAmountAt(byte index, ushort typeIdExpected = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | index | The index at which to count. |
System.UInt16 | typeIdExpected | Optional. The type id of the content item expected to be found. |
Returns
Type | Description |
---|---|
System.SByte | The count of the item at the index. If |
IsChildOf(IItem)
Checks that this item's parents are not this same item.
Declaration
bool IsChildOf(IItem item)
Parameters
Type | Name | Description |
---|---|---|
IItem | item | The parent item to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if this item is child of any item in the parent hierarchy, false otherwise. |
Events
| Improve this Doc View SourceContentAdded
A delegate to invoke when new content is added to this container.
Declaration
event OnContentAdded ContentAdded
Event Type
Type | Description |
---|---|
OnContentAdded |
ContentRemoved
A delegate to invoke when content is removed from this container.
Declaration
event OnContentRemoved ContentRemoved
Event Type
Type | Description |
---|---|
OnContentRemoved |
ContentUpdated
A delegate to invoke when content is updated in this container.
Declaration
event OnContentUpdated ContentUpdated
Event Type
Type | Description |
---|---|
OnContentUpdated |