Class SliceReducerSwitchBuilder<TState>
The Slice Reducer Switch Builder is used to build a reducer switch statement via method chaining. This builder does not require you to create Action Creators. It will automatically create them for you.
Inheritance
SwitchBuilder<SliceReducerSwitchBuilder<TState>, TState>
SliceReducerSwitchBuilder<TState>
Implements
ISwitchBuilder<SliceReducerSwitchBuilder<TState>, TState>
Inherited Members
Namespace: Unity.AppUI.Redux
Assembly: Unity.AppUI.Redux.dll
Syntax
public class SliceReducerSwitchBuilder<TState> : SwitchBuilder<SliceReducerSwitchBuilder<TState>, TState>, ISwitchBuilder<SliceReducerSwitchBuilder<TState>, TState>
Type Parameters
| Name | Description |
|---|---|
| TState | The type of the state slice. |
Constructors
SliceReducerSwitchBuilder(string)
Creates a new Slice Reducer Switch Builder.
Declaration
public SliceReducerSwitchBuilder(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the slice. |
Properties
name
The name of the slice.
Declaration
public string name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
ValidateCase(IActionCreator, object)
Validates the case to ensure it is not a duplicate.
Declaration
protected override void ValidateCase(IActionCreator actionCreator, object reducer)
Parameters
| Type | Name | Description |
|---|---|---|
| IActionCreator | actionCreator | The action creator. |
| object | reducer | The reducer. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if the action creator or reducer is null. |
| InvalidOperationException | Thrown if the action type is already handled. |
| InvalidOperationException | Thrown if the action type does not start with the slice name. |