private void Initialize() { Capabilities = new CameraCapabilities(this); Settings = new CameraSettings(this); DisplaySettings = new CameraDisplaySettings(this); RegisterCallbacks(); SetState(CameraState.Created); }
/// <summary> /// Initializes a new instance of the <see cref="Camera"/> class. /// </summary> /// <param name="device">The camera device to access.</param> /// <exception cref="ArgumentException">Invalid CameraDevice type.</exception> /// <exception cref="NotSupportedException">The camera feature is not supported.</exception> /// <since_tizen> 3 </since_tizen> /// <feature> http://tizen.org/feature/camera </feature> public Camera(CameraDevice device) { Native.Create(device, out _handle).ThrowIfFailed("Failed to create camera instance"); Capabilities = new CameraCapabilities(this); Settings = new CameraSettings(this); DisplaySettings = new CameraDisplaySettings(this); RegisterCallbacks(); SetState(CameraState.Created); }
/// <summary> /// Initializes a new instance of the <see cref="Camera"/> class. /// </summary> /// <param name="device">The camera device to access.</param> /// <exception cref="ArgumentException">Invalid CameraDevice type.</exception> /// <exception cref="InvalidOperationException">In case of any invalid operations.</exception> /// <exception cref="NotSupportedException">The camera feature is not supported.</exception> /// <since_tizen> 3 </since_tizen> /// <feature> http://tizen.org/feature/camera </feature> public Camera(CameraDevice device) { ValidationUtil.ValidateEnum(typeof(CameraDevice), device, nameof(device)); Create(device); Capabilities = new CameraCapabilities(this); Settings = new CameraSettings(this); DisplaySettings = new CameraDisplaySettings(this); RegisterCallbacks(); SetState(CameraState.Created); }
/// <summary> /// Initializes a new instance of the <see cref="Camera"/> class. /// </summary> /// <param name="device">The camera device to access.</param> /// <exception cref="ArgumentException">Invalid CameraDevice type.</exception> /// <exception cref="NotSupportedException">The camera feature is not supported.</exception> /// <since_tizen> 3 </since_tizen> /// <feature> http://tizen.org/feature/camera </feature> public Camera(CameraDevice device) { if (!Features.IsSupported(CameraFeatures.Camera)) { throw new NotSupportedException("Camera feature is not supported."); } Native.Create(device, out _handle).ThrowIfFailed("Failed to create camera instance"); Capabilities = new CameraCapabilities(this); Settings = new CameraSettings(this); DisplaySettings = new CameraDisplaySettings(this); RegisterCallbacks(); SetState(CameraState.Created); }