private IList <CameraExposureMode> GetSupportedExposureModes()
        {
            List <CameraExposureMode> exposureModes = new List <CameraExposureMode>();

            NativeCapabilities.ExposureModeCallback callback = (CameraExposureMode mode, IntPtr userData) =>
            {
                exposureModes.Add(mode);
                return(true);
            };
            CameraErrorFactory.ThrowIfError(NativeCapabilities.SupportedExposureModes(_camera.GetHandle(), callback, IntPtr.Zero),
                                            "Failed to get the supported Exposure modes.");

            return(exposureModes.AsReadOnly());
        }
Beispiel #2
0
        private IList <CameraExposureMode> GetSupportedExposureModes()
        {
            var exposureModes = new List <CameraExposureMode>();

            NativeCapabilities.ExposureModeCallback callback = (mode, _) =>
            {
                exposureModes.Add(mode);
                return(true);
            };

            NativeCapabilities.SupportedExposureModes(_camera.GetHandle(), callback).
            ThrowIfFailed("Failed to get the supported Exposure modes.");

            return(exposureModes.AsReadOnly());
        }