-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
using BeatSaberModManager.Models.Implementations.LegacyVersions; | ||
using BeatSaberModManager.Models.Implementations.Versions; | ||
|
||
|
||
namespace BeatSaberModManager.Models.Implementations.Json | ||
{ | ||
[JsonSerializable(typeof(SteamLegacyGameVersion[]))] | ||
[JsonSerializable(typeof(SteamGameVersion[]))] | ||
internal sealed partial class LegacyGameVersionJsonSerializerContext : JsonSerializerContext; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
using System; | ||
|
||
using BeatSaberModManager.Models.Interfaces; | ||
|
||
|
||
namespace BeatSaberModManager.Models.Implementations.Versions | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
public class OculusGameVersion : IGameVersion | ||
{ | ||
/// <inheritdoc /> | ||
public required string GameVersion { get; init; } | ||
|
||
/// <inheritdoc /> | ||
public DateTime ReleaseDate { get; init; } | ||
|
||
/// <inheritdoc /> | ||
public Uri? ReleaseUrl { get; init; } | ||
|
||
/// <inheritdoc /> | ||
public Uri? ReleaseImage { get; init; } | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
public string? InstallDir { get; set; } | ||
|
||
/// <inheritdoc /> | ||
public int CompareTo(IGameVersion? other) => throw new NotImplementedException(); | ||
|
||
public override bool Equals(object obj) | ||
Check failure on line 33 in BeatSaberModManager/Models/Implementations/Versions/OculusGameVersion.cs GitHub Actions / Build Windows
|
||
{ | ||
if (ReferenceEquals(this, obj)) | ||
{ | ||
return true; | ||
} | ||
|
||
if (ReferenceEquals(obj, null)) | ||
{ | ||
return false; | ||
} | ||
|
||
throw new NotImplementedException(); | ||
Check failure on line 45 in BeatSaberModManager/Models/Implementations/Versions/OculusGameVersion.cs GitHub Actions / Build Windows
Check failure on line 45 in BeatSaberModManager/Models/Implementations/Versions/OculusGameVersion.cs GitHub Actions / Build Linux
|
||
} | ||
|
||
public override int GetHashCode() | ||
{ | ||
throw new NotImplementedException(); | ||
Check failure on line 50 in BeatSaberModManager/Models/Implementations/Versions/OculusGameVersion.cs GitHub Actions / Build Windows
Check failure on line 50 in BeatSaberModManager/Models/Implementations/Versions/OculusGameVersion.cs GitHub Actions / Build Linux
|
||
} | ||
|
||
public static bool operator ==(OculusGameVersion left, OculusGameVersion right) | ||
{ | ||
if (ReferenceEquals(left, null)) | ||
{ | ||
return ReferenceEquals(right, null); | ||
} | ||
|
||
return left.Equals(right); | ||
} | ||
|
||
public static bool operator !=(OculusGameVersion left, OculusGameVersion right) | ||
{ | ||
return !(left == right); | ||
} | ||
|
||
public static bool operator <(OculusGameVersion left, OculusGameVersion right) | ||
{ | ||
return ReferenceEquals(left, null) ? !ReferenceEquals(right, null) : left.CompareTo(right) < 0; | ||
} | ||
|
||
public static bool operator <=(OculusGameVersion left, OculusGameVersion right) | ||
{ | ||
return ReferenceEquals(left, null) || left.CompareTo(right) <= 0; | ||
} | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
/// <param name="left"></param> | ||
/// <param name="right"></param> | ||
/// <returns></returns> | ||
public static bool operator >(OculusGameVersion left, OculusGameVersion right) | ||
{ | ||
return !ReferenceEquals(left, null) && left.CompareTo(right) > 0; | ||
} | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
/// <param name="left"></param> | ||
/// <param name="right"></param> | ||
/// <returns></returns> | ||
public static bool operator >=(OculusGameVersion left, OculusGameVersion right) | ||
{ | ||
return ReferenceEquals(left, null) ? ReferenceEquals(right, null) : left.CompareTo(right) >= 0; | ||
} | ||
} | ||
} |