Class ModeService
- Namespace
- MoonBark.GridPlacement.Core.Services.Mode
- Assembly
- MoonBark.GridPlacement.Core.dll
Default implementation of IModeService. Owns a single MoonBark.GridPlacement.Core.Services.Mode value and raises ModeChangedEvent when it changes.
public class ModeService : IModeService
- Inheritance
-
ModeService
- Implements
- Inherited Members
Constructors
ModeService()
public ModeService()
Properties
Current
Gets the current grid mode for the placement system.
public GridMode Current { get; }
Property Value
Methods
SetMode(GridMode)
Sets the current grid mode.
public void SetMode(GridMode mode)
Parameters
modeGridModeThe grid mode to switch to.
Remarks
If the mode does not change, this method is a no-op and does not raise ModeChanged.
Events
ModeChanged
Occurs when the current grid mode changes.
public event EventHandler<ModeChangedEvent>? ModeChanged
Event Type
Remarks
Raised only when SetMode(GridMode) updates the mode value.