Skip to content

Commit 2656c0f

Browse files
committed
Update docs
1 parent 7b41081 commit 2656c0f

File tree

5 files changed

+15
-12
lines changed

5 files changed

+15
-12
lines changed

src/NexusMods.Abstractions.Loadouts.Synchronizers/ALoadoutSynchronizer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,7 +1525,7 @@ public async Task<bool> ReindexState(GameInstallation installation, ITransaction
15251525
var indexGameResult = await _gameLocationsService.IndexGame(
15261526
installation: installation,
15271527
previousDiskState: previousState,
1528-
filter: LocationsFilter,
1528+
filter: GamePathFilter,
15291529
cancellationToken: CancellationToken.None
15301530
);
15311531

@@ -1610,7 +1610,7 @@ private LoadoutGameFilesGroup.New CreateLoadoutGameFilesGroup(LoadoutId loadout,
16101610
/// Files ignored by this method will not be included in the sync tree. Prefer not including
16111611
/// the path in the first place instead of using this method.
16121612
/// </remarks>
1613-
protected virtual ILocationsFilter LocationsFilter { get; } = Synchronizers.LocationsFilter.Empty;
1613+
protected virtual IGamePathFilter GamePathFilter { get; } = Synchronizers.GamePathFilters.Empty;
16141614

16151615
/// <summary>
16161616
/// Gets a set of files intrinsic to this game. Such as mod order files, preference files, etc.

src/NexusMods.Abstractions.Loadouts.Synchronizers/IGameLocationsService.cs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,38 @@ public record IndexGameResult(
2121
FrozenSet<GamePath> RemovedFiles
2222
);
2323

24+
/// <summary>
25+
/// Service responsible for handling operations on game locations/installations.
26+
/// </summary>
2427
[PublicAPI]
2528
public interface IGameLocationsService
2629
{
2730
Task<IndexGameResult> IndexGame(
2831
GameInstallation installation,
2932
FrozenDictionary<GamePath, DiskStateEntry.ReadOnly> previousDiskState,
30-
ILocationsFilter filter,
33+
IGamePathFilter filter,
3134
CancellationToken cancellationToken = default
3235
);
3336

3437
// Task RemoveEmptyDirectories(GameInstallation installation, CancellationToken cancellationToken = default);
3538
}
3639

3740
[PublicAPI]
38-
public interface ILocationsFilter
41+
public interface IGamePathFilter
3942
{
4043
bool ShouldFilter(GamePath gamePath);
4144
}
4245

43-
public static class LocationsFilter
46+
public static class GamePathFilters
4447
{
45-
public static readonly ILocationsFilter Empty = new EmptyFilter();
48+
public static readonly IGamePathFilter Empty = new EmptyFilter();
4649

47-
public static ILocationsFilter Create(Func<GamePath, bool> predicate)
50+
public static IGamePathFilter Create(Func<GamePath, bool> predicate)
4851
{
4952
return new PredicateFilter(predicate);
5053
}
5154

52-
private class PredicateFilter : ILocationsFilter
55+
private class PredicateFilter : IGamePathFilter
5356
{
5457
private readonly Func<GamePath, bool> _predicate;
5558

@@ -61,7 +64,7 @@ public PredicateFilter(Func<GamePath, bool> predicate)
6164
public bool ShouldFilter(GamePath gamePath) => _predicate(gamePath);
6265
}
6366

64-
private class EmptyFilter : ILocationsFilter
67+
private class EmptyFilter : IGamePathFilter
6568
{
6669
public bool ShouldFilter(GamePath gamePath) => false;
6770
}

src/NexusMods.Backend/Game/GameLocationsService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public GameLocationsService(IServiceProvider serviceProvider)
3030
public async Task<IndexGameResult> IndexGame(
3131
GameInstallation installation,
3232
FrozenDictionary<GamePath, DiskStateEntry.ReadOnly> previousDiskState,
33-
ILocationsFilter filter,
33+
IGamePathFilter filter,
3434
CancellationToken outerToken = default)
3535
{
3636
var topLevelLocations = installation.LocationsRegister.GetTopLevelLocations();

src/NexusMods.Games.CreationEngine/ACreationEngineSynchronizer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected ACreationEngineSynchronizer(IServiceProvider provider, ICreationEngine
2424

2525

2626
private static readonly GamePath SavesPath = new GamePath(LocationId.Preferences, "Saves");
27-
protected override ILocationsFilter LocationsFilter { get; } = NexusMods.Abstractions.Loadouts.Synchronizers.LocationsFilter.Create(path => path.InFolder(SavesPath));
27+
protected override IGamePathFilter GamePathFilter { get; } = NexusMods.Abstractions.Loadouts.Synchronizers.GamePathFilters.Create(path => path.InFolder(SavesPath));
2828

2929
public override Dictionary<GamePath, IIntrinsicFile> IntrinsicFiles(Loadout.ReadOnly _) => _intrinsicFiles;
3030

src/NexusMods.Games.Larian/BaldursGate3/BaldursGate3Synchronizer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public BaldursGate3Synchronizer(IServiceProvider provider) : base(provider)
1919
_settings = settingsManager.Get<BaldursGate3Settings>();
2020
}
2121

22-
protected override ILocationsFilter LocationsFilter { get; } = Abstractions.Loadouts.Synchronizers.LocationsFilter.Create(path =>
22+
protected override IGamePathFilter GamePathFilter { get; } = Abstractions.Loadouts.Synchronizers.GamePathFilters.Create(path =>
2323
{
2424
// ignore all files inside the public player profiles directory except the modsettings.lsx file
2525
if (path.InFolder(PublicPlayerProfiles)) return !path.Equals(ModSettingsFile);

0 commit comments

Comments
 (0)