docs.unity3d.com
    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
    SliceReducerSwitchBuilder<TState>
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.AppUI.Redux
    Syntax
    public class SliceReducerSwitchBuilder<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

    Add(String, CaseReducer<TState>)

    Adds a case to the reducer switch statement.

    Declaration
    public SliceReducerSwitchBuilder<TState> Add(string actionType, CaseReducer<TState> reducer)
    Parameters
    Type Name Description
    String actionType

    The action type you want to handle.

    CaseReducer<TState> reducer

    The reducer function for the action type you want to handle.

    Returns
    Type Description
    SliceReducerSwitchBuilder<TState>

    The Slice Reducer Switch Builder.

    Add(CaseReducer<TState>)

    Adds a case to the reducer switch statement.

    Declaration
    public SliceReducerSwitchBuilder<TState> Add(CaseReducer<TState> reducer)
    Parameters
    Type Name Description
    CaseReducer<TState> reducer

    The reducer function for the action type you want to handle.

    Returns
    Type Description
    SliceReducerSwitchBuilder<TState>

    The Slice Reducer Switch Builder.

    Add<T>(String, CaseReducer<T, TState>)

    Adds a case to the reducer switch statement.

    Declaration
    public SliceReducerSwitchBuilder<TState> Add<T>(string actionType, CaseReducer<T, TState> reducer)
    Parameters
    Type Name Description
    String actionType

    The action type you want to handle.

    CaseReducer<T, TState> reducer

    The reducer function for the action type you want to handle.

    Returns
    Type Description
    SliceReducerSwitchBuilder<TState>

    The Slice Reducer Switch Builder.

    Type Parameters
    Name Description
    T

    The type of the payload.

    Add<T>(CaseReducer<T, TState>)

    Adds a case to the reducer switch statement.

    Declaration
    public SliceReducerSwitchBuilder<TState> Add<T>(CaseReducer<T, TState> reducer)
    Parameters
    Type Name Description
    CaseReducer<T, TState> reducer

    The reducer function for the action type you want to handle.

    Returns
    Type Description
    SliceReducerSwitchBuilder<TState>

    The Slice Reducer Switch Builder.

    Type Parameters
    Name Description
    T

    The type of the payload.

    BuildReducers(IEnumerable<ActionCreator>)

    Build the reducer switch statement.

    Declaration
    public Action<ReducerSwitchBuilder<TState>> BuildReducers(IEnumerable<ActionCreator> actionCreatorCollection)
    Parameters
    Type Name Description
    IEnumerable<ActionCreator> actionCreatorCollection

    The collection of Action Creators.

    Returns
    Type Description
    Action<ReducerSwitchBuilder<TState>>

    The reducer switch statement.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023