aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/TCC/Tango.TCC.Service/TCCServiceConfig.cs
blob: 70c38f58902be02d24e54f5859d52261e7665a17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Ke
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();

        /// <summary>
        /// Gets the number of card columns.
        /// </summary>
        public static int CARD_COLUMNS => int.Parse(ConfigurationManager.AppSettings[nameof(CARD_COLUMNS)].ToString());

        /// <summary>
        /// Gets the number of card rows.
        /// </summary>
        public static int CARD_ROWS => int.Parse(ConfigurationManager.AppSettings[nameof(CARD_ROWS)].ToString());

        /// <summary>
        /// Gets the card target index (hole).
        /// </summary>
        public static int CARD_TARGET_INDEX => int.Parse(ConfigurationManager.AppSettings[nameof(CARD_TARGET_INDEX)].ToString());

        /// <summary>
        /// Gets the template image base64 string.
        /// </summary>
        public static String TEMPLATE_STRING => ConfigurationManager.AppSettings[nameof(TEMPLATE_STRING)].ToString();

        /// <summary>
        /// Gets the desired width of the sample image.
        /// </summary>
        public static int SAMPLE_WIDTH => int.Parse(ConfigurationManager.AppSettings[nameof(SAMPLE_WIDTH)].ToString());

        /// <summary>
        /// Gets the desired height of the sample image.
        /// </summary>
        public static int SAMPLE_HEIGHT => int.Parse(ConfigurationManager.AppSettings[nameof(SAMPLE_HEIGHT)].ToString());

        /// <summary>
        /// Gets the recommended camera resolution width.
        /// </summary>
        public static int CAMERA_WIDTH => int.Parse(ConfigurationManager.AppSettings[nameof(CAMERA_WIDTH)].ToString());

        /// <summary>
        /// Gets the recommended camera resolution height.
        /// </summary>
        public static int CAMERA_HEIGHT => int.Parse(ConfigurationManager.AppSettings[nameof(CAMERA_HEIGHT)].ToString());

        /// <summary>
        /// Gets the histogram similarity tolerance.
        /// </summary>
        public static double SIMILARITY_TOLERANCE => int.Parse(ConfigurationManager.AppSettings[nameof(SIMILARITY_TOLERANCE)].ToString());

        /// <summary>
        /// Gets the histogram comparison method.
        /// </summary>
        public static CardDetectionHistogramMethods HISTOGRAM_METHOD => (CardDetectionHistogramMethods)Enum.Parse(typeof(CardDetectionHistogramMethods), ConfigurationManager.AppSettings[nameof(HISTOGRAM_METHOD)].ToString());

        /// <summary>
        /// Gets a value indicating whether to perform a double check of the card arucos.
        /// </summary>
        public static bool ENABLE_DOUBLE_CHECKING => bool.Parse(ConfigurationManager.AppSettings[nameof(ENABLE_DOUBLE_CHECKING)].ToString());

        /// <summary>
        /// Gets a value indicating whether the card will be detected only when barcode detection is successful.
        /// </summary>
        public static bool ENFORCE_BARCODE_DETECTION => bool.Parse(ConfigurationManager.AppSettings[nameof(ENFORCE_BARCODE_DETECTION)].ToString());

        /// <summary>
        /// Gets the mobile application ID.
        /// </summary>
        public static String APP_ID => ConfigurationManager.AppSettings[nameof(APP_ID)].ToString();

        /// <summary>
        /// Gets the database catalog.
        /// </summary>
        public static String TANGO_DB_CATALOG => ConfigurationManager.AppSettings[nameof(TANGO_DB_CATALOG)].ToString();

        /// <summary>
        /// Gets the Send Grid API key.
        /// </summary>
        public static String SEND_GRID_API_KEY => ConfigurationManager.AppSettings[nameof(SEND_GRID_API_KEY)].ToString();

        /// <summary>
        /// Gets the TCC source images container.
        /// </summary>
        public static String TCC_SOURCE_CONTAINER => ConfigurationManager.AppSettings[nameof(TCC_SOURCE_CONTAINER)].ToString();

        /// <summary>
        /// Gets the TCC sample images container.
        /// </summary>
        public static String TCC_SAMPLE_CONTAINER => ConfigurationManager.AppSettings[nameof(TCC_SAMPLE_CONTAINER)].ToString();
    }
}