AppSession.cs 771 Bytes
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Net;
using System.Text;

namespace RECS_MQTT
{
    class AppSession
    {
        static AppSession()
        {
            //Dapper.SimpleCRUD.SetDialect(Dapper.SimpleCRUD.Dialect.MySQL);
        }

        public static int Port { get; set; } = int.Parse(ConfigAppSettings.GetValue("port"));

        public static IPAddress IP { get; set; } = IPAddress.Parse(ConfigAppSettings.GetValue("ip"));

        public static string UserName { get; set; } = ConfigAppSettings.GetValue("username");

        public static string Password { get; set; } = ConfigAppSettings.GetValue("password");

        public static string Constr { get; set; } = ConfigAppSettings.GetConstr();
    }
}