예제 #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());
        }
예제 #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());
        }