public Component GetComponent(string uid)
        {
            if (!_componentRegistryService.TryGetComponent(uid, out var component))
            {
                HttpContext.Response.StatusCode = (int)HttpStatusCode.NotFound;
                return(null);
            }

            return(component);
        }
Beispiel #2
0
        private object GetComponentStatusHistorySetting(string componentUid, string statusUid, string settingUid)
        {
            if (_componentRegistryService.TryGetComponent(componentUid, out var component))
            {
                if (component.TryGetSetting(settingUid, out var value))
                {
                    return(value);
                }
            }

            if (_options.ComponentStatusDefaultSettings.TryGetValue(statusUid, out var defaultSettings))
            {
                if (defaultSettings.TryGetValue(settingUid, out var value))
                {
                    return(value);
                }
            }

            return(null);
        }
 public bool is_initialized(string component_uid)
 {
     return(_componentRegistryService.TryGetComponent(component_uid, out _));
 }