Akka.Hosting.Maui
1.5.6.1
Prefix Reserved
See the version list below for details.
dotnet add package Akka.Hosting.Maui --version 1.5.6.1
NuGet\Install-Package Akka.Hosting.Maui -Version 1.5.6.1
<PackageReference Include="Akka.Hosting.Maui" Version="1.5.6.1" />
paket add Akka.Hosting.Maui --version 1.5.6.1
#r "nuget: Akka.Hosting.Maui, 1.5.6.1"
// Install Akka.Hosting.Maui as a Cake Addin #addin nuget:?package=Akka.Hosting.Maui&version=1.5.6.1 // Install Akka.Hosting.Maui as a Cake Tool #tool nuget:?package=Akka.Hosting.Maui&version=1.5.6.1
Akka.Hosting.Maui
HOCON-less configuration, application lifecycle management, ActorSystem
startup, and actor instantiation for Akka.NET. This is an Akka.Hosting adapter for .NET Maui applications.
The reason this exists in the first place is because Microsoft.Extensions.Hosting aren't supported on .NET Maui and there are no plans to support it. We've adapted Akka.Hosting to run using a Maui IMauiInitializeService
instead an IHostedService
behind the scenes - and this should make it trivially easy to use Akka.Hosting's 'ActorRegistry' to inject actors into your UI elements and background services.
Installation
First, you need to install the Akka.Hosting.Maui package into your Maui application:
dotnet add package Akka.Hosting
Next, inside your MauiProgram.cs
(or equivalent) call the AddAkkaMaui
method:
using Akka.Hosting.Maui;
using Akka.Hosting.MauiSample;
using Microsoft.Extensions.Logging;
namespace Akka.Hosting.MauiDemo;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
#if DEBUG
builder.Logging.AddDebug();
#endif
builder.Services
.AddAkkaMaui("TestSys", config =>
{
config.WithActors((system, registry) =>
{
var echo = system.ActorOf(ClickActor.Props);
registry.Register<ClickActor>(echo);
});
})
.AddTransient<MainPage>();
return builder.Build();
}
}
And from there, you should be able to use any of the other Akka.Hosting methods to configure your ActorSystem
and your actors!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-android33.0 is compatible. net7.0-ios was computed. net7.0-ios16.1 is compatible. net7.0-maccatalyst was computed. net7.0-maccatalyst16.1 is compatible. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net7.0-windows10.0.19041 is compatible. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- Akka.Hosting (>= 1.5.6.1)
-
net7.0-android33.0
- Akka.Hosting (>= 1.5.6.1)
-
net7.0-ios16.1
- Akka.Hosting (>= 1.5.6.1)
-
net7.0-maccatalyst16.1
- Akka.Hosting (>= 1.5.6.1)
-
net7.0-windows10.0.19041
- Akka.Hosting (>= 1.5.6.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
• Fixed bugs