BackEndManagerBusinessLogic 1.0.0
dotnet add package BackEndManagerBusinessLogic --version 1.0.0
NuGet\Install-Package BackEndManagerBusinessLogic -Version 1.0.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="BackEndManagerBusinessLogic" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BackEndManagerBusinessLogic --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BackEndManagerBusinessLogic, 1.0.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.
// Install BackEndManagerBusinessLogic as a Cake Addin #addin nuget:?package=BackEndManagerBusinessLogic&version=1.0.0 // Install BackEndManagerBusinessLogic as a Cake Tool #tool nuget:?package=BackEndManagerBusinessLogic&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SIGNALR
Configurazione
program.cs
#region signalr
builder.Services.AddCors(options => options.AddPolicy(name: "enablecorsforclient", builder => {
builder.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials()
.WithOrigins("http://localhost:5051")
.SetIsOriginAllowed((host) => true);
}));
builder.Services.AddScoped<NotificationHub>();
builder.Services.AddSignalR().AddHubOptions<NotificationHub>(options => {
options.EnableDetailedErrors = true;
});
builder.Services.AddSingleton<INotificationService, NotificationService>();
builder.Services.AddTransient<yourBusinessLogic>();
var app = builder.Build();
app.UseStaticFiles();
#region signalr
app.UseCors("enablecorsforclient");
app.MapHub<NotificationHub>("/NotificationHub");
#endregion
- spiegazione program.cs::
- (AddCors) Aggiungere AdCors se i client si trovano su altro host.
- (AddScoped) Aggiunge l' Hub tipizzato.
- (AddSignalR) Aggiunge il servizio signalR Microsoft.AspNetCore.SignalR ( usare Redis su sistemi distribuiti )
- (Single-responsibility principle) Aggiunge l' interfaccia per separare l' uso di Hub dalla business logic
- (business logic) Aggiunge la tua business logic
Codice Javascript
"use strict";
const opts = {
skipNegotiation: true,
transport: signalR.HttpTransportType.WebSockets
};
var connection = new signalR.HubConnectionBuilder().withUrl("/NotificationHub", opts)
.configureLogging(signalR.LogLevel.Debug)
.withAutomaticReconnect([...Array(10)].map((_, i) => i ? 5000 : 0))
.build();
connection.error
connection.on("SendMessage", wsgotdata );
function wsgotdata(d) {
var li = document.createElement("li");
document.getElementById("messagesList").appendChild(li);
li.textContent = `Notifica : ${d.notificationType} : Sport ${d.message.sport} : Cat: ${d.message.category} : tournament: ${d.message.tournament}`;
li = document.createElement("li");
document.getElementById("messagesList").appendChild(li);
li.textContent = `content: ${d.message.additionalInfo}`;
console.log(d);
}
connection.start().then(function () {
document.getElementById("sendButton").disabled = false;
}).catch(function (err) {
return console.error(err.toString());
});
document.getElementById("sendButton").addEventListener("click", function (event) {
var user = document.getElementById("userInput").value;
var message = document.getElementById("messageInput").value;
connection.invoke("SendMessage", user, message).catch(function (err) {
return console.error(err.toString());
});
event.preventDefault();
});
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- AspNetCore.HealthChecks.Elasticsearch (>= 8.0.1)
- AspNetCore.HealthChecks.UI (>= 8.0.2)
- AspNetCore.HealthChecks.UI.SqlServer.Storage (>= 8.0.1)
- BackEndManagerBenchmarks (>= 1.0.0)
- Microsoft.AspNetCore.Http (>= 2.2.2)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.SignalR (>= 1.1.0)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.Json (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.Http (>= 8.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
- Polly (>= 8.4.2)
- Serilog.Settings.Configuration (>= 8.0.2)
- Serilog.Sinks.Console (>= 6.0.0)
- Serilog.Sinks.Elasticsearch (>= 10.0.0)
- Serilog.Sinks.Email (>= 4.0.0)
- Serilog.Sinks.File (>= 6.0.0)
- Serilog.Sinks.MSSqlServer (>= 7.0.1)
- Serilog.Sinks.Telegram (>= 0.2.1)
- SharpAbp.Abp.OpenTelemetry.Exporter.Prometheus.AspNetCore (>= 3.4.8)
- StackExchange.Redis (>= 2.8.16)
- System.Threading.RateLimiting (>= 8.0.0)
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 |
---|---|---|
1.0.0 | 40 | 12/21/2024 |