public void UnloadContext(BA_InputGroup g, string t) { BA_InputContext context = Contexts.Where((c) => c.Group == g && c.ContextType == t).FirstOrDefault(); if (context == null) { return; } if (!_activeContexts.Contains(context)) { return; } _activeContexts.Remove(context); }
public void LoadContext(BA_InputGroup g, string t) { BA_InputContext context = Contexts.Where((c) => c.Group == g && c.ContextType == t).FirstOrDefault(); if (context == null) { return; } if (_activeContexts.Contains(context)) { return; } if (!ValidInputGroups.Contains(g)) { return; } _activeContexts.Add(context); }