private IList <CameraWhiteBalance> GetSupportedWhitebalances()
        {
            List <CameraWhiteBalance> whitebalances = new List <CameraWhiteBalance>();

            NativeCapabilities.WhitebalanceCallback callback = (CameraWhiteBalance whiteBalance, IntPtr userData) =>
            {
                whitebalances.Add(whiteBalance);
                return(true);
            };
            CameraErrorFactory.ThrowIfError(NativeCapabilities.SupportedWhitebalance(_camera.GetHandle(), callback, IntPtr.Zero),
                                            "Failed to get the supported white balance.");

            return(whitebalances.AsReadOnly());
        }
Exemple #2
0
        private IList <CameraWhiteBalance> GetSupportedWhitebalances()
        {
            var whitebalances = new List <CameraWhiteBalance>();

            NativeCapabilities.WhitebalanceCallback callback = (whiteBalance, _) =>
            {
                whitebalances.Add(whiteBalance);
                return(true);
            };

            NativeCapabilities.SupportedWhitebalance(_camera.GetHandle(), callback).
            ThrowIfFailed("Failed to get the supported white balance.");

            return(whitebalances.AsReadOnly());
        }