withSIX.Play.Core.Games.Legacy.Mods.ModState.DoesRepoExist C# (CSharp) Méthode

DoesRepoExist() public méthode

public DoesRepoExist ( ) : bool
Résultat bool
        public bool DoesRepoExist() => _repoPath != null && _repoPath.Exists;

Usage Example

        public async Task ConvertOrInstallOrUpdateInternal(IAbsoluteDirectoryPath path, bool force,
                                                           StatusRepo statusRepo, ModState modState, IAbsoluteDirectoryPath packPath)
        {
            if (path == null)
            {
                throw new ArgumentNullException(nameof(path));
            }
            if (statusRepo == null)
            {
                throw new ArgumentNullException(nameof(statusRepo));
            }
            if (modState == null)
            {
                throw new ArgumentNullException(nameof(modState));
            }

            _path = path;

            var opts = GetOptions(statusRepo, packPath.ToString(), force);

            if (!modState.Exists)
            {
                await Install(opts).ConfigureAwait(false);

                return;
            }

            var updateAvailable = modState.State != ContentState.Uptodate;

            if (modState.DoesRepoExist())
            {
                await Update(opts, null, !updateAvailable).ConfigureAwait(false);
            }
            else
            {
                var repo = Convert(opts);
                await Update(opts, repo).ConfigureAwait(false);
            }
        }
All Usage Examples Of withSIX.Play.Core.Games.Legacy.Mods.ModState::DoesRepoExist