public LayoutsController(IOptionsSnapshot <LayoutsConfig> layoutsConfigAccessor, IHubContext <ChatHub> hubContext, Layouts layouts) { _layouts = layouts; _hubContext = hubContext; _layoutsConfig = layoutsConfigAccessor.Value; _layoutDict = _layouts.ToDictionary(l => l.LayoutId); }
public ChatHub(Layouts layouts) { _layouts = layouts; _layoutDict = _layouts.ToDictionary(l => l.LayoutId, StringComparer.OrdinalIgnoreCase); foreach (var layout in layouts) { layout.LayoutChanged += LayoutOnLayoutChanged; } }