SeliseBlocks.Genesis
9.0.25
dotnet add package SeliseBlocks.Genesis --version 9.0.25
NuGet\Install-Package SeliseBlocks.Genesis -Version 9.0.25
<PackageReference Include="SeliseBlocks.Genesis" Version="9.0.25" />
<PackageVersion Include="SeliseBlocks.Genesis" Version="9.0.25" />
<PackageReference Include="SeliseBlocks.Genesis" />
paket add SeliseBlocks.Genesis --version 9.0.25
#r "nuget: SeliseBlocks.Genesis, 9.0.25"
#:package SeliseBlocks.Genesis@9.0.25
#addin nuget:?package=SeliseBlocks.Genesis&version=9.0.25
#tool nuget:?package=SeliseBlocks.Genesis&version=9.0.25
SeliseBlocks.Genesis
Installation
This package is automatically included in Blocks Genesis framework. No manual installation needed for Genesis-based services.
For standalone use:
dotnet add package SeliseBlocks.Genesis
Quick Start for Genesis Services
1. API Service Example
using Blocks.Genesis;
using TestDriver;
const string _serviceName = "Service-API-Test_One";
// Configure logs and secrets - LMT is automatically initialized here
await ApplicationConfigurations.ConfigureLogAndSecretsAsync(_serviceName, VaultType.Azure); // VaultType.OnPrem
var builder = WebApplication.CreateBuilder(args);
ApplicationConfigurations.ConfigureApiEnv(builder, args);
var services = builder.Services;
ApplicationConfigurations.ConfigureServices(services, new MessageConfiguration
{
AzureServiceBusConfiguration = new()
{
Queues = new List<string> { "demo_queue" },
Topics = new List<string> { "demo_topic_1" },
},
});
ApplicationConfigurations.ConfigureApi(services);
services.AddSingleton<IGrpcClient, GrpcClient>();
var app = builder.Build();
ApplicationConfigurations.ConfigureMiddleware(app);
await app.RunAsync();
2. Worker Service Example
using Blocks.Genesis;
using WorkerOne;
const string _serviceName = "Service-Worker-Test_One";
// Configure logs and secrets - LMT is automatically initialized here
var blocksSecrets = await ApplicationConfigurations.ConfigureLogAndSecretsAsync(_serviceName, VaultType.Azure); // VaultType.OnPrem
var messageConfiguration = new MessageConfiguration
{
AzureServiceBusConfiguration = new()
{
Queues = new List<string> { "demo_queue" },
Topics = new List<string> { "demo_topic", "demo_topic_1" }
}
};
await CreateHostBuilder(args).Build().RunAsync();
IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args).ConfigureServices((services) =>
{
services.AddHttpClient();
services.AddSingleton<IConsumer<W1Context>, W1Consumer>();
services.AddSingleton<IConsumer<W2Context>, W2Consumer>();
ApplicationConfigurations.ConfigureWorker(services, messageConfiguration);
});
Configuration
LMT Client is automatically configured when you call ApplicationConfigurations.ConfigureLogAndSecretsAsync().
Option 1: Using .env File (Recommended for Local Development)
Create a .env file in your project root:
# LMT Service Bus Configuration
LogsServiceBusConnectionString=Endpoint=sb://your-logs-namespace.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=your-key
TracesServiceBusConnectionString=Endpoint=sb://your-traces-namespace.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=your-key
# Optional: Retry Configuration
MaxRetries=3
MaxFailedBatches=100
# Other service configuration
ASPNETCORE_ENVIRONMENT=Development
Important: Add .env to your .gitignore:
.env
.env.local
.env.*.local
Option 2: Using appsettings.json
{
"Lmt": {
"MaxRetries": 3,
"MaxFailedBatches": 100
}
}
Note: Service Bus connection strings must be set via environment variables (.env or system environment).
Option 3: Using Environment Variables (For Docker/Production)
export LogsServiceBusConnectionString="Endpoint=sb://your-logs-namespace.servicebus.windows.net/;..."
export TracesServiceBusConnectionString="Endpoint=sb://your-traces-namespace.servicebus.windows.net/;..."
export MaxRetries=3
export MaxFailedBatches=100
Configuration Priority
.envfile (loaded first, sets environment variables)- System environment variables (can override .env)
- appsettings.json
Lmt:*section (for MaxRetries and MaxFailedBatches only) - Default values (MaxRetries=3, MaxFailedBatches=100)
Required vs Optional
| Setting | Required | Source | Default |
|---|---|---|---|
LogsServiceBusConnectionString |
Required | Environment Variable | - |
TracesServiceBusConnectionString |
Required | Environment Variable | - |
MaxRetries |
Optional | appsettings.json or Environment | 3 |
MaxFailedBatches |
Optional | appsettings.json or Environment | 100 |
*If not configured, logs will only write to console and MongoDB (Service Bus integration is disabled).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net9.0
- Azure.Identity (>= 1.17.0)
- Azure.Messaging.ServiceBus (>= 7.20.1)
- Azure.Security.KeyVault.Certificates (>= 4.8.0)
- Azure.Security.KeyVault.Secrets (>= 4.8.0)
- DotNetEnv (>= 3.1.1)
- Google.Protobuf (>= 3.32.1)
- Grpc.AspNetCore (>= 2.71.0)
- Grpc.Net.Client (>= 2.71.0)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 9.0.9)
- MongoDB.Driver (>= 3.5.0)
- OpenTelemetry (>= 1.13.1)
- OpenTelemetry.Extensions.Hosting (>= 1.13.1)
- OpenTelemetry.Instrumentation.AspNetCore (>= 1.12.0)
- OpenTelemetry.Instrumentation.Http (>= 1.12.0)
- OpenTelemetry.Instrumentation.Process (>= 1.12.0-beta.1)
- OpenTelemetry.Instrumentation.Runtime (>= 1.12.0)
- Polly (>= 8.6.4)
- RabbitMQ.Client (>= 7.1.2)
- SeliseBlocks.LMT.Client (>= 9.0.3)
- Serilog (>= 4.3.0)
- Serilog.AspNetCore (>= 9.0.0)
- Serilog.Enrichers.Environment (>= 3.0.1)
- Serilog.Enrichers.HttpContext (>= 8.0.9)
- Serilog.Enrichers.OpenTelemetry (>= 1.0.1)
- Serilog.Sinks.Console (>= 6.0.0)
- Serilog.Sinks.MongoDB (>= 7.1.0)
- StackExchange.Redis (>= 2.9.25)
- Swashbuckle.AspNetCore (>= 9.0.6)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SeliseBlocks.Genesis:
| Package | Downloads |
|---|---|
|
SeliseBlocks.CaptchaService
Blocks Captcha Service |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 9.0.25 | 68 | 12/29/2025 |
| 9.0.24 | 38 | 12/29/2025 |
| 9.0.23 | 45 | 12/29/2025 |
| 9.0.22 | 281 | 11/23/2025 |
| 9.0.21 | 122 | 11/23/2025 |
| 9.0.20 | 195 | 11/16/2025 |
| 9.0.19 | 182 | 11/16/2025 |
| 9.0.18 | 185 | 11/16/2025 |
| 9.0.17 | 264 | 11/11/2025 |
| 9.0.16 | 655 | 10/30/2025 |
| 9.0.15 | 233 | 10/29/2025 |
| 9.0.14 | 152 | 10/28/2025 |
| 9.0.13 | 139 | 10/26/2025 |
| 9.0.12 | 163 | 10/22/2025 |
| 9.0.11 | 137 | 10/22/2025 |
| 9.0.10 | 135 | 10/21/2025 |
| 9.0.9 | 162 | 10/19/2025 |
| 9.0.8 | 149 | 10/12/2025 |
| 9.0.7 | 109 | 10/11/2025 |
| 9.0.6 | 106 | 10/11/2025 |
| 9.0.5 | 60 | 10/11/2025 |
| 9.0.4 | 143 | 10/9/2025 |
| 9.0.3 | 134 | 10/9/2025 |
| 9.0.2 | 143 | 10/9/2025 |
| 9.0.1 | 137 | 10/9/2025 |
| 9.0.0-preview.112 | 143 | 10/7/2025 |
| 9.0.0-preview.111 | 131 | 10/7/2025 |
| 9.0.0-preview.110 | 165 | 10/7/2025 |
| 9.0.0-preview.109 | 128 | 10/6/2025 |
| 9.0.0-preview.108 | 135 | 10/6/2025 |
| 9.0.0-preview.107 | 132 | 10/6/2025 |
| 9.0.0-preview.106 | 162 | 10/6/2025 |
| 9.0.0-preview.105 | 218 | 10/5/2025 |
| 9.0.0-preview.104 | 123 | 10/5/2025 |
| 9.0.0-preview.103 | 303 | 9/29/2025 |
| 9.0.0-preview.102 | 225 | 9/15/2025 |
| 9.0.0-preview.101 | 114 | 9/6/2025 |
| 9.0.0-preview.100 | 103 | 9/6/2025 |
| 9.0.0-preview.99 | 106 | 9/6/2025 |
| 9.0.0-preview.98 | 910 | 8/25/2025 |
| 9.0.0-preview.97 | 250 | 8/25/2025 |
| 9.0.0-preview.96 | 181 | 8/24/2025 |
| 9.0.0-preview.95 | 170 | 8/21/2025 |
| 9.0.0-preview.94 | 152 | 8/19/2025 |
| 9.0.0-preview.93 | 330 | 8/2/2025 |
| 9.0.0-preview.92 | 185 | 7/29/2025 |
| 9.0.0-preview.91 | 110 | 7/29/2025 |
| 9.0.0-preview.90 | 109 | 7/29/2025 |
| 9.0.0-preview.89 | 117 | 7/28/2025 |
| 9.0.0-preview.88 | 120 | 7/28/2025 |
| 9.0.0-preview.87 | 114 | 7/28/2025 |
| 9.0.0-preview.86 | 111 | 7/28/2025 |
| 9.0.0-preview.85 | 118 | 7/28/2025 |
| 9.0.0-preview.84 | 130 | 7/28/2025 |
| 9.0.0-preview.83 | 131 | 7/28/2025 |
| 9.0.0-preview.82 | 521 | 7/24/2025 |
| 9.0.0-preview.81 | 266 | 7/20/2025 |
| 9.0.0-preview.80 | 138 | 7/16/2025 |
| 9.0.0-preview.79 | 151 | 7/13/2025 |
| 9.0.0-preview.78 | 144 | 7/10/2025 |
| 9.0.0-preview.77 | 135 | 7/10/2025 |
| 9.0.0-preview.76 | 248 | 7/10/2025 |
| 9.0.0-preview.74 | 408 | 7/2/2025 |
| 9.0.0-preview.73 | 805 | 6/23/2025 |
| 9.0.0-preview.72 | 988 | 5/28/2025 |
| 9.0.0-preview.71 | 137 | 5/27/2025 |
| 9.0.0-preview.70 | 166 | 5/27/2025 |
| 9.0.0-preview.69 | 144 | 5/27/2025 |
| 9.0.0-preview.68 | 75 | 5/24/2025 |
| 9.0.0-preview.67 | 94 | 5/24/2025 |
| 9.0.0-preview.66 | 363 | 5/21/2025 |
| 9.0.0-preview.65 | 155 | 5/20/2025 |
| 9.0.0-preview.64 | 195 | 5/19/2025 |
| 9.0.0-preview.63 | 256 | 5/15/2025 |
| 9.0.0-preview.62 | 221 | 5/15/2025 |
| 9.0.0-preview.61 | 269 | 5/14/2025 |
| 9.0.0-preview.60 | 295 | 5/6/2025 |
| 9.0.0-preview.59 | 191 | 5/5/2025 |
| 9.0.0-preview.58 | 140 | 5/5/2025 |
| 9.0.0-preview.57 | 145 | 5/5/2025 |
| 9.0.0-preview.56 | 302 | 4/16/2025 |
| 8.0.0-preview.55 | 191 | 4/12/2025 |
| 8.0.0-preview.54 | 563 | 2/27/2025 |
| 8.0.0-preview.53 | 118 | 2/27/2025 |
| 8.0.0-preview.52 | 110 | 2/26/2025 |
| 8.0.0-preview.51 | 98 | 2/26/2025 |
| 8.0.0-preview.50 | 203 | 2/20/2025 |
| 8.0.0-preview.49 | 132 | 2/18/2025 |
| 8.0.0-preview.48 | 98 | 2/16/2025 |
| 8.0.0-preview.47 | 95 | 2/12/2025 |
| 8.0.0-preview.46 | 125 | 2/12/2025 |
| 8.0.0-preview.45 | 262 | 2/3/2025 |
| 8.0.0-preview.44 | 174 | 1/29/2025 |
| 8.0.0-preview.43 | 714 | 1/22/2025 |
| 8.0.0-preview.42 | 93 | 1/22/2025 |
| 8.0.0-preview.41 | 183 | 1/20/2025 |
| 8.0.0-preview.40 | 98 | 1/20/2025 |
| 8.0.0-preview.39 | 136 | 1/14/2025 |
| 8.0.0-preview.38 | 135 | 1/7/2025 |
| 8.0.0-preview.37 | 168 | 12/23/2024 |
| 8.0.0-preview.36 | 155 | 12/22/2024 |
| 8.0.0-preview.35 | 124 | 12/19/2024 |
| 8.0.0-preview.34 | 309 | 12/4/2024 |
| 8.0.0-preview.33 | 187 | 12/4/2024 |
| 8.0.0-preview.32 | 134 | 12/4/2024 |
| 8.0.0-preview.31 | 101 | 12/3/2024 |
| 8.0.0-preview.30 | 137 | 12/2/2024 |
| 8.0.0-preview.29 | 113 | 11/27/2024 |
| 8.0.0-preview.28 | 195 | 11/18/2024 |
| 8.0.0-preview.27 | 157 | 11/14/2024 |
| 8.0.0-preview.25 | 134 | 11/13/2024 |
| 8.0.0-preview.24 | 129 | 11/13/2024 |
| 8.0.0-preview.23 | 99 | 11/13/2024 |
| 8.0.0-preview.22 | 120 | 11/4/2024 |
| 8.0.0-preview.21 | 112 | 11/3/2024 |
| 8.0.0-preview.20 | 165 | 11/1/2024 |
| 8.0.0-preview.19 | 119 | 10/31/2024 |
| 8.0.0-preview.18 | 114 | 10/31/2024 |
| 8.0.0-preview.17 | 110 | 10/31/2024 |
| 8.0.0-preview.16 | 83 | 10/30/2024 |
| 8.0.0-preview.15 | 91 | 10/30/2024 |
| 8.0.0-preview.14 | 113 | 10/30/2024 |
| 8.0.0-preview.13 | 107 | 10/30/2024 |
| 8.0.0-preview.12 | 170 | 10/28/2024 |
| 8.0.0-preview.11 | 106 | 10/27/2024 |
| 8.0.0-preview.10 | 95 | 10/24/2024 |
| 8.0.0-preview.9 | 100 | 10/24/2024 |
| 8.0.0-preview.8 | 108 | 10/24/2024 |
| 8.0.0-preview.7 | 105 | 10/23/2024 |
| 8.0.0-preview.6 | 79 | 10/22/2024 |
| 8.0.0-preview.5 | 116 | 10/22/2024 |
| 8.0.0-preview.4 | 175 | 10/9/2024 |
| 8.0.0-preview.3 | 107 | 10/9/2024 |
| 8.0.0-preview.2 | 117 | 10/1/2024 |
| 8.0.0-preview.1 | 105 | 8/28/2024 |