Пример #1
0
        public Result Save <T>(T data, string fullPath = null)
        {
            switch (data)
            {
            case Entities d:
                var entitiesConfig = new EntityClassesFile(_gamePaths);
                _gameDataRepository.SaveConfigData(entitiesConfig, d, fullPath);
                break;

            case EntityGroups d:
                var entityGroupsConfig = new EntityGroupsFile(_gamePaths);
                _gameDataRepository.SaveConfigData(entityGroupsConfig, d, fullPath);
                break;
            }

            return(Result.Ok());
        }