Exemplo n.º 1
0
        public TmsClient(IConfiguration config)
        {
            _config = config.Tms;

            ValidateBaseUrl();
            Client = RestClientUtils.CreateNewClient(_config.BaseUrl);
            Client.Authenticator = new TmsAuthenticator();

            RestoreSession();
        }
Exemplo n.º 2
0
        public TmsLogger(ITmsDapper tmsDapper, ITmsConfiguration tmsConfiguration)
        {
            var currentDir = Environment.CurrentDirectory;

            _tmsDapper        = tmsDapper;
            _tmsConfiguration = tmsConfiguration;
            CanInfoLog        = _tmsConfiguration.Settings.Logging.CanInfoLog;
            CanDbLog          = _tmsConfiguration.Settings.Logging.CanDbLog;

            _infoLogger = new LoggerConfiguration()
                          .WriteTo.File(path: currentDir + "\\" + _tmsConfiguration.Settings.Logging.Info, rollingInterval: RollingInterval.Day)
                          .CreateLogger();

            _errorLogger = new LoggerConfiguration()
                           .WriteTo.File(path: currentDir + "\\" + _tmsConfiguration.Settings.Logging.Error, rollingInterval: RollingInterval.Day)
                           .CreateLogger();
        }
 public TmsCache(IDistributedCache distributedCache, ITmsConfiguration tmsConfiguration)
 {
     _distributedCache   = distributedCache;
     _tmsConfiguration   = tmsConfiguration;
     _absoluteExpiration = _tmsConfiguration.Settings.Caching.AbsoluteExpiration;
 }