using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Web; using Tango.TCC.BL; using Tango.Web; namespace Tango.TCC.Service { public class TCCServiceConfig : WebConfig { public static String JWT_TOKEN_SECRET => ConfigurationManager.AppSettings[nameof(JWT_TOKEN_SECRET)].ToString(); /// /// Gets the number of card columns. /// public static int CARD_COLUMNS => int.Parse(ConfigurationManager.AppSettings[nameof(CARD_COLUMNS)].ToString()); /// /// Gets the number of card rows. /// public static int CARD_ROWS => int.Parse(ConfigurationManager.AppSettings[nameof(CARD_ROWS)].ToString()); /// /// Gets the card target index (hole). /// public static int CARD_TARGET_INDEX => int.Parse(ConfigurationManager.AppSettings[nameof(CARD_TARGET_INDEX)].ToString()); /// /// Gets the template image base64 string. /// public static String TEMPLATE_STRING => ConfigurationManager.AppSettings[nameof(TEMPLATE_STRING)].ToString(); /// /// Gets the desired width of the sample image. /// public static int SAMPLE_WIDTH => int.Parse(ConfigurationManager.AppSettings[nameof(SAMPLE_WIDTH)].ToString()); /// /// Gets the desired height of the sample image. /// public static int SAMPLE_HEIGHT => int.Parse(ConfigurationManager.AppSettings[nameof(SAMPLE_HEIGHT)].ToString()); /// /// Gets the recommended camera resolution width. /// public static int CAMERA_WIDTH => int.Parse(ConfigurationManager.AppSettings[nameof(CAMERA_WIDTH)].ToString()); /// /// Gets the recommended camera resolution height. /// public static int CAMERA_HEIGHT => int.Parse(ConfigurationManager.AppSettings[nameof(CAMERA_HEIGHT)].ToString()); /// /// Gets the histogram similarity tolerance. /// public static double SIMILARITY_TOLERANCE => int.Parse(ConfigurationManager.AppSettings[nameof(SIMILARITY_TOLERANCE)].ToString()); /// /// Gets the histogram comparison method. /// public static CardDetectionHistogramMethods HISTOGRAM_METHOD => (CardDetectionHistogramMethods)Enum.Parse(typeof(CardDetectionHistogramMethods), ConfigurationManager.AppSettings[nameof(HISTOGRAM_METHOD)].ToString()); /// /// Gets a value indicating whether to perform a double check of the card arucos. /// public static bool ENABLE_DOUBLE_CHECKING => bool.Parse(ConfigurationManager.AppSettings[nameof(ENABLE_DOUBLE_CHECKING)].ToString()); /// /// Gets a value indicating whether the card will be detected only when barcode detection is successful. /// public static bool ENFORCE_BARCODE_DETECTION => bool.Parse(ConfigurationManager.AppSettings[nameof(ENFORCE_BARCODE_DETECTION)].ToString()); /// /// Gets the mobile application ID. /// public static String APP_ID => ConfigurationManager.AppSettings[nameof(APP_ID)].ToString(); /// /// Gets the database catalog. /// public static String TANGO_DB_CATALOG => ConfigurationManager.AppSettings[nameof(TANGO_DB_CATALOG)].ToString(); /// /// Gets the Send Grid API key. /// public static String SEND_GRID_API_KEY => ConfigurationManager.AppSettings[nameof(SEND_GRID_API_KEY)].ToString(); /// /// Gets the TCC source images container. /// public static String TCC_SOURCE_CONTAINER => ConfigurationManager.AppSettings[nameof(TCC_SOURCE_CONTAINER)].ToString(); /// /// Gets the TCC sample images container. /// public static String TCC_SAMPLE_CONTAINER => ConfigurationManager.AppSettings[nameof(TCC_SAMPLE_CONTAINER)].ToString(); } }