Lakona.Game.Server.Hotfix.Abstractions 0.10.0

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Lakona.Game.Server.Hotfix.Abstractions --version 0.10.0
                    
NuGet\Install-Package Lakona.Game.Server.Hotfix.Abstractions -Version 0.10.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Lakona.Game.Server.Hotfix.Abstractions" Version="0.10.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lakona.Game.Server.Hotfix.Abstractions" Version="0.10.0" />
                    
Directory.Packages.props
<PackageReference Include="Lakona.Game.Server.Hotfix.Abstractions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Lakona.Game.Server.Hotfix.Abstractions --version 0.10.0
                    
#r "nuget: Lakona.Game.Server.Hotfix.Abstractions, 0.10.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Lakona.Game.Server.Hotfix.Abstractions@0.10.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Lakona.Game.Server.Hotfix.Abstractions&version=0.10.0
                    
Install as a Cake Addin
#tool nuget:?package=Lakona.Game.Server.Hotfix.Abstractions&version=0.10.0
                    
Install as a Cake Tool

Lakona.Game.Server.Hotfix.Abstractions

Stable attributes, lifecycle calls, result DTOs, and compiler support for Lakona.Game server Hotfix behaviors.

This package is intentionally small so stable model projects, hotfix projects, and the server runtime can share the same metadata without depending on hosting internals. Its NuGet package also carries the matching compiler extension; consumers do not reference a separate generator package.

Metadata

  • [HotfixState] marks stable partial actor types that can receive generated friend accessors.
  • [HotfixBehaviorOf] binds a sealed partial generation-scoped behavior class to the stable actor type it operates on.
  • [FriendOf] declares that a Hotfix behavior is intended to use generated friend accessors for a stable actor type.
  • [HotfixService] marks the single hotfix implementation for a generated RPC service contract.
  • [HotfixComponent] marks a dependency-only helper that is automatically registered once per hotfix generation.
  • HotfixMethodKey, HotfixSnapshot, and HotfixReloadResult describe loaded method identity and reload outcomes.
  • HotfixHttpEndpointDescriptor carries the stable, process-local HTTP route manifest without exposing Hotfix load-context types to the server host.
  • IHotfixRequiredServiceContracts is emitted by generated server apps so the runtime can fail reloads when a required RPC service has zero or multiple hotfix implementations.
  • [HotfixTimer], LakonaTimer, HotfixTimerEntry<TArgs>, TimerId, and TimerTick<TArgs> define the hotfix-safe timer surface.

[FriendOf] is metadata for the hotfix model and tooling. It is not an access-control mechanism; generated accessors are normal public members on the stable type in the first implementation.

Stable App assemblies own actor identity, serialized state, persistence schema, DTOs, RPC contracts, and transport contracts. Hotfix assemblies own replaceable behavior. Public instance methods in [HotfixBehaviorOf] classes are called through generated actor APIs with direct static selectors such as static behavior => behavior.JoinAsync.

Hotfix Startup

Hotfix startup uses explicit attributes for the startup type and optional configuration methods. Generation-scoped helper services use [HotfixComponent]; they do not require manual startup registration:

[HotfixStartup]
public static class GameHotfixStartup
{
    [HotfixConfigureActors]
    public static void Actors(ActorHostBuilder actors)
    {
        actors.RegisterStartup<MatchmakingActor, MatchmakingQueueId>(
            static context => SelectStableHash(context.Candidates, context.Key.Value));
    }
}

[HotfixComponent]
public sealed class BattleNotifier
{
    private readonly ILogger<BattleNotifier> logger;

    public BattleNotifier(ILogger<BattleNotifier> logger)
    {
        this.logger = logger;
    }
}

Both methods are optional, but when present they must be public static void methods with exactly one supported parameter. Startup methods are declaration surfaces; the runtime does not construct the [HotfixStartup] type. TKey provides routing affinity to the selector; it is not the replica's actor id. The selector is fixed by registration and must return one offered ready candidate.

Timers

Timers are created by explicit hotfix services or actor behavior methods and resolved against the current hotfix callback table:

public async ValueTask CreateBattleTimerAsync(CancellationToken cancellationToken)
{
    await LakonaTimer.CreatePeriodicTimerAsync(
        static (BattleTimers callbacks) => callbacks.TickAsync,
        TimeSpan.Zero,
        TimeSpan.FromMilliseconds(50),
        new BattleTick("default"),
        cancellationToken);
}

[HotfixTimer]
public sealed partial class BattleTimers
{
    public ValueTask TickAsync(TimerTick<BattleTick> tick)
    {
        return default;
    }
}

// Declared in the stable App or Contracts assembly.
public sealed record BattleTick(string QueueId);

Use LakonaTimer.CreateOnceTimerAsync(static (TimerModule callbacks) => callbacks.Method, dueTime, args, cancellationToken) for one-shot work and LakonaTimer.CreatePeriodicTimerAsync(static (TimerModule callbacks) => callbacks.Method, dueTime, period, args, cancellationToken) for periodic work. Shutdown code should destroy timers with noncancelable cleanup when the timer must not leak after a canceled stop token.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
Loading failed