Ejemplo n.º 1
0
        internal FeaturePolicyOptions BuildFeaturePolicyOptions()
        {
            _options.GeolocationOptions        = AllowGeolocation.BuildOptions();
            _options.MidiOptions               = AllowMidi.BuildOptions();
            _options.NotificationsOptions      = AllowNotifications.BuildOptions();
            _options.PushOptions               = AllowPush.BuildOptions();
            _options.SyncXhrOptions            = AllowSyncXhr.BuildOptions();
            _options.MicrophoneOptions         = AllowMicrophone.BuildOptions();
            _options.CameraOptions             = AllowCamera.BuildOptions();
            _options.MagnetometerOptions       = AllowMagnetometer.BuildOptions();
            _options.GyroscopeOptions          = AllowGyroscope.BuildOptions();
            _options.SpeakerOptions            = AllowSpeaker.BuildOptions();
            _options.VibrateOptions            = AllowVibrate.BuildOptions();
            _options.FullscreenOptions         = AllowFullscreen.BuildOptions();
            _options.PaymentOptions            = AllowPayment.BuildOptions();
            _options.AccelerometerOptions      = AllowAccelerometer.BuildOptions();
            _options.AmbientLightSensorOptions = AllowAmbientLightSensor.BuildOptions();
            _options.AutoplayOptions           = AllowAutoplay.BuildOptions();
            _options.EncryptedMediaOptions     = AllowEncryptedMedia.BuildOptions();
            _options.PictureInPictureOptions   = AllowPictureInPicture.BuildOptions();
            _options.UsbOptions = AllowUsb.BuildOptions();
            _options.VrOptions  = AllowVr.BuildOptions();

            return(_options);
        }
        public FeaturePolicyOptions BuildFeaturePolicyOptions()
        {
            _options.Geolocation        = AllowGeolocation.BuildOptions();
            _options.Midi               = AllowMidi.BuildOptions();
            _options.Notifications      = AllowNotifications.BuildOptions();
            _options.Push               = AllowPush.BuildOptions();
            _options.SyncXhr            = AllowSyncXhr.BuildOptions();
            _options.Microphone         = AllowMicrophone.BuildOptions();
            _options.Camera             = AllowCamera.BuildOptions();
            _options.Magnetometer       = AllowMagnetometer.BuildOptions();
            _options.Gyroscope          = AllowGyroscope.BuildOptions();
            _options.Speaker            = AllowSpeaker.BuildOptions();
            _options.Vibrate            = AllowVibrate.BuildOptions();
            _options.Fullscreen         = AllowFullscreen.BuildOptions();
            _options.Payment            = AllowPayment.BuildOptions();
            _options.Accelerometer      = AllowAccelerometer.BuildOptions();
            _options.AmbientLightSensor = AllowAmbientLightSensor.BuildOptions();
            _options.Autoplay           = AllowAutoplay.BuildOptions();
            _options.EncryptedMedia     = AllowEncryptedMedia.BuildOptions();
            _options.PictureInPicture   = AllowPictureInPicture.BuildOptions();
            _options.Usb   = AllowUsb.BuildOptions();
            _options.Vr    = AllowVr.BuildOptions();
            _options.Other = _otherBuilders.Select(b => b.BuildOptions()).ToDictionary(o => o.FeatureName);

            return(_options);
        }