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
Count
Number of placeables in the collection
public int Count { get; }
Property Value
Placeables
All placeables in the collection
public IReadOnlyCollection<object> Placeables { get; }
Property Value
Methods
Add(object)
Adds a placeable to the collection
public void Add(object placeable)
Parameters
placeableobject
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
placeableobject
Returns
FindById(string)
Finds a placeable by ID
public IPlaceable? FindById(string id)
Parameters
idstring
Returns
FindByName(string)
Finds placeables by name
public IEnumerable<IPlaceable> FindByName(string name)
Parameters
namestring
Returns
GetAllPlaceables()
Gets all placeables as IPlaceable objects
public IEnumerable<IPlaceable> GetAllPlaceables()
Returns
GetPlaceablesByCategory(string)
Gets placeables by category
public IEnumerable<IPlaceable> GetPlaceablesByCategory(string category)
Parameters
categorystring
Returns
Remove(object)
Removes a placeable from the collection
public bool Remove(object placeable)
Parameters
placeableobject