Release 3.0.0
This is a major release with big changes featuring Wine, Bottles and Proton support for GOG, EGS and Origin. This release also replaces System.IO.Abstraction
with NexusMods.Paths
from the new Nexus Mods App, changes how results are handled and re-adds Xbox Game Pass support.
Breaking Changes:
- Reworked the constructors of all handlers and removed most overloads. All handlers now have a single constructor with no default values.
- Updated
FindAllGames
to returnOneOf<TGame, ErrorMessage>
instead ofResult<TGame>
(using the OneOf library). - Replaced
System.IO.Abstraction
withNexusMods.Path.IFileSystem
.- Paths are now of type
AbsolutePath
instead ofstring
.
- Paths are now of type
- Changed
AHandler<TGame, TId>
to requireTId : notnull
. - Added
IGame
interface and changedAHandler<TGame, TId>
to requireTGame : IGame
. - Removed the extension functions
OnlyGame
andOnlyError
. - Changed all game Ids to be value objects using Vogen.
- Changed
FindAllGamesById
to returnIReadOnlyDictionary<TGame, TId>
instead ofIDictionary<TGame, TId>
.
(Hopefully) non-breaking changes:
- Re-added Xbox Game Pass.
- Added
Func<TGame, TId> IdSelector
andIEqualityComparer<TId>? IdEqualityComparer
toAHandler<TGame, TId>
. These can be used to construct key-value types like a dictionary. - Added
WindowsRegistry.Shared
for a shared instance ofIRegistry
. - Wine: added
GetUserName
,ProtonWinePrefix
will now usesteamuser
. - Enabled Trimming.
How to upgrade:
The transition from Result<TGame>
to OneOf<TGame, ErrorMessage>
should be straight forward. You can use the provided helper methods for matching like result.Match(game => { }, error => { })
or result.Switch(game => { }, error => { })
depending on your needs. I've also added some extension methods to make the transition easier:
bool IsGame()
bool IsError()
TGame AsGame()
ErrorMessage AsError
bool TryGetGame(out TGame)
bool TryGetError(out ErrorMessage)
Store handlers, like GOGHandler
, now require an implementation of NexusMods.Paths.IFileSystem
, instead of System.IO.Abstraction.IFileSystem
. You can use the shared instance at NexusMods.Path.FileSystem.Shared
, if you want to use the real file system.
For testing, you can either mock NexusMods.Paths.IFileSystem
, or use NexusMods.Paths.InMemoryFileSystem
. If you need to do more in-depth testing, you can also use the NexusMods.Paths.TestingHelpers
package.
Since AHandler<TGame, TId>
has changed, you might need to update the constraints for TId
, if you use generics. Simply add where TId : notnull
to the constraints. All Ids have been replaced to using value objects. For example: instead of having long id
for GOGGame
, it's now GOGGameId id
. You can still get the value using id.Value
, which is still a long
.
How to use with Wine on Linux:
See the updated README.