protected IControllerAnswer Open(string controllerName, PlayerInfo info, T data) { ControllerBase <T> controller = ControllersProvider.ResolveControllerByName(controllerName); data.ControllersStack.Add(controllerName); return(controller.OnOpen(info, data)); }
protected IControllerAnswer Back(PlayerInfo info, T data) { if (data.ControllersStack.Count > 0) { data.ControllersStack.RemoveAt(data.ControllersStack.Count - 1); } string currentControllerName = data.ControllersStack.LastOrDefault() ?? ControllersProvider.MainControllerName; ControllerBase <T> controller = ControllersProvider.ResolveControllerByName(currentControllerName); return(controller.OnOpen(info, data)); }