/* * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; namespace Tizen.Multimedia { /// /// Represents a QR configuration of . /// /// 3 public class QrConfiguration { /// /// Initializes a new instance of the class. /// /// Encoding mode for the message. /// Error correction level. /// QR code version. From 1 to 40 inclusive. /// /// var obj = new QrConfiguration(QrMode.Numeric, ErrorCorrectionLevel.Medium, 30); /// /// /// is less than 1.\n /// -or-\n /// is greater than 40. /// /// /// is invalid.\n /// -or- /// is invalid. /// /// 3 public QrConfiguration(QrMode qrMode, ErrorCorrectionLevel ecc, int version) { if (version < 1 || version > 40) { throw new ArgumentOutOfRangeException(nameof(version), version, "Valid version range is 1 to 40 inclusive."); } ValidationUtil.ValidateEnum(typeof(QrMode), qrMode, nameof(qrMode)); ValidationUtil.ValidateEnum(typeof(ErrorCorrectionLevel), ecc, nameof(ecc)); Mode = qrMode; ErrorCorrectionLevel = ecc; Version = version; } /// /// Gets the encoding mode for the message. /// /// 3 public QrMode Mode { get; } /// /// Gets the error correction level. /// /// 3 public ErrorCorrectionLevel ErrorCorrectionLevel { get; } /// /// Gets the QR code version. /// /// 3 public int Version { get; } } }