Ejemplo n.º 1
0
        private IList <CameraFlashMode> GetSupportedFlashModes()
        {
            List <CameraFlashMode> flashModes = new List <CameraFlashMode>();

            NativeCapabilities.FlashModeCallback callback = (CameraFlashMode flashMode, IntPtr userData) =>
            {
                flashModes.Add(flashMode);
                return(true);
            };
            CameraErrorFactory.ThrowIfError(NativeCapabilities.SupportedFlashModes(_camera.GetHandle(), callback, IntPtr.Zero),
                                            "Failed to get the supported flash modes.");

            return(flashModes.AsReadOnly());
        }
Ejemplo n.º 2
0
        private IList <CameraFlashMode> GetSupportedFlashModes()
        {
            var flashModes = new List <CameraFlashMode>();

            NativeCapabilities.FlashModeCallback callback = (flashMode, _) =>
            {
                flashModes.Add(flashMode);
                return(true);
            };

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

            return(flashModes.AsReadOnly());
        }