Esempio n. 1
0
        private IList <CameraSceneMode> GetSupportedSceneModes()
        {
            List <CameraSceneMode> sceneModes = new List <CameraSceneMode>();

            NativeCapabilities.SceneModeCallback callback = (CameraSceneMode sceneMode, IntPtr userData) =>
            {
                sceneModes.Add(sceneMode);
                return(true);
            };
            CameraErrorFactory.ThrowIfError(NativeCapabilities.SupportedSceneModes(_camera.GetHandle(), callback, IntPtr.Zero),
                                            "Failed to get the supported scene modes.");

            return(sceneModes.AsReadOnly());
        }
Esempio n. 2
0
        private IList <CameraSceneMode> GetSupportedSceneModes()
        {
            var sceneModes = new List <CameraSceneMode>();

            NativeCapabilities.SceneModeCallback callback = (sceneMode, _) =>
            {
                sceneModes.Add(sceneMode);
                return(true);
            };

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

            return(sceneModes.AsReadOnly());
        }