Skip to content

Commit

Permalink
Update GameFinder namespaces
Browse files Browse the repository at this point in the history
See #15
  • Loading branch information
Nutzzz committed Feb 14, 2024
1 parent d16f7ae commit 7d18706
Show file tree
Hide file tree
Showing 147 changed files with 244 additions and 244 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ var handler = new EGSHandler(wineRegistry, wineFileSystem);

### Default Prefix Manager

`GameFinder.Wine` implements a `IWinePrefixManager` for finding Wine prefixes.
`GameCollector.Wine` implements a `IWinePrefixManager` for finding Wine prefixes.

**Usage**:

Expand All @@ -314,7 +314,7 @@ foreach (var result in prefixManager.FindPrefixes())

### Bottles

`GameFinder.Wine` implements a `IWinePrefixManager` for finding Wine prefixes managed by [Bottles](https://usebottles.com/).
`GameCollector.Wine` implements a `IWinePrefixManager` for finding Wine prefixes managed by [Bottles](https://usebottles.com/).

**Usage**:

Expand All @@ -335,7 +335,7 @@ foreach (var result in prefixManager.FindPrefixes())

### Proton

Valve's [Proton](https://github.com/ValveSoftware/Proton) is a compatibility tool for Steam and is mostly based on Wine. The Wine prefixes managed by Proton are in the `compatdata` directory of the steam library where the game itself is installed. Since the path is relative to the game itself and requires the app id, erri120 decided to put this functionality in `GameFinder.StoreHandlers.Steam`:
Valve's [Proton](https://github.com/ValveSoftware/Proton) is a compatibility tool for Steam and is mostly based on Wine. The Wine prefixes managed by Proton are in the `compatdata` directory of the steam library where the game itself is installed. Since the path is relative to the game itself and requires the app id, erri120 decided to put this functionality in the Steam store handler:

```csharp
SteamGame? steamGame = steamHandler.FindOneGameById(1237970, out var errors);
Expand All @@ -356,17 +356,17 @@ Self-contained deployments and executables can be [trimmed](https://learn.micros

**Trimmable**:

- `GameFinder.Common`
- `GameFinder.RegistryUtils`
- `GameFinder.Wine`
- `GameFinder.StoreHandlers.Steam`
- `GameFinder.StoreHandlers.GOG`
- `GameFinder.StoreHandlers.EGS`
- `GameFinder.StoreHandlers.Origin`
- `GameCollector.Common`
- `GameCollector.RegistryUtils`
- `GameCollector.Wine`
- `GameCollector.StoreHandlers.Steam`
- `GameCollector.StoreHandlers.GOG`
- `GameCollector.StoreHandlers.EGS`
- `GameCollector.StoreHandlers.Origin`

**NOT Trimmable**:

- `GameFinder.StoreHandlers.EADesktop`: This package references `System.Management`, which is **not trimmable** due to COM interop issues. See [dotnet/runtime#78038](https://github.com/dotnet/runtime/issues/78038), [dotnet/runtime#75176](https://github.com/dotnet/runtime/pull/75176) and [dotnet/runtime#61960](https://github.com/dotnet/runtime/issues/61960) for more details.
- `GameCollector.StoreHandlers.EADesktop`: This package references `System.Management`, which is **not trimmable** due to COM interop issues. See [dotnet/runtime#78038](https://github.com/dotnet/runtime/issues/78038), [dotnet/runtime#75176](https://github.com/dotnet/runtime/pull/75176) and [dotnet/runtime#61960](https://github.com/dotnet/runtime/issues/61960) for more details.

I recommend looking at the [project file](./other/GameFinder.Example/GameFinder.Example.csproj) of the example project, if you run into warnings or errors with trimming.

Expand Down
2 changes: 1 addition & 1 deletion other/GameFinder.Example/GameFinder.Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<ItemGroup>
<ProjectReference Include="..\..\src\GameFinder.StoreHandlers.EADesktop\GameFinder.StoreHandlers.EADesktop.csproj" />
<TrimmerRootAssembly Include="GameFinder.StoreHandlers.EADesktop" />
<TrimmerRootAssembly Include="GameCollector.StoreHandlers.EADesktop" />
<TrimmerRootAssembly Include="System.Management" />
</ItemGroup>

Expand Down
8 changes: 4 additions & 4 deletions other/GameFinder.Example/GameFinderRoots.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<type fullname="GameFinder.Example.Options" />
</assembly>

<assembly fullname="GameFinder.StoreHandlers.Xbox">
<assembly fullname="GameCollector.StoreHandlers.Xbox">
<!-- XML Deserialization doesn't support source generators yet -->
<type fullname="GameFinder.StoreHandlers.Xbox.Package" />
<type fullname="GameFinder.StoreHandlers.Xbox.Properties" />
<type fullname="GameFinder.StoreHandlers.Xbox.Identity" />
<type fullname="GameCollector.StoreHandlers.Xbox.Package" />
<type fullname="GameCollector.StoreHandlers.Xbox.Properties" />
<type fullname="GameCollector.StoreHandlers.Xbox.Identity" />
</assembly>

<assembly fullname="GameCollector.EmuHandlers.BigFish">
Expand Down
20 changes: 10 additions & 10 deletions other/GameFinder.Example/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
using CommandLine;
using GameFinder.Common;
using GameFinder.RegistryUtils;
using GameFinder.StoreHandlers.EADesktop;
using GameFinder.StoreHandlers.EADesktop.Crypto;
using GameFinder.StoreHandlers.EADesktop.Crypto.Windows;
using GameFinder.StoreHandlers.EGS;
using GameFinder.StoreHandlers.GOG;
using GameFinder.StoreHandlers.Origin;
using GameFinder.StoreHandlers.Steam;
using GameFinder.StoreHandlers.Xbox;
using GameFinder.Wine;
using GameFinder.Wine.Bottles;
using GameCollector.StoreHandlers.EADesktop;
using GameCollector.StoreHandlers.EADesktop.Crypto;
using GameCollector.StoreHandlers.EADesktop.Crypto.Windows;
using GameCollector.StoreHandlers.EGS;
using GameCollector.StoreHandlers.GOG;
using GameCollector.StoreHandlers.Origin;
using GameCollector.StoreHandlers.Steam;
using GameCollector.StoreHandlers.Xbox;
using GameCollector.Wine;
using GameCollector.Wine.Bottles;
using GameCollector.StoreHandlers.Amazon;
using GameCollector.StoreHandlers.Arc;
using GameCollector.StoreHandlers.BattleNet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.IO;
using System.Security.Cryptography;

namespace GameFinder.StoreHandlers.EADesktop.Crypto;
namespace GameCollector.StoreHandlers.EADesktop.Crypto;

[SuppressMessage("ReSharper", "InconsistentNaming")]
internal static class Decryption
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using JetBrains.Annotations;

namespace GameFinder.StoreHandlers.EADesktop.Crypto;
namespace GameCollector.StoreHandlers.EADesktop.Crypto;

/// <summary>
/// Represents an Exception thrown by <see cref="IHardwareInfoProvider"/>.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Text;

namespace GameFinder.StoreHandlers.EADesktop.Crypto;
namespace GameCollector.StoreHandlers.EADesktop.Crypto;

internal static class HardwareInformation
{
Expand Down
2 changes: 1 addition & 1 deletion src/GameFinder.StoreHandlers.EADesktop/Crypto/Hashing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Text;
using SHA3.Net;

namespace GameFinder.StoreHandlers.EADesktop.Crypto;
namespace GameCollector.StoreHandlers.EADesktop.Crypto;

[SuppressMessage("ReSharper", "InconsistentNaming")]
internal static class Hashing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using JetBrains.Annotations;

namespace GameFinder.StoreHandlers.EADesktop.Crypto;
namespace GameCollector.StoreHandlers.EADesktop.Crypto;

/// <summary>
/// Represents a Hardware Info Provider.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
using System.Globalization;
using System.Runtime.Versioning;
using JetBrains.Annotations;
using static GameFinder.StoreHandlers.EADesktop.Crypto.Windows.WMIHelper;
using static GameCollector.StoreHandlers.EADesktop.Crypto.Windows.WMIHelper;

namespace GameFinder.StoreHandlers.EADesktop.Crypto.Windows;
namespace GameCollector.StoreHandlers.EADesktop.Crypto.Windows;

/// <summary>
/// Implementation of <see cref="IHardwareInfoProvider"/> that uses WMI and GetVolumeInformationW.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Runtime.Versioning;
using System.Text;

namespace GameFinder.StoreHandlers.EADesktop.Crypto.Windows;
namespace GameCollector.StoreHandlers.EADesktop.Crypto.Windows;

[SupportedOSPlatform("windows")]
[ExcludeFromCodeCoverage(Justification = "Uses DllImport.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Management;
using System.Runtime.Versioning;

namespace GameFinder.StoreHandlers.EADesktop.Crypto.Windows;
namespace GameCollector.StoreHandlers.EADesktop.Crypto.Windows;

[SupportedOSPlatform("windows")]
[SuppressMessage("ReSharper", "InconsistentNaming")]
Expand Down
2 changes: 1 addition & 1 deletion src/GameFinder.StoreHandlers.EADesktop/EADesktopGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using JetBrains.Annotations;
using NexusMods.Paths;

namespace GameFinder.StoreHandlers.EADesktop;
namespace GameCollector.StoreHandlers.EADesktop;

/// <summary>
/// Represents a game installed with the EA Desktop app.
Expand Down
2 changes: 1 addition & 1 deletion src/GameFinder.StoreHandlers.EADesktop/EADesktopGameId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using JetBrains.Annotations;
using TransparentValueObjects;

namespace GameFinder.StoreHandlers.EADesktop;
namespace GameCollector.StoreHandlers.EADesktop;

/// <summary>
/// Represents an id for games installed with EA Desktop.
Expand Down
6 changes: 3 additions & 3 deletions src/GameFinder.StoreHandlers.EADesktop/EADesktopHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
using System.Xml.Serialization;
using GameFinder.Common;
using GameFinder.RegistryUtils;
using GameFinder.StoreHandlers.EADesktop.Crypto;
using GameCollector.StoreHandlers.EADesktop.Crypto;
using JetBrains.Annotations;
using NexusMods.Paths;
using OneOf;

namespace GameFinder.StoreHandlers.EADesktop;
namespace GameCollector.StoreHandlers.EADesktop;

/// <summary>
/// Handler for finding games installed with EA Desktop.
Expand Down Expand Up @@ -65,7 +65,7 @@ public class EADesktopHandler : AHandler<EADesktopGame, EADesktopGameId>
/// </param>
/// <param name="hardwareInfoProvider">
/// The implementation of <see cref="IHardwareInfoProvider"/> to use. Currently only
/// <see cref="GameFinder.StoreHandlers.EADesktop.Crypto.Windows.HardwareInfoProvider"/>
/// <see cref="GameCollector.StoreHandlers.EADesktop.Crypto.Windows.HardwareInfoProvider"/>
/// is available and is Windows-only.
/// </param>
public EADesktopHandler(IFileSystem fileSystem, IRegistry registry, IHardwareInfoProvider hardwareInfoProvider)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@

<ItemGroup>
<InternalsVisibleTo Include="GameFinder.Example" />
<InternalsVisibleTo Include="GameFinder.StoreHandlers.EADesktop.Tests" />
<InternalsVisibleTo Include="GameCollector.StoreHandlers.EADesktop.Tests" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/GameFinder.StoreHandlers.EADesktop/InstallInfoFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Text.Json.Serialization;
using JetBrains.Annotations;

namespace GameFinder.StoreHandlers.EADesktop;
namespace GameCollector.StoreHandlers.EADesktop;

[UsedImplicitly]
internal record InstallInfoFile(
Expand Down
2 changes: 1 addition & 1 deletion src/GameFinder.StoreHandlers.EADesktop/SchemaPolicy.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using GameFinder.Common;
using JetBrains.Annotations;

namespace GameFinder.StoreHandlers.EADesktop;
namespace GameCollector.StoreHandlers.EADesktop;

/// <summary>
/// Policy to employ when the schema version doesn't match the supported schema version.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Text.Json.Serialization;

namespace GameFinder.StoreHandlers.EADesktop;
namespace GameCollector.StoreHandlers.EADesktop;

[JsonSourceGenerationOptions(WriteIndented = false, GenerationMode = JsonSourceGenerationMode.Default)]
[JsonSerializable(typeof(InstallInfoFile))]
Expand Down
2 changes: 1 addition & 1 deletion src/GameFinder.StoreHandlers.EGS/CatCacheFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Text.Json.Serialization;
using JetBrains.Annotations;

namespace GameFinder.StoreHandlers.EGS;
namespace GameCollector.StoreHandlers.EGS;

[UsedImplicitly]
internal record CatCacheFile(
Expand Down
2 changes: 1 addition & 1 deletion src/GameFinder.StoreHandlers.EGS/EGSCatalog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using OneOf;
using static System.Environment;

namespace GameFinder.StoreHandlers.EGS;
namespace GameCollector.StoreHandlers.EGS;

public partial class EGSHandler : AHandler<EGSGame, EGSGameId>
{
Expand Down
2 changes: 1 addition & 1 deletion src/GameFinder.StoreHandlers.EGS/EGSGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using JetBrains.Annotations;
using NexusMods.Paths;

namespace GameFinder.StoreHandlers.EGS;
namespace GameCollector.StoreHandlers.EGS;

/// <summary>
/// Represents a game installed with the Epic Games Store.
Expand Down
2 changes: 1 addition & 1 deletion src/GameFinder.StoreHandlers.EGS/EGSGameId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using JetBrains.Annotations;
using TransparentValueObjects;

namespace GameFinder.StoreHandlers.EGS;
namespace GameCollector.StoreHandlers.EGS;

/// <summary>
/// Represents an id for games installed with the Epic Games Store.
Expand Down
2 changes: 1 addition & 1 deletion src/GameFinder.StoreHandlers.EGS/EGSHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
using NexusMods.Paths;
using OneOf;

namespace GameFinder.StoreHandlers.EGS;
namespace GameCollector.StoreHandlers.EGS;

/// <summary>
/// Handler for finding games installed with the Epic Games Store.
Expand Down
2 changes: 1 addition & 1 deletion src/GameFinder.StoreHandlers.EGS/FormatPolicy.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using GameFinder.Common;
using JetBrains.Annotations;

namespace GameFinder.StoreHandlers.EGS;
namespace GameCollector.StoreHandlers.EGS;

/// <summary>
/// Policy to employ when the format version doesn't match the supported format version.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="GameFinder.StoreHandlers.EGS.Tests" />
<InternalsVisibleTo Include="GameCollector.StoreHandlers.EGS.Tests" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/GameFinder.StoreHandlers.EGS/ManifestFile.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Text.Json.Serialization;
using JetBrains.Annotations;

namespace GameFinder.StoreHandlers.EGS;
namespace GameCollector.StoreHandlers.EGS;

[UsedImplicitly]
internal record ManifestFile(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Text.Json.Serialization;

namespace GameFinder.StoreHandlers.EGS;
namespace GameCollector.StoreHandlers.EGS;

[JsonSourceGenerationOptions(WriteIndented = false, GenerationMode = JsonSourceGenerationMode.Default)]
[JsonSerializable(typeof(CatCacheFile))]
Expand Down
2 changes: 1 addition & 1 deletion src/GameFinder.StoreHandlers.GOG/GOGDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using NexusMods.Paths;
using OneOf;

namespace GameFinder.StoreHandlers.GOG;
namespace GameCollector.StoreHandlers.GOG;

public partial class GOGHandler : AHandler<GOGGame, GOGGameId>
{
Expand Down
2 changes: 1 addition & 1 deletion src/GameFinder.StoreHandlers.GOG/GOGGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Collections.Generic;
using System.Globalization;

namespace GameFinder.StoreHandlers.GOG;
namespace GameCollector.StoreHandlers.GOG;

/// <summary>
/// Represents a game installed with GOG Galaxy.
Expand Down
2 changes: 1 addition & 1 deletion src/GameFinder.StoreHandlers.GOG/GOGGameId.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using TransparentValueObjects;

namespace GameFinder.StoreHandlers.GOG;
namespace GameCollector.StoreHandlers.GOG;

/// <summary>
/// Represents an id for games installed with GOG Galaxy.
Expand Down
2 changes: 1 addition & 1 deletion src/GameFinder.StoreHandlers.GOG/GOGHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using NexusMods.Paths;
using OneOf;

namespace GameFinder.StoreHandlers.GOG;
namespace GameCollector.StoreHandlers.GOG;

/// <summary>
/// Handler for finding games installed with GOG Galaxy.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="GameFinder.StoreHandlers.GOG.Tests" />
<InternalsVisibleTo Include="GameCollector.StoreHandlers.GOG.Tests" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="GameFinder.StoreHandlers.Origin.Tests" />
<InternalsVisibleTo Include="GameCollector.StoreHandlers.Origin.Tests" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/GameFinder.StoreHandlers.Origin/OriginGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using JetBrains.Annotations;
using NexusMods.Paths;

namespace GameFinder.StoreHandlers.Origin;
namespace GameCollector.StoreHandlers.Origin;

/// <summary>
/// Represents a game installed with Origin.
Expand Down
Loading

0 comments on commit 7d18706

Please sign in to comment.