Пример #1
0
 public void testFilenameListWithAppendedIndex()
 {
   MultifileOptions options = new MultifileOptions();
   options.FormatPattern = "*$J(.)";
   options.MaxDayTry = 66;
   LinkedList<string> files = CreateTestfilesWithoutDate();
   string firstFile = files.Last.Value;
   ILogFileInfo info = new LogFileInfo(new Uri(firstFile));
   RolloverFilenameHandler handler = new RolloverFilenameHandler(info, options);
   LinkedList<string> fileList = handler.GetNameList();
   Assert.AreEqual(files, fileList);
   Cleanup();
 }
Пример #2
0
		public ILogFileInfo GetLogfileInfo(string uriString)
		{
			Uri uri = new Uri(uriString);
			if (uri.IsFile)
			{
				ILogFileInfo logFileInfo = new LogFileInfo(uri);
				return logFileInfo;
			}
			else
			{
				throw new UriFormatException("Uri " + uriString + " is no file Uri");
			}
		}
Пример #3
0
        public ILogFileInfo GetLogfileInfo(string uriString)
        {
            Uri uri = new Uri(uriString);

            if (uri.IsFile)
            {
                ILogFileInfo logFileInfo = new LogFileInfo(uri);
                return(logFileInfo);
            }
            else
            {
                throw new UriFormatException("Uri " + uriString + " is no file Uri");
            }
        }
Пример #4
0
        public void testFilenameListWithAppendedIndex()
        {
            MultifileOptions options = new MultifileOptions();

            options.FormatPattern = "*$J(.)";
            options.MaxDayTry     = 66;
            LinkedList <string> files         = CreateTestfilesWithoutDate();
            string                  firstFile = files.Last.Value;
            ILogFileInfo            info      = new LogFileInfo(new Uri(firstFile));
            RolloverFilenameHandler handler   = new RolloverFilenameHandler(info, options);
            LinkedList <string>     fileList  = handler.GetNameList();

            Assert.AreEqual(files, fileList);
            Cleanup();
        }