예제 #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")
                       );
        }
예제 #2
0
 /// <summary>
 /// Constructor used to inject helper.
 /// </summary>
 /// <param name="_hp"></param>
 public CacheService(Ihp _hp)
 {
     this.hp = _hp;
 }
예제 #3
0
 /// <summary>
 /// Constructor used to inject hp.S
 /// </summary>
 /// <param name="_hp"></param>
 public DateHp(Ihp _hp)
 {
     this.hp = _hp;
 }
예제 #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;
 }
예제 #5
0
 /// <summary>
 /// Constructor used to inject the Ihp.
 /// </summary>
 /// <param name="_hp"></param>
 public ChangeDbConnection(Ihp _hp)
 {
     this.hp = _hp;
 }