-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2381 from erri120/feat/2254-10
Open collection JSON file in text editor
- Loading branch information
Showing
15 changed files
with
194 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 26 additions & 4 deletions
30
src/Abstractions/NexusMods.Abstractions.Collections/Json/ModSourceType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,35 @@ | ||
// ReSharper disable InconsistentNaming | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace NexusMods.Abstractions.Collections.Json; | ||
|
||
/// <summary> | ||
/// The possible sources of a mod | ||
/// </summary> | ||
public enum ModSourceType | ||
{ | ||
browse, | ||
direct, | ||
nexus, | ||
bundle, | ||
/// <summary> | ||
/// Sourced from Nexus Mods. | ||
/// </summary> | ||
[JsonStringEnumMemberName("nexus")] | ||
NexusMods, | ||
|
||
/// <summary> | ||
/// Bundled with the collection archive. | ||
/// </summary> | ||
[JsonStringEnumMemberName("bundle")] | ||
Bundle, | ||
|
||
/// <summary> | ||
/// Downloaded externally via an URL. | ||
/// </summary> | ||
[JsonStringEnumMemberName("Browse")] | ||
Browse, | ||
|
||
/// <summary> | ||
/// Downloaded externally via an URL. | ||
/// </summary> | ||
[JsonStringEnumMemberName("Direct")] | ||
Direct, | ||
} |
30 changes: 30 additions & 0 deletions
30
src/Abstractions/NexusMods.Abstractions.Collections/Json/UpdatePolicy.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.Text.Json.Serialization; | ||
using JetBrains.Annotations; | ||
|
||
namespace NexusMods.Abstractions.Collections.Json; | ||
|
||
/// <summary> | ||
/// Update policy. | ||
/// </summary> | ||
[PublicAPI] | ||
public enum UpdatePolicy | ||
{ | ||
/// <summary> | ||
/// Use the exact version. | ||
/// </summary> | ||
[JsonStringEnumMemberName("exact")] | ||
ExactVersionOnly, | ||
|
||
/// <summary> | ||
/// Use the current version, if it's still available. | ||
/// If the file has been archived or deleted, the newest version of the file should be used. | ||
/// </summary> | ||
[JsonStringEnumMemberName("prefer")] | ||
PreferExact, | ||
|
||
/// <summary> | ||
/// Use the latest version. | ||
/// </summary> | ||
[JsonStringEnumMemberName("latest")] | ||
LatestVersion, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.