Exemple #1
0
 public LayoutsController(IOptionsSnapshot <LayoutsConfig> layoutsConfigAccessor, IHubContext <ChatHub> hubContext, Layouts layouts)
 {
     _layouts       = layouts;
     _hubContext    = hubContext;
     _layoutsConfig = layoutsConfigAccessor.Value;
     _layoutDict    = _layouts.ToDictionary(l => l.LayoutId);
 }
Exemple #2
0
        public ChatHub(Layouts layouts)
        {
            _layouts    = layouts;
            _layoutDict = _layouts.ToDictionary(l => l.LayoutId, StringComparer.OrdinalIgnoreCase);

            foreach (var layout in layouts)
            {
                layout.LayoutChanged += LayoutOnLayoutChanged;
            }
        }