예제 #1
0
        public IDetectionSource GetSource(string id)
        {
            FacialDetectionSource source = null;

            if (_sources.TryGetValue(id, out source))
            {
                return(source);
            }

            return(null);
        }
예제 #2
0
        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);
        }