mirror of
https://gitea.tendokyu.moe/Kayori/Medusa.net.git
synced 2026-09-27 01:00:40 +03:00
- Refactor handler dispatch to use a parsed GameModel instead of raw model strings (Handler.cs, HandlerService.cs, new GameModel.cs) - Add a Unity asset-extraction subsystem (Abstractions/Extractors/Unity) - Add WriteEventLogHandler, XrpcDouble serialization type - Rename EaCoin*Handler -> *EaCoinHandler for naming consistency - Add PIN/username update and forgot/reset password flows, with a console-logging IEmailSender until real email is wired up - Add a settings page and a theming pass (theme tokens, tailwind config) - Add plugin nav/route/UI-manifest frontend types
17 lines
799 B
C#
17 lines
799 B
C#
using System.Linq;
|
|
using Abstractions.Entities;
|
|
|
|
namespace Abstractions.Utils;
|
|
|
|
public static class VersionedDataExtensions
|
|
{
|
|
// A row is visible to a client on `version` while MinVersion <= version <= MaxVersion,
|
|
// with either bound null meaning unbounded on that side (MinVersion is set once at insert
|
|
// and never changes; MaxVersion stays null while the row is still present in the latest
|
|
// synced client dump, and gets stamped with the version it was dropped in once it
|
|
// disappears from a later dump).
|
|
public static IQueryable<T> ForVersion<T>(this IQueryable<T> query, long version) where T : VersionedData =>
|
|
query.Where(e => (e.MinVersion == null || e.MinVersion <= version)
|
|
&& (e.MaxVersion == null || e.MaxVersion >= version));
|
|
}
|