public IDetectionSource GetSource(string id) { FacialDetectionSource source = null; if (_sources.TryGetValue(id, out source)) { return(source); } return(null); }
public bool RegisterSource(string dataSourceId, Uri uri) { var id = GetTranslatedId(dataSourceId); if (!_sources.ContainsKey(id)) { var source = new FacialDetectionSource(uri, _config); source.Start(); return(_sources.TryAdd(id, source)); } return(true); }