Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/_build.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace></RootNamespace>
<IsPackable>False</IsPackable>
<NoWarn>CS0649;CS0169</NoWarn>
<NoWarn>CS0649;CS0169;CS9107</NoWarn>
<NukeTelemetryVersion>1</NukeTelemetryVersion>
</PropertyGroup>

Expand Down
9 changes: 4 additions & 5 deletions src/AutoColumnizer/AutoColumnizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace AutoColumnizer;

public class AutoColumnizer : ILogLineColumnizer
public class AutoColumnizer : ILogLineMemoryColumnizer
{
#region ILogLineColumnizer implementation

Expand All @@ -28,7 +28,6 @@ public string GetDescription ()
return "Automatically find the right columnizer for any file";
}


public int GetColumnCount ()
{
throw new NotImplementedException();
Expand All @@ -39,7 +38,7 @@ public string[] GetColumnNames ()
throw new NotImplementedException();
}

public IColumnizedLogLine SplitLine (ILogLineColumnizerCallback callback, ILogLine line)
public IColumnizedLogLineMemory SplitLine (ILogLineMemoryColumnizerCallback callback, ILogLineMemory logLine)
{
throw new NotImplementedException();
}
Expand All @@ -54,12 +53,12 @@ public int GetTimeOffset ()
throw new NotImplementedException();
}

public DateTime GetTimestamp (ILogLineColumnizerCallback callback, ILogLine line)
public DateTime GetTimestamp (ILogLineMemoryColumnizerCallback callback, ILogLineMemory logLine)
{
throw new NotImplementedException();
}

public void PushValue (ILogLineColumnizerCallback callback, int column, string value, string oldValue)
public void PushValue (ILogLineMemoryColumnizerCallback callback, int column, string value, string oldValue)
{
}

Expand Down
1 change: 1 addition & 0 deletions src/AutoColumnizer/AutoColumnizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

<AssemblyTitle>AutoColumnizer</AssemblyTitle>
<OutputPath>$(SolutionDir)..\bin\$(Configuration)\plugins</OutputPath>
<RootNamespace>AutoColumnizer</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
33 changes: 0 additions & 33 deletions src/ColumnizerLib.UnitTests/Extensions/LogLineExtensionsTests.cs

This file was deleted.

28 changes: 0 additions & 28 deletions src/ColumnizerLib/Column.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,34 +41,6 @@ static Column ()

public static IColumnMemory EmptyColumn { get; }

[Obsolete]
IColumnizedLogLine IColumn.Parent { get; }

[Obsolete]
string IColumn.FullValue
{
get;
//set
//{
// field = value;

// var temp = FullValue.ToString();

// foreach (var replacement in _replacements)
// {
// temp = replacement(temp);
// }

// DisplayValue = temp.AsMemory();
//}
}

[Obsolete("Use the DisplayValue property of IColumnMemory")]
string IColumn.DisplayValue { get; }

[Obsolete("Use Text property of ITextValueMemory")]
string ITextValue.Text => DisplayValue.ToString();

public IColumnizedLogLineMemory Parent
{
get; set => field = value;
Expand Down
6 changes: 0 additions & 6 deletions src/ColumnizerLib/ColumnizedLogLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ public class ColumnizedLogLine : IColumnizedLogLineMemory
{
#region Properties

[Obsolete("Use the Property of IColumnizedLogLineMemory")]
ILogLine IColumnizedLogLine.LogLine { get; }

[Obsolete("Use the Property of IColumnizedLogLineMemory")]
IColumn[] IColumnizedLogLine.ColumnValues { get; }

public ILogLineMemory LogLine { get; set; }

public IColumnMemory[] ColumnValues { get; set; }
Expand Down
6 changes: 0 additions & 6 deletions src/ColumnizerLib/Extensions/Extensions.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
namespace ColumnizerLib.Extensions;

[System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1708:Identifiers should differ by more than case", Justification = "Intentionally")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1034:Nested types should not be visible", Justification = "Intentionally")]
public static class Extensions
{
extension(ILogLine logLine)
{
public string ToClipBoardText () => logLine == null ? string.Empty : $"\t{logLine.LineNumber + 1}\t{logLine.FullLine}";
}

extension(ILogLineMemory logLine)
{
public string ToClipBoardText () => logLine == null ? string.Empty : $"\t{logLine.LineNumber + 1}\t{logLine.FullLine}";
Expand Down
1 change: 1 addition & 0 deletions src/ColumnizerLib/IAutoLogLineColumnizerCallback.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace ColumnizerLib;

[Obsolete("This interface is deprecated. Use IAutoLogLineMemoryColumnizerCallback for a memory-based implementation instead.")]
public interface IAutoLogLineColumnizerCallback
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/ColumnizerLib/IAutoLogLineMemoryColumnizerCallback.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace ColumnizerLib;

public interface IAutoLogLineMemoryColumnizerCallback : IAutoLogLineColumnizerCallback
public interface IAutoLogLineMemoryColumnizerCallback
{
/// <summary>
/// Returns the log line with the given index (zero-based).
Expand Down
1 change: 1 addition & 0 deletions src/ColumnizerLib/IColumn.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace ColumnizerLib;

[Obsolete("This interface is deprecated. Use IColumnMemory for a memory-based implementation instead.")]
public interface IColumn : ITextValue
{
#region Properties
Expand Down
8 changes: 4 additions & 4 deletions src/ColumnizerLib/IColumnMemory.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
namespace ColumnizerLib;

public interface IColumnMemory : IColumn, ITextValueMemory
public interface IColumnMemory : ITextValueMemory
{
#region Properties

new IColumnizedLogLineMemory Parent { get; }
IColumnizedLogLineMemory Parent { get; }

new ReadOnlyMemory<char> FullValue { get; }
ReadOnlyMemory<char> FullValue { get; }

new ReadOnlyMemory<char> DisplayValue { get; }
ReadOnlyMemory<char> DisplayValue { get; }

#endregion
}
1 change: 1 addition & 0 deletions src/ColumnizerLib/IColumnizedLogLine.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace ColumnizerLib;

[Obsolete("This interface is deprecated. Use IColumnizedLogLineMemory for a memory-based implementation instead.")]
public interface IColumnizedLogLine
{
#region Properties
Expand Down
6 changes: 3 additions & 3 deletions src/ColumnizerLib/IColumnizedLogLineMemory.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
namespace ColumnizerLib;

public interface IColumnizedLogLineMemory : IColumnizedLogLine
public interface IColumnizedLogLineMemory
{
#region Properties

new ILogLineMemory LogLine { get; }
ILogLineMemory LogLine { get; }

new IColumnMemory[] ColumnValues { get; }
IColumnMemory[] ColumnValues { get; }

#endregion
}
1 change: 1 addition & 0 deletions src/ColumnizerLib/IColumnizerConfigurator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace ColumnizerLib;
/// The Config button in LogExpert's columnizer dialog is enabled if a Columnizer implements this interface.
/// If you don't need a config dialog you don't have to implement this interface.
/// </summary>
[Obsolete("This interface is deprecated. Please implement IColumnizerConfiguratorMemory instead.")]
public interface IColumnizerConfigurator
{
#region Public methods
Expand Down
13 changes: 12 additions & 1 deletion src/ColumnizerLib/IColumnizerConfiguratorMemory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace ColumnizerLib;
/// The Config button in LogExpert's columnizer dialog is enabled if a Columnizer implements this interface.
/// If you don't need a config dialog you don't have to implement this interface.
/// </summary>
public interface IColumnizerConfiguratorMemory : IColumnizerConfigurator
public interface IColumnizerConfiguratorMemory
{
#region Public methods

Expand All @@ -29,5 +29,16 @@ public interface IColumnizerConfiguratorMemory : IColumnizerConfigurator
/// </remarks>
void Configure (ILogLineMemoryColumnizerCallback callback, string configDir);

/// <summary>
/// This function will be called right after LogExpert has loaded your Columnizer class. Use this
/// to load the configuration which was saved in the Configure() function.
/// You have to hold the loaded config data in your Columnizer object.
/// </summary>
/// <param name="configDir">The complete path to the directory where LogExpert stores its settings.
/// You can use this directory, if you want to. Please don't use the file name "settings.dat", because this
/// name is used by LogExpert.
/// </param>
void LoadConfig (string configDir);

#endregion
}
1 change: 1 addition & 0 deletions src/ColumnizerLib/IColumnizerPriority.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace ColumnizerLib;
/// <remarks>Implementations use the provided file name and sample log lines to assess how suitable the columnizer
/// is for processing the file. Higher priority values indicate a better fit. This interface is typically used to select
/// the most appropriate columnizer when multiple options are available.</remarks>
[Obsolete("This interface is deprecated. Use IColumnizerPriorityMemory instead for a memory based implementation.")]
public interface IColumnizerPriority
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/ColumnizerLib/IColumnizerPriorityMemory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace ColumnizerLib;
/// <remarks>Implementations use the provided file name and sample log lines to assess how suitable the columnizer
/// is for processing the file. Higher priority values indicate a better fit. This interface is typically used to select
/// the most appropriate columnizer when multiple options are available.</remarks>
public interface IColumnizerPriorityMemory : IColumnizerPriority
public interface IColumnizerPriorityMemory
{
/// <summary>
/// Determines the priority level for the specified file based on the provided log line samples.
Expand Down
23 changes: 21 additions & 2 deletions src/ColumnizerLib/IContextMenuEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,20 @@ public interface IContextMenuEntry
/// <li>null: No menu entry is displayed.</li>
/// </ul>
/// </returns>
[Obsolete("Use the overload of GetMenuText that takes an ILogLineMemory parameter instead.")]
string GetMenuText (IList<int> loglines, ILogLineMemoryColumnizer columnizer, ILogExpertCallback callback);

string GetMenuText (int linesCount, ILogLineMemoryColumnizer columnizer, ILogLine logline);
/// <summary>
/// This function is called from LogExpert if the context menu is about to be displayed.
/// Your implementation can control whether LogExpert will show a menu entry by returning
/// an appropriate value.<br></br>
/// </summary>
/// <remarks>Throws an exception if any parameter is null or if linesCount is less than 1.</remarks>
/// <param name="linesCount">The number of lines to include in the generated menu text. Must be a positive integer.</param>
/// <param name="columnizer">An implementation of the ILogLineMemoryColumnizer interface used to format the log line data for display.</param>
/// <param name="logline">An instance of ILogLineMemory representing the log line to be included in the menu text.</param>
/// <returns>A string containing the formatted menu text based on the provided log line and formatting options.</returns>
string GetMenuText (int linesCount, ILogLineMemoryColumnizer columnizer, ILogLineMemory logline);


/// <summary>
Expand All @@ -46,9 +57,17 @@ public interface IContextMenuEntry
/// if necessary.</param>
/// <param name="callback">The callback interface implemented by LogExpert. You can use the functions
/// for retrieving log lines or pass it along to functions of the Columnizer if needed.</param>
[Obsolete("Use the overload of MenuSelected that takes an ILogLineMemory parameter instead.")]
void MenuSelected (IList<int> loglines, ILogLineMemoryColumnizer columnizer, ILogExpertCallback callback);

void MenuSelected (int linesCount, ILogLineMemoryColumnizer columnizer, ILogLine logline);
/// <summary>
/// This function is called from LogExpert if the menu entry is choosen by the user. <br></br>
/// Note that this function is called from the GUI thread. So try to avoid time consuming operations.
/// </summary>
/// <param name="linesCount"></param>
/// <param name="columnizer"></param>
/// <param name="logline"></param>
void MenuSelected (int linesCount, ILogLineMemoryColumnizer columnizer, ILogLineMemory logline);

#endregion
}
1 change: 1 addition & 0 deletions src/ColumnizerLib/IInitColumnizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace ColumnizerLib;
/// retrieve specific lines.
/// </para>
/// </remarks>
[Obsolete("This interface is deprecated. Use IInitColumnizerMemory instead and implement the Selected and DeSelected methods there.")]
public interface IInitColumnizer
{
#region Public methods
Expand Down
2 changes: 1 addition & 1 deletion src/ColumnizerLib/IInitColumnizerMemory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace ColumnizerLib;
/// retrieve specific lines.
/// </para>
/// </remarks>
public interface IInitColumnizerMemory : IInitColumnizer
public interface IInitColumnizerMemory
{
#region Public methods

Expand Down
9 changes: 4 additions & 5 deletions src/ColumnizerLib/ILogExpertCallback.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using System.Collections.Generic;

namespace ColumnizerLib;

/// <summary>
/// This callback interface is implemented by LogExpert. You can use it e.g. when implementing a
/// context menu plugin.
/// </summary>
[Obsolete("This interface is deprecated. Please use ILogExpertCallbackMemory for a memory based implementation instead.")]
public interface ILogExpertCallback : ILogLineColumnizerCallback
{
#region Public methods
Expand All @@ -27,7 +26,7 @@ public interface ILogExpertCallback : ILogLineColumnizerCallback
/// <li>The file will be deleted when closing the tab!</li>
/// </ul>
/// </remarks>
void AddTempFileTab(string fileName, string title);
void AddTempFileTab (string fileName, string title);

/// <summary>
/// With this function you can create a new tab and add a bunch of text lines to it.
Expand All @@ -53,13 +52,13 @@ public interface ILogExpertCallback : ILogLineColumnizerCallback
/// will disable the "locate in original file" menu entry.
/// </para>
/// </remarks>
void AddPipedTab(IList<LineEntry> lineEntryList, string title);
void AddPipedTab (IList<LineEntry> lineEntryList, string title);

/// <summary>
/// Returns the title of the current tab (the tab for which the context menu plugin was called for).
/// </summary>
/// <returns></returns>
string GetTabTitle();
string GetTabTitle ();

#endregion
}
1 change: 1 addition & 0 deletions src/ColumnizerLib/ILogLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace ColumnizerLib;
/// <remarks>Implementations of this interface provide access to both the full text of the log line and its
/// position within the source log. This can be used to correlate log entries with their original context or for
/// processing log files line by line.</remarks>
[Obsolete("This interface is deprecated. Use ILogLineMemory for a memory-based implementation instead.")]
public interface ILogLine : ITextValue
{
#region Properties
Expand Down
1 change: 1 addition & 0 deletions src/ColumnizerLib/ILogLineColumnizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace ColumnizerLib;
/// <br></br><br></br>
/// You can implement your own columnizers for your logfile format, if needed.
///</summary>
[Obsolete("This interface is deprecated. Use ILogLineMemoryColumnizer for a memory-based implementation instead.")]
public interface ILogLineColumnizer
{
#region Public methods
Expand Down
1 change: 1 addition & 0 deletions src/ColumnizerLib/ILogLineColumnizerCallback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace ColumnizerLib;
///An example would be when the log lines contains only the time of day but the date is coded in the file name. In this situation
///you can use the GetFileName() function to retrieve the name of the current file to build a complete timestamp.
///</remarks>
[Obsolete("This interface is deprecated and will be removed in a future version. Please use ILogLineMemoryColumnizerCallback for a memory based implementation instead.")]
public interface ILogLineColumnizerCallback
{
#region Public methods
Expand Down
Loading