示例#1
0
 public FileSystemCamera(FileSystemCameraSettings settings)
 {
     if (settings == null)
     {
         throw new ArgumentNullException(nameof(settings));
     }
     _imageLocation      = settings.ImageLocation;
     _imageSearchPattern = settings.ImageSearchPattern;
 }
示例#2
0
        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));
        }