Hello,
i have a plugin which implement a signalr hub.
actually i have no access to the settingsService instance of the plugin.
i implement a connectionString parameter in the settings of the plugin.
which is the right way to access the settings from within the code of the hub.
using System;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading.Tasks;
using EsiMobile.Data;
using EsiMobile.Data.Querys;
using Microsoft.AspNetCore.SignalR;
using Newtonsoft.Json;
using Nop.Web.Framework.Controllers;
namespace Nop.Plugin.Misc.EsiMobile.Hubs
{
//https://stackoverflow.com/questions/46904678/call-signalr-core-hub-method-from-controller
public class EsiMobileHub : Hub
{
public override Task OnConnectedAsync()
{
var id = Context.ConnectionId;
var name = Context.User.Identity.Name;
return base.OnConnectedAsync();
}
...
}
Regards
Alex