SeliseBlocks.Genesis
9.0.30
dotnet add package SeliseBlocks.Genesis --version 9.0.30
NuGet\Install-Package SeliseBlocks.Genesis -Version 9.0.30
<PackageReference Include="SeliseBlocks.Genesis" Version="9.0.30" />
<PackageVersion Include="SeliseBlocks.Genesis" Version="9.0.30" />
<PackageReference Include="SeliseBlocks.Genesis" />
paket add SeliseBlocks.Genesis --version 9.0.30
#r "nuget: SeliseBlocks.Genesis, 9.0.30"
#:package SeliseBlocks.Genesis@9.0.30
#addin nuget:?package=SeliseBlocks.Genesis&version=9.0.30
#tool nuget:?package=SeliseBlocks.Genesis&version=9.0.30
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.30 | 52 | 2/16/2026 |
| 9.0.29 | 494 | 1/28/2026 |
| 9.0.28 | 155 | 1/26/2026 |
| 9.0.27 | 150 | 1/20/2026 |
| 9.0.26 | 215 | 1/19/2026 |
| 9.0.25 | 167 | 12/29/2025 |
| 9.0.24 | 61 | 12/29/2025 |
| 9.0.23 | 57 | 12/29/2025 |
| 9.0.22 | 388 | 11/23/2025 |
| 9.0.21 | 139 | 11/23/2025 |
| 9.0.20 | 209 | 11/16/2025 |
| 9.0.19 | 194 | 11/16/2025 |
| 9.0.18 | 198 | 11/16/2025 |
| 9.0.17 | 284 | 11/11/2025 |
| 9.0.16 | 1,586 | 10/30/2025 |
| 9.0.15 | 249 | 10/29/2025 |
| 9.0.14 | 168 | 10/28/2025 |
| 9.0.13 | 151 | 10/26/2025 |
| 9.0.12 | 178 | 10/22/2025 |
| 9.0.11 | 157 | 10/22/2025 |