public FileSystemCamera(FileSystemCameraSettings settings) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } _imageLocation = settings.ImageLocation; _imageSearchPattern = settings.ImageSearchPattern; }
public static T GetOrCreateCamera <T>(this PiTopModule module, FileSystemCameraSettings settings) where T : FileSystemCamera { IConnectedDeviceFactory <FileSystemCameraSettings, FileSystemCamera> factory = null !; try { factory = module.GetDeviceFactory <FileSystemCameraSettings, FileSystemCamera>(); } catch (KeyNotFoundException ) { } AssertFactory(factory); return(factory.GetOrCreateDevice <T>(settings)); }