public Camera RegisterNew(string deviceName, IVideoSource videoSource) { Camera camera = null; var dir = CheckAndGetDeviceFolder(deviceName); if (!cameraMap.TryGetValue(deviceName, out camera)) { camera = new Camera(deviceName, videoSource, new VideoStore(string.Format(@"{0}\{1}", dir, deviceName))); cameraMap[deviceName] = camera; } return camera; }