Show / Hide Table of Contents

    Interface IContainerItem

    Interface for IItems that are containers for other IItems.

    Inherited Members
    IItem.Type
    IItem.Attributes
    IItem.Amount
    IItem.IsGround
    IItem.MovementPenalty
    IItem.StaysOnTop
    IItem.StaysOnBottom
    IItem.ChangesOnUse
    IItem.ChangeOnUseTo
    IItem.CanBeRotated
    IItem.RotateTo
    IItem.HasExpiration
    IItem.ExpirationTimeLeft
    IItem.ExpirationTarget
    IItem.IsLiquidPool
    IItem.IsLiquidSource
    IItem.IsLiquidContainer
    IItem.LiquidType
    IItem.BlocksThrow
    IItem.BlocksPass
    IItem.BlocksLay
    IItem.IsCumulative
    IItem.IsContainer
    IItem.CanBeDressed
    IItem.DressPosition
    IItem.HasCollision
    IItem.HasSeparation
    IItem.IsGroundFix
    IItem.Merge(IItem)
    IItem.Split(IItemFactory, Byte)
    IItem.IsPathBlocking(Byte)
    IThing.LocationChanged
    IThing.TypeId
    IThing.UniqueId
    IThing.CanBeMoved
    IThing.TrackedEvents
    IThing.DescribeForLogger()
    IThing.StartTrackingEvent(IEvent, String)
    IThing.StopTrackingEvent(IEvent, String)
    System.IEquatable<Fibula.Common.Contracts.Abstractions.IThing>.Equals(Fibula.Common.Contracts.Abstractions.IThing)
    ICloneableThing<IThing>.Clone()
    IContainedThing.ParentContainer
    IThingContainer.FindThingAtIndex(Byte)
    IThingContainer.AddContent(IThingFactory, IThing, Byte)
    IThingContainer.RemoveContent(IThingFactory, IThing, Byte, Byte)
    IThingContainer.ReplaceContent(IThingFactory, IThing, IThing, Byte, Byte)
    ILocatable.Location
    ILocatable.CarryLocation
    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 Source

    DefaultContainerCapacity

    The default container capacity value.

    Declaration
    public const int DefaultContainerCapacity = 8
    Field Value
    Type Description
    System.Int32

    Properties

    | Improve this Doc View Source

    Capacity

    Gets the capacity of this container.

    Declaration
    byte Capacity { get; }
    Property Value
    Type Description
    System.Byte
    | Improve this Doc View Source

    Content

    Gets the collection of items contained in this container.

    Declaration
    IList<IItem> Content { get; }
    Property Value
    Type Description
    System.Collections.Generic.IList<IItem>
    | Improve this Doc View Source

    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 Source

    CountAmountAt(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 typeIdExpected is specified, the value returned will only count if the type matches, otherwise -1 will be returned.

    | Improve this Doc View Source

    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 Source

    ContentAdded

    A delegate to invoke when new content is added to this container.

    Declaration
    event OnContentAdded ContentAdded
    Event Type
    Type Description
    OnContentAdded
    | Improve this Doc View Source

    ContentRemoved

    A delegate to invoke when content is removed from this container.

    Declaration
    event OnContentRemoved ContentRemoved
    Event Type
    Type Description
    OnContentRemoved
    | Improve this Doc View Source

    ContentUpdated

    A delegate to invoke when content is updated in this container.

    Declaration
    event OnContentUpdated ContentUpdated
    Event Type
    Type Description
    OnContentUpdated

    Extension Methods

    ContainerExtensions.GetParentContainerHierarchy(IContainedThing, Boolean)
    ContainerExtensions.GetParentContainerHierarchy(IThingContainer, Boolean)
    ItemExtensions.GetCarrier(IItem)
    ThingExtensions.RemainingExhaustionTime(IThing, ExhaustionType, DateTimeOffset)
    ThingExtensions.HasCondition(IThing, ConditionType)
    ThingExtensions.IsExhausted(IThing, ExhaustionType)
    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.