GetOrCreateState(string, Func<TArg, TState>, TArg)
protected TState GetOrCreateState<TArg, TState>(string name, Func<TArg, TState> createState, TArg arg) Gets the registered state with the specified name or creates it using the supplied factory and argument.
Parameters
namestring- The name used to register the state.
createStateFunc<TArg, TState>- The factory used to create the state when it is not already registered.
argTArg- The argument passed to
createState.
Returns
The existing or newly created state.
