private IList <CameraAutoFocusMode> GetSupportedAutoFocusModes()
        {
            List <CameraAutoFocusMode> autoFocusModes = new List <CameraAutoFocusMode>();

            NativeCapabilities.AfModeCallback callback = (CameraAutoFocusMode mode, IntPtr userData) =>
            {
                autoFocusModes.Add(mode);
                return(true);
            };
            CameraErrorFactory.ThrowIfError(NativeCapabilities.SupportedAutoFocusModes(_camera.GetHandle(), callback, IntPtr.Zero),
                                            "Failed to get the supported Auto focus modes.");

            return(autoFocusModes.AsReadOnly());
        }
Beispiel #2
0
        private IList <CameraAutoFocusMode> GetSupportedAutoFocusModes()
        {
            var autoFocusModes = new List <CameraAutoFocusMode>();

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

            NativeCapabilities.SupportedAutoFocusModes(_camera.GetHandle(), callback).
            ThrowIfFailed("Failed to get the supported Auto focus modes.");

            return(autoFocusModes.AsReadOnly());
        }