diff --git a/src/LogExpert.Tests/ColumnizerPickerTest.cs b/src/LogExpert.Tests/ColumnizerPickerTest.cs index 449af9c9..e57f93ee 100644 --- a/src/LogExpert.Tests/ColumnizerPickerTest.cs +++ b/src/LogExpert.Tests/ColumnizerPickerTest.cs @@ -65,7 +65,7 @@ public void FindReplacementForAutoColumnizer_ValidTextFile_ReturnCorrectColumniz string fileName, Type columnizerType) { string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, fileName); - LogfileReader reader = new LogfileReader(path, new EncodingOptions(), true, 40, 50, new MultifileOptions()); + LogfileReader reader = new LogfileReader(path, new EncodingOptions(), true, 40, 50, new MultiFileOptions()); reader.ReadFiles(); Mock autoColumnizer = new Mock(); diff --git a/src/LogExpert.Tests/JsonColumnizerTest.cs b/src/LogExpert.Tests/JsonColumnizerTest.cs index 5a2482e3..cccf69b2 100644 --- a/src/LogExpert.Tests/JsonColumnizerTest.cs +++ b/src/LogExpert.Tests/JsonColumnizerTest.cs @@ -12,7 +12,7 @@ public void GetColumnNames_HappyFile_ColumnNameMatches(string fileName, string e { var jsonColumnizer = new JsonColumnizer.JsonColumnizer(); string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, fileName); - LogfileReader reader = new LogfileReader(path, new EncodingOptions(), true, 40, 50, new MultifileOptions()); + LogfileReader reader = new LogfileReader(path, new EncodingOptions(), true, 40, 50, new MultiFileOptions()); reader.ReadFiles(); ILogLine line = reader.GetLogLineWithWait(0); diff --git a/src/LogExpert.Tests/JsonCompactColumnizerTest.cs b/src/LogExpert.Tests/JsonCompactColumnizerTest.cs index 4b5a68a4..a2b9dcb0 100644 --- a/src/LogExpert.Tests/JsonCompactColumnizerTest.cs +++ b/src/LogExpert.Tests/JsonCompactColumnizerTest.cs @@ -16,7 +16,7 @@ public void GetPriority_HappyFile_PriorityMatches(string fileName, Priority prio { var jsonCompactColumnizer = new JsonColumnizer.JsonCompactColumnizer(); string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, fileName); - LogfileReader logFileReader = new LogfileReader(path, new EncodingOptions(), true, 40, 50, new MultifileOptions()); + LogfileReader logFileReader = new LogfileReader(path, new EncodingOptions(), true, 40, 50, new MultiFileOptions()); logFileReader.ReadFiles(); List loglines = new List { diff --git a/src/LogExpert.Tests/SquareBracketColumnizerTest.cs b/src/LogExpert.Tests/SquareBracketColumnizerTest.cs index 298725f0..1e66ee08 100644 --- a/src/LogExpert.Tests/SquareBracketColumnizerTest.cs +++ b/src/LogExpert.Tests/SquareBracketColumnizerTest.cs @@ -18,7 +18,7 @@ public void GetPriority_HappyFile_ColumnCountMatches(string fileName, int count) SquareBracketColumnizer squareBracketColumnizer = new SquareBracketColumnizer(); string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, fileName); - LogfileReader logFileReader = new LogfileReader(path, new EncodingOptions(), true, 40, 50, new MultifileOptions()); + LogfileReader logFileReader = new LogfileReader(path, new EncodingOptions(), true, 40, 50, new MultiFileOptions()); logFileReader.ReadFiles(); List loglines = new List { diff --git a/src/LogExpert/Classes/Log/LogfileReader.cs b/src/LogExpert/Classes/Log/LogfileReader.cs index 049900f4..624795d3 100644 --- a/src/LogExpert/Classes/Log/LogfileReader.cs +++ b/src/LogExpert/Classes/Log/LogfileReader.cs @@ -22,7 +22,7 @@ public class LogfileReader : IAutoLogLineColumnizerCallback private readonly int _MAX_LINES_PER_BUFFER = 100; private readonly object _monitor = new object(); - private readonly MultifileOptions _multiFileOptions; + private readonly MultiFileOptions _multiFileOptions; private IList _bufferList; private ReaderWriterLock _bufferListLock; @@ -50,7 +50,7 @@ public class LogfileReader : IAutoLogLineColumnizerCallback #region cTor - public LogfileReader(string fileName, EncodingOptions encodingOptions, bool multiFile, int bufferCount, int linesPerBuffer, MultifileOptions multiFileOptions) + public LogfileReader(string fileName, EncodingOptions encodingOptions, bool multiFile, int bufferCount, int linesPerBuffer, MultiFileOptions multiFileOptions) { if (fileName == null) { @@ -88,7 +88,7 @@ public LogfileReader(string fileName, EncodingOptions encodingOptions, bool mult StartGCThread(); } - public LogfileReader(string[] fileNames, EncodingOptions encodingOptions, int bufferCount, int linesPerBuffer, MultifileOptions multiFileOptions) + public LogfileReader(string[] fileNames, EncodingOptions encodingOptions, int bufferCount, int linesPerBuffer, MultiFileOptions multiFileOptions) { if (fileNames == null || fileNames.Length < 1) { diff --git a/src/LogExpert/Classes/Log/PositionAwareStreamReaderBase.cs b/src/LogExpert/Classes/Log/PositionAwareStreamReaderBase.cs index 2b76bdbb..99e648bb 100644 --- a/src/LogExpert/Classes/Log/PositionAwareStreamReaderBase.cs +++ b/src/LogExpert/Classes/Log/PositionAwareStreamReaderBase.cs @@ -28,8 +28,7 @@ protected PositionAwareStreamReaderBase(Stream stream, EncodingOptions encodingO { _stream = new BufferedStream(stream); - Encoding detectedEncoding; - _preambleLength = DetectPreambleLengthAndEncoding(out detectedEncoding); + _preambleLength = DetectPreambleLengthAndEncoding(out Encoding detectedEncoding); Encoding usedEncoding = getUsedEncoding(encodingOptions, detectedEncoding); _posIncPrecomputed = getPosIncPrecomputed(usedEncoding); @@ -48,16 +47,16 @@ protected PositionAwareStreamReaderBase(Stream stream, EncodingOptions encodingO /// public sealed override long Position { - get { return _position; } + get => _position; set { /* - * 1: Irgendwann mal auskommentiert (+Encoding.GetPreamble().Length) - * 2: Stand bei 1.1 3207 - * 3: Stand nach Fehlermeldung von Piet wegen Unicode-Bugs. - * Keihne Ahnung, ob das jetzt endgültig OK ist. - * 4: 27.07.09: Preamble-Length wird jetzt im CT ermittelt, da Encoding.GetPreamble().Length - * immer eine fixe Länge liefert (unabhängig vom echtem Dateiinhalt) + * 1: Sometime commented (+Encoding.GetPreamble().Length) + * 2: Date 1.1 3207 + * 3: Error Message from Piet because of Unicode-Bugs. + * No Idea, if this is OK. + * 4: 27.07.09: Preamble-Length is now calculated in CT, because Encoding.GetPreamble().Length + * always delivers a fixed length (does not mater what kind of data) */ _position = value; // +Encoding.GetPreamble().Length; // 1 //stream.Seek(pos, SeekOrigin.Begin); // 2 @@ -144,11 +143,11 @@ protected void MovePosition(int offset) private int DetectPreambleLengthAndEncoding(out Encoding detectedEncoding) { /* - UTF-8: EF BB BF - UTF-16-Big-Endian-Bytereihenfolge: FE FF - UTF-16-Little-Endian-Bytereihenfolge: FF FE - UTF-32-Big-Endian-Bytereihenfolge: 00 00 FE FF - UTF-32-Little-Endian-Bytereihenfolge: FF FE 00 00 + UTF-8: EF BB BF + UTF-16-Big-Endian-Byteorder: FE FF + UTF-16-Little-Endian-Byteorder: FF FE + UTF-32-Big-Endian-Byteorder: 00 00 FE FF + UTF-32-Little-Endian-Byteorder: FF FE 00 00 */ byte[] readPreamble = new byte[4]; diff --git a/src/LogExpert/Classes/Log/RolloverFilenameBuilder.cs b/src/LogExpert/Classes/Log/RolloverFilenameBuilder.cs index 3a73aab1..08800e55 100644 --- a/src/LogExpert/Classes/Log/RolloverFilenameBuilder.cs +++ b/src/LogExpert/Classes/Log/RolloverFilenameBuilder.cs @@ -29,21 +29,21 @@ public class RolloverFilenameBuilder { #region Fields - private string condContent; - private Group condGroup; - private string currentFileName; + private string _condContent; + private Group _condGroup; + private string _currentFileName; - private Group dateGroup; + private Group _dateGroup; //private Regex regexCond; - private DateTime dateTime; + private DateTime _dateTime; //private DateTimeFormatInfo dateFormat; - private string dateTimeFormat = null; + private string _dateTimeFormat; - private bool hideZeroIndex; - private Group indexGroup; - private Regex regex; + private bool _hideZeroIndex; + private Group _indexGroup; + private Regex _regex; #endregion @@ -60,15 +60,9 @@ public RolloverFilenameBuilder(string formatString) public int Index { get; set; } - public bool IsDatePattern - { - get { return this.dateGroup != null && this.dateGroup.Success; } - } + public bool IsDatePattern => _dateGroup != null && _dateGroup.Success; - public bool IsIndexPattern - { - get { return this.indexGroup != null && this.indexGroup.Success; } - } + public bool IsIndexPattern => _indexGroup != null && _indexGroup.Success; #endregion @@ -76,60 +70,60 @@ public bool IsIndexPattern public void SetFileName(string fileName) { - this.currentFileName = fileName; - Match match = this.regex.Match(fileName); + _currentFileName = fileName; + Match match = _regex.Match(fileName); if (match.Success) { - this.dateGroup = match.Groups["date"]; - if (this.dateGroup.Success) + _dateGroup = match.Groups["date"]; + if (_dateGroup.Success) { - string date = fileName.Substring(dateGroup.Index, dateGroup.Length); - if (DateTime.TryParseExact(date, this.dateTimeFormat, DateTimeFormatInfo.InvariantInfo, + string date = fileName.Substring(_dateGroup.Index, _dateGroup.Length); + if (DateTime.TryParseExact(date, _dateTimeFormat, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, - out this.dateTime)) + out _dateTime)) { } } - this.indexGroup = match.Groups["index"]; - if (this.indexGroup.Success) + _indexGroup = match.Groups["index"]; + if (_indexGroup.Success) { - this.Index = this.indexGroup.Value.Length > 0 ? int.Parse(indexGroup.Value) : 0; + Index = _indexGroup.Value.Length > 0 ? int.Parse(_indexGroup.Value) : 0; } - this.condGroup = match.Groups["cond"]; + _condGroup = match.Groups["cond"]; } } public void IncrementDate() { - this.dateTime = dateTime.AddDays(1); + _dateTime = _dateTime.AddDays(1); } public void DecrementDate() { - this.dateTime = dateTime.AddDays(-1); + _dateTime = _dateTime.AddDays(-1); } public string BuildFileName() { - string fileName = this.currentFileName; - if (this.dateGroup != null && this.dateGroup.Success) + string fileName = _currentFileName; + if (_dateGroup != null && _dateGroup.Success) { - string newDate = dateTime.ToString(this.dateTimeFormat, DateTimeFormatInfo.InvariantInfo); - fileName = fileName.Remove(this.dateGroup.Index, this.dateGroup.Length); - fileName = fileName.Insert(this.dateGroup.Index, newDate); + string newDate = _dateTime.ToString(_dateTimeFormat, DateTimeFormatInfo.InvariantInfo); + fileName = fileName.Remove(_dateGroup.Index, _dateGroup.Length); + fileName = fileName.Insert(_dateGroup.Index, newDate); } - if (this.indexGroup != null && this.indexGroup.Success) + if (_indexGroup != null && _indexGroup.Success) { - fileName = fileName.Remove(this.indexGroup.Index, this.indexGroup.Length); + fileName = fileName.Remove(_indexGroup.Index, _indexGroup.Length); string fileNameBak = fileName; - if (!this.hideZeroIndex || this.Index > 0) + if (!_hideZeroIndex || Index > 0) { - string format = "D" + this.indexGroup.Length; - fileName = fileName.Insert(this.indexGroup.Index, this.Index.ToString(format)); - if (this.hideZeroIndex && this.condContent != null) + string format = "D" + _indexGroup.Length; + fileName = fileName.Insert(_indexGroup.Index, Index.ToString(format)); + if (_hideZeroIndex && _condContent != null) { - fileName = fileName.Insert(this.indexGroup.Index, this.condContent); + fileName = fileName.Insert(_indexGroup.Index, _condContent); } } } @@ -144,24 +138,24 @@ public string BuildFileName() private void ParseFormatString(string formatString) { - string fmt = escapeNonvarRegions(formatString); + string fmt = EscapeNonvarRegions(formatString); int datePos = formatString.IndexOf("$D("); if (datePos != -1) { int endPos = formatString.IndexOf(')', datePos); if (endPos != -1) { - this.dateTimeFormat = formatString.Substring(datePos + 3, endPos - datePos - 3); - this.dateTimeFormat = this.dateTimeFormat.ToUpper(); - this.dateTimeFormat = this.dateTimeFormat.Replace('D', 'd').Replace('Y', 'y'); + _dateTimeFormat = formatString.Substring(datePos + 3, endPos - datePos - 3); + _dateTimeFormat = _dateTimeFormat.ToUpper(); + _dateTimeFormat = _dateTimeFormat.Replace('D', 'd').Replace('Y', 'y'); - string dtf = this.dateTimeFormat; + string dtf = _dateTimeFormat; dtf = dtf.ToUpper(); dtf = dtf.Replace("D", "\\d"); dtf = dtf.Replace("Y", "\\d"); dtf = dtf.Replace("M", "\\d"); fmt = fmt.Remove(datePos, 2); // remove $D - fmt = fmt.Remove(datePos + 1, this.dateTimeFormat.Length); // replace with regex version of format + fmt = fmt.Remove(datePos + 1, _dateTimeFormat.Length); // replace with regex version of format fmt = fmt.Insert(datePos + 1, dtf); fmt = fmt.Insert(datePos + 1, "?'date'"); // name the regex group } @@ -173,20 +167,20 @@ private void ParseFormatString(string formatString) int endPos = fmt.IndexOf(')', condPos); if (endPos != -1) { - this.condContent = fmt.Substring(condPos + 3, endPos - condPos - 3); + _condContent = fmt.Substring(condPos + 3, endPos - condPos - 3); fmt = fmt.Remove(condPos + 2, endPos - condPos - 1); } } fmt = fmt.Replace("*", ".*"); - this.hideZeroIndex = fmt.Contains("$J"); + _hideZeroIndex = fmt.Contains("$J"); fmt = fmt.Replace("$I", "(?'index'[\\d]+)"); fmt = fmt.Replace("$J", "(?'index'[\\d]*)"); - this.regex = new Regex(fmt); + _regex = new Regex(fmt); } - private string escapeNonvarRegions(string formatString) + private string EscapeNonvarRegions(string formatString) { string fmt = formatString.Replace('*', '\xFFFD'); StringBuilder result = new StringBuilder(); diff --git a/src/LogExpert/Classes/Log/RolloverFilenameHandler.cs b/src/LogExpert/Classes/Log/RolloverFilenameHandler.cs index 0410b00b..d0858b85 100644 --- a/src/LogExpert/Classes/Log/RolloverFilenameHandler.cs +++ b/src/LogExpert/Classes/Log/RolloverFilenameHandler.cs @@ -16,9 +16,9 @@ public class RolloverFilenameHandler { #region Fields - private readonly RolloverFilenameBuilder filenameBuilder; - private readonly ILogFileInfo logFileInfo; - private readonly MultifileOptions options; + private readonly RolloverFilenameBuilder _filenameBuilder; + private readonly ILogFileInfo _logFileInfo; + private readonly MultiFileOptions _options; #endregion @@ -27,14 +27,14 @@ public class RolloverFilenameHandler /// /// Constructor. /// - /// The complete path of the logfile + /// The complete path of the logfile /// Multifile option (e.g. format pattern) - public RolloverFilenameHandler(ILogFileInfo logFileInfo, MultifileOptions options) + public RolloverFilenameHandler(ILogFileInfo logFileInfo, MultiFileOptions options) { - this.options = options; - this.logFileInfo = logFileInfo; - this.filenameBuilder = new RolloverFilenameBuilder(this.options.FormatPattern); - this.filenameBuilder.SetFileName(logFileInfo.FileName); + _options = options; + _logFileInfo = logFileInfo; + _filenameBuilder = new RolloverFilenameBuilder(_options.FormatPattern); + _filenameBuilder.SetFileName(logFileInfo.FileName); } #endregion @@ -51,19 +51,19 @@ public RolloverFilenameHandler(ILogFileInfo logFileInfo, MultifileOptions option public LinkedList GetNameList() { LinkedList fileList = new LinkedList(); - string fileName = filenameBuilder.BuildFileName(); - string filePath = this.logFileInfo.DirectoryName + this.logFileInfo.DirectorySeparatorChar + fileName; + string fileName = _filenameBuilder.BuildFileName(); + string filePath = _logFileInfo.DirectoryName + _logFileInfo.DirectorySeparatorChar + fileName; fileList.AddFirst(filePath); bool found = true; while (found) { found = false; // increment index and check if file exists - if (this.filenameBuilder.IsIndexPattern) + if (_filenameBuilder.IsIndexPattern) { - this.filenameBuilder.Index = this.filenameBuilder.Index + 1; - fileName = filenameBuilder.BuildFileName(); - filePath = this.logFileInfo.DirectoryName + this.logFileInfo.DirectorySeparatorChar + fileName; + _filenameBuilder.Index += 1; + fileName = _filenameBuilder.BuildFileName(); + filePath = _logFileInfo.DirectoryName + _logFileInfo.DirectorySeparatorChar + fileName; if (FileExists(filePath)) { fileList.AddFirst(filePath); @@ -72,25 +72,23 @@ public LinkedList GetNameList() } } // if file with index isn't found or no index is in format pattern, decrement the current date - if (this.filenameBuilder.IsDatePattern) + if (_filenameBuilder.IsDatePattern) { int tryCounter = 0; - this.filenameBuilder.Index = 0; - while (tryCounter < this.options.MaxDayTry) + _filenameBuilder.Index = 0; + while (tryCounter < _options.MaxDayTry) { - this.filenameBuilder.DecrementDate(); - fileName = filenameBuilder.BuildFileName(); - filePath = this.logFileInfo.DirectoryName + this.logFileInfo.DirectorySeparatorChar + fileName; + _filenameBuilder.DecrementDate(); + fileName = _filenameBuilder.BuildFileName(); + filePath = _logFileInfo.DirectoryName + _logFileInfo.DirectorySeparatorChar + fileName; if (FileExists(filePath)) { fileList.AddFirst(filePath); found = true; break; } - else - { - tryCounter++; - } + + tryCounter++; } } } diff --git a/src/LogExpert/Config/ConfigManager.cs b/src/LogExpert/Config/ConfigManager.cs index 078335f7..5233b51e 100644 --- a/src/LogExpert/Config/ConfigManager.cs +++ b/src/LogExpert/Config/ConfigManager.cs @@ -253,9 +253,9 @@ private Settings LoadOrCreateNew(Stream fs) settings.preferences.pollingInterval = 250; } - if (settings.preferences.multifileOptions == null) + if (settings.preferences.multiFileOptions == null) { - settings.preferences.multifileOptions = new MultifileOptions(); + settings.preferences.multiFileOptions = new MultiFileOptions(); } if (settings.preferences.defaultEncoding == null) diff --git a/src/LogExpert/Config/Preferences.cs b/src/LogExpert/Config/Preferences.cs index 790df6ac..b1e165fc 100644 --- a/src/LogExpert/Config/Preferences.cs +++ b/src/LogExpert/Config/Preferences.cs @@ -50,7 +50,7 @@ public class Preferences public MultiFileOption multiFileOption; - public MultifileOptions multifileOptions; + public MultiFileOptions multiFileOptions; public bool multiThreadFilter = true; diff --git a/src/LogExpert/Controls/LogWindow/LogWindow.cs b/src/LogExpert/Controls/LogWindow/LogWindow.cs index 2f80bbc7..8c1d6700 100644 --- a/src/LogExpert/Controls/LogWindow/LogWindow.cs +++ b/src/LogExpert/Controls/LogWindow/LogWindow.cs @@ -97,7 +97,7 @@ public partial class LogWindow : DockContent, ILogPaintContext, ILogView private int _lineHeight = 0; internal LogfileReader _logFileReader; - private MultifileOptions _multiFileOptions = new MultifileOptions(); + private MultiFileOptions _multiFileOptions = new MultiFileOptions(); private bool _noSelectionUpdates; private PatternArgs _patternArgs = new PatternArgs(); private PatternWindow _patternWindow; diff --git a/src/LogExpert/Controls/LogWindow/LogWindowPrivate.cs b/src/LogExpert/Controls/LogWindow/LogWindowPrivate.cs index f1508a76..77534f22 100644 --- a/src/LogExpert/Controls/LogWindow/LogWindowPrivate.cs +++ b/src/LogExpert/Controls/LogWindow/LogWindowPrivate.cs @@ -75,13 +75,13 @@ private bool LoadPersistenceOptions() } IsMultiFile = persistenceData.multiFile; - _multiFileOptions = new MultifileOptions(); + _multiFileOptions = new MultiFileOptions(); _multiFileOptions.FormatPattern = persistenceData.multiFilePattern; _multiFileOptions.MaxDayTry = persistenceData.multiFileMaxDays; if (string.IsNullOrEmpty(_multiFileOptions.FormatPattern)) { - _multiFileOptions = ObjectClone.Clone(Preferences.multifileOptions); + _multiFileOptions = ObjectClone.Clone(Preferences.multiFileOptions); } splitContainerLogWindow.SplitterDistance = persistenceData.filterPosition; @@ -130,7 +130,7 @@ private void SetDefaultsFromPrefs() filterTailCheckBox.Checked = Preferences.filterTail; syncFilterCheckBox.Checked = Preferences.filterSync; FollowTailChanged(Preferences.followTail, false); - _multiFileOptions = ObjectClone.Clone(Preferences.multifileOptions); + _multiFileOptions = ObjectClone.Clone(Preferences.multiFileOptions); } private void LoadPersistenceData() diff --git a/src/LogExpert/Dialogs/SettingsDialog.cs b/src/LogExpert/Dialogs/SettingsDialog.cs index 5b81f1b7..5e775c34 100644 --- a/src/LogExpert/Dialogs/SettingsDialog.cs +++ b/src/LogExpert/Dialogs/SettingsDialog.cs @@ -179,8 +179,8 @@ private void SaveMultifileData() Preferences.multiFileOption = MultiFileOption.Ask; } - Preferences.multifileOptions.FormatPattern = textBoxMultifilePattern.Text; - Preferences.multifileOptions.MaxDayTry = (int)upDownMultifileDays.Value; + Preferences.multiFileOptions.FormatPattern = textBoxMultifilePattern.Text; + Preferences.multiFileOptions.MaxDayTry = (int)upDownMultifileDays.Value; } private void ToolButtonClick(TextBox textBox) @@ -478,8 +478,8 @@ private void FillMultifileSettings() } } - textBoxMultifilePattern.Text = Preferences.multifileOptions.FormatPattern; - upDownMultifileDays.Value = Preferences.multifileOptions.MaxDayTry; + textBoxMultifilePattern.Text = Preferences.multiFileOptions.FormatPattern; + upDownMultifileDays.Value = Preferences.multiFileOptions.MaxDayTry; } private void GetToolListBoxData() diff --git a/src/LogExpert/Entities/MultifileOptions.cs b/src/LogExpert/Entities/MultifileOptions.cs index 62d49a90..e519d04c 100644 --- a/src/LogExpert/Entities/MultifileOptions.cs +++ b/src/LogExpert/Entities/MultifileOptions.cs @@ -5,12 +5,12 @@ namespace LogExpert { [Serializable] - public class MultifileOptions + public class MultiFileOptions { #region Fields - private string formatPattern = "*$J(.)"; - private int maxDayTry = 3; + private string _formatPattern = "*$J(.)"; + private int _maxDayTry = 3; #endregion @@ -18,14 +18,14 @@ public class MultifileOptions public int MaxDayTry { - get { return maxDayTry; } - set { maxDayTry = value; } + get => _maxDayTry; + set => _maxDayTry = value; } public string FormatPattern { - get { return formatPattern; } - set { formatPattern = value; } + get => _formatPattern; + set => _formatPattern = value; } #endregion diff --git a/src/LogExpert/LogExpert.csproj b/src/LogExpert/LogExpert.csproj index 03cfb725..d2e2dd5e 100644 --- a/src/LogExpert/LogExpert.csproj +++ b/src/LogExpert/LogExpert.csproj @@ -204,7 +204,7 @@ - + diff --git a/src/UnitTests/BufferShiftTest.cs b/src/UnitTests/BufferShiftTest.cs index b8cd6197..6322f099 100644 --- a/src/UnitTests/BufferShiftTest.cs +++ b/src/UnitTests/BufferShiftTest.cs @@ -26,7 +26,7 @@ public void Boot() public void testShiftBuffers1() { int linesPerFile = 10; - MultifileOptions options = new MultifileOptions(); + MultiFileOptions options = new MultiFileOptions(); options.MaxDayTry = 0; options.FormatPattern = "*$J(.)"; LinkedList files = CreateTestfilesWithoutDate(); diff --git a/src/UnitTests/RolloverHandlerTest.cs b/src/UnitTests/RolloverHandlerTest.cs index 67697e09..6a85041d 100644 --- a/src/UnitTests/RolloverHandlerTest.cs +++ b/src/UnitTests/RolloverHandlerTest.cs @@ -15,7 +15,7 @@ internal class RolloverHandlerTest : RolloverHandlerTestBase [Test] public void testFilenameListWithAppendedIndex() { - MultifileOptions options = new MultifileOptions(); + MultiFileOptions options = new MultiFileOptions(); options.FormatPattern = "*$J(.)"; options.MaxDayTry = 66; LinkedList files = CreateTestfilesWithoutDate(); @@ -30,7 +30,7 @@ public void testFilenameListWithAppendedIndex() [Test] public void testFilenameListWithDate() { - MultifileOptions options = new MultifileOptions(); + MultiFileOptions options = new MultiFileOptions(); options.FormatPattern = "*$D(YYYY-mm-DD)_$I.log"; options.MaxDayTry = 3; LinkedList files = CreateTestfilesWithDate();