Table of Contents

Class PlaceableCollection

Namespace
MoonBark.GridPlacement.Core.Data
Assembly
MoonBark.GridPlacement.Core.dll

Collection of placeable objects

public class PlaceableCollection : IPlaceableCollection
Inheritance
PlaceableCollection
Implements
Inherited Members

Properties

Categories

Categories in this collection

public Dictionary<string, List<IPlaceable>> Categories { get; set; }

Property Value

Dictionary<string, List<IPlaceable>>

Count

Number of placeables in the collection

public int Count { get; }

Property Value

int

Placeables

All placeables in the collection

public IReadOnlyCollection<object> Placeables { get; }

Property Value

IReadOnlyCollection<object>

Methods

Add(object)

Adds a placeable to the collection

public void Add(object placeable)

Parameters

placeable object

Clear()

Clears all placeables from the collection

public void Clear()

Contains(object)

Checks if the collection contains a specific placeable

public bool Contains(object placeable)

Parameters

placeable object

Returns

bool

FindById(string)

Finds a placeable by ID

public IPlaceable? FindById(string id)

Parameters

id string

Returns

IPlaceable

FindByName(string)

Finds placeables by name

public IEnumerable<IPlaceable> FindByName(string name)

Parameters

name string

Returns

IEnumerable<IPlaceable>

GetAllPlaceables()

Gets all placeables as IPlaceable objects

public IEnumerable<IPlaceable> GetAllPlaceables()

Returns

IEnumerable<IPlaceable>

GetPlaceablesByCategory(string)

Gets placeables by category

public IEnumerable<IPlaceable> GetPlaceablesByCategory(string category)

Parameters

category string

Returns

IEnumerable<IPlaceable>

Remove(object)

Removes a placeable from the collection

public bool Remove(object placeable)

Parameters

placeable object

Returns

bool