Beispiel #1
0
        /// <summary>
        /// Gets log file with the specified name
        /// </summary>
        /// <param name="name">The name of the project or the name of the logfile</param>
        /// <returns></returns>
        public TBLogFile Get(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException("name");
            }

            name = QQnPath.EnsureExtension(name, ".tbLog");

            if (ContainsKey(name))
            {
                return(this[name]);
            }

            if (!string.IsNullOrEmpty(_logPath))
            {
                name = QQnPath.Combine(_logPath, name);
            }

            TBLogFile logFile = TBLogFile.Load(name);

            Add(name, logFile);

            return(logFile);
        }
Beispiel #2
0
 /// <summary>
 /// Ensures the specified key is relative
 /// </summary>
 /// <param name="key">The key.</param>
 /// <returns></returns>
 protected override string EnsureRelative(string key)
 {
     return(QQnPath.EnsureExtension(base.EnsureRelative(key), ".tbLog"));
 }