Table of Contents

Class PutAwayAction

Namespace
TinyLife.Actions
Assembly
Tiny Life.dll

An action class used by PutAway. This action is exposed to allow the addition of custom put-away-able items by adding them to the Items collection.

public class PutAwayAction : MultiAction, IGenericDataHolder
Inheritance
JsonTypeSafeGenericDataHolder
PutAwayAction
Implements
IGenericDataHolder
Inherited Members
JsonTypeSafeGenericDataHolder.GetDataKeys()
Extension Methods

Fields

Items

A set of items for putting away, matched to a predicate that determines whether a given FurnitureType is an appropriate destination for the item. Putting an item away causes it to simply be deleted, so this behavior is used with items like Book and ToyCar. To add new items that can be put away, simply add them to this collection.

public static readonly Dictionary<FurnitureType, Func<Person, FurnitureType, bool>> Items

Field Value

Dictionary<FurnitureType, Func<Person, FurnitureType, bool>>

Methods

AndThenInitialize()

Initializes the main action. This method is called after Handler has all completed.

protected override void AndThenInitialize()

AndThenIsCompleted()

MultiAction version of IsCompleted(). This method returns whether or not the main action is completed.

protected override CompletionType AndThenIsCompleted()

Returns

CompletionType

Whether the main action is completed

CreateFirstActions()

Return a set of actions that should be executed before this action. Even if the yield statement is used, all actions will be collected into a list at the start of this action's invocation. If no action gets returned in this function, this action fails. If the returned set only contains null items, no first actions will be executed.

protected override IEnumerable<Action> CreateFirstActions()

Returns

IEnumerable<Action>

A set of actions that should run before this action