Beispiel #1
0
        /// <summary>
        /// Construct the logger service with the path of the log.
        /// </summary>
        public LoggerService(Ihp _hp)
        {
            // Get helper
            this.hp = _hp;

            // Folder path: base directory + folder path
            string directories = hp.getPathFromSeparatedCommaValue("logFolderName");

            // throw exception if the directory folder does not exist
            if (!Directory.Exists(directories))
            {
                throw new LoggerDirectoryDoesNotExist(directories);
            }

            // File path: Folder path + filename and extension Name
            filename = Path.Combine
                       (
                directories,
                GetFilenameYYYMMDD_Hours("_LOG", ".log")
                       );
        }
Beispiel #2
0
 /// <summary>
 /// Constructor used to inject helper.
 /// </summary>
 /// <param name="_hp"></param>
 public CacheService(Ihp _hp)
 {
     this.hp = _hp;
 }
Beispiel #3
0
 /// <summary>
 /// Constructor used to inject hp.S
 /// </summary>
 /// <param name="_hp"></param>
 public DateHp(Ihp _hp)
 {
     this.hp = _hp;
 }
Beispiel #4
0
 /// <summary>
 /// Construtor used to inject a cache service.
 /// </summary>
 /// <param name="_cacheService">Cache service to be injected.</param>
 public ResourceCsvService(ICache _cacheService, ILogger _loggerService, Ihp _hp)
 {
     this.cacheService  = _cacheService;
     this.loggerService = _loggerService;
     this.hp            = _hp;
 }
Beispiel #5
0
 /// <summary>
 /// Constructor used to inject the Ihp.
 /// </summary>
 /// <param name="_hp"></param>
 public ChangeDbConnection(Ihp _hp)
 {
     this.hp = _hp;
 }