docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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
    object
    SwitchBuilder<SliceReducerSwitchBuilder<TState>, TState>
    SliceReducerSwitchBuilder<TState>
    Implements
    ISwitchBuilder<SliceReducerSwitchBuilder<TState>, TState>
    Inherited Members
    SwitchBuilder<SliceReducerSwitchBuilder<TState>, TState>.m_ActionTypes
    SwitchBuilder<SliceReducerSwitchBuilder<TState>, TState>.ValidateCase(IActionCreator, object)
    SwitchBuilder<SliceReducerSwitchBuilder<TState>, TState>.AddCase(IActionCreator, Reducer<TState>)
    SwitchBuilder<SliceReducerSwitchBuilder<TState>, TState>.AddCase<TPayload>(IActionCreator<TPayload>, Reducer<TPayload, TState>)
    SwitchBuilder<SliceReducerSwitchBuilder<TState>, TState>.GetActionCreators()
    SwitchBuilder<SliceReducerSwitchBuilder<TState>, TState>.GetReducer()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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
    SwitchBuilder<SliceReducerSwitchBuilder<TState>, TState>.ValidateCase(IActionCreator, object)
    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.

    Implements

    ISwitchBuilder<TBuilder, TState>
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)