Skip to content

Commit 07de0b0

Browse files
committed
a few more updates
1 parent ffdf6c9 commit 07de0b0

15 files changed

Lines changed: 1476 additions & 277 deletions
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
namespace LogExpert;
2+
3+
/// <summary>
4+
/// Provides context information to plugins during initialization.
5+
/// </summary>
6+
public interface IPluginContext
7+
{
8+
/// <summary>
9+
/// Logger for the plugin to use for diagnostic output.
10+
/// </summary>
11+
ILogExpertLogger Logger { get; }
12+
13+
/// <summary>
14+
/// Directory where the plugin assembly is located.
15+
/// </summary>
16+
string PluginDirectory { get; }
17+
18+
/// <summary>
19+
/// Version of the host application (LogExpert).
20+
/// </summary>
21+
Version HostVersion { get; }
22+
23+
/// <summary>
24+
/// Directory where the plugin can store configuration files.
25+
/// Typically %APPDATA%\LogExpert\Plugins\{PluginName}\
26+
/// </summary>
27+
string ConfigurationDirectory { get; }
28+
}

src/ColumnizerLib/IPluginLifecycle.cs

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,44 +11,17 @@ public interface IPluginLifecycle
1111
/// Use this to initialize resources, load configuration, etc.
1212
/// </summary>
1313
/// <param name="context">Context providing information about the host environment</param>
14-
void Initialize(IPluginContext context);
15-
14+
void Initialize (IPluginContext context);
15+
1616
/// <summary>
1717
/// Called when the application is shutting down.
1818
/// Use this to cleanup resources, save state, etc.
1919
/// </summary>
20-
void Shutdown();
21-
20+
void Shutdown ();
21+
2222
/// <summary>
2323
/// Called when the plugin should reload its configuration.
2424
/// Use this to refresh settings without restarting the application.
2525
/// </summary>
26-
void Reload();
27-
}
28-
29-
/// <summary>
30-
/// Provides context information to plugins during initialization.
31-
/// </summary>
32-
public interface IPluginContext
33-
{
34-
/// <summary>
35-
/// Logger for the plugin to use for diagnostic output.
36-
/// </summary>
37-
ILogExpertLogger Logger { get; }
38-
39-
/// <summary>
40-
/// Directory where the plugin assembly is located.
41-
/// </summary>
42-
string PluginDirectory { get; }
43-
44-
/// <summary>
45-
/// Version of the host application (LogExpert).
46-
/// </summary>
47-
Version HostVersion { get; }
48-
49-
/// <summary>
50-
/// Directory where the plugin can store configuration files.
51-
/// Typically %APPDATA%\LogExpert\Plugins\{PluginName}\
52-
/// </summary>
53-
string ConfigurationDirectory { get; }
54-
}
26+
void Reload ();
27+
}

src/LogExpert.Resources/Resources.Designer.cs

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/LogExpert.Resources/Resources.resx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2270,4 +2270,16 @@ Continue?</value>
22702270
<data name="LogExpert_Common_UI_Button_Save" xml:space="preserve">
22712271
<value>&amp;Save</value>
22722272
</data>
2273+
<data name="PluginRegistry_PluginLoadingProgress_ValidatingPluginSecurityAndManifest" xml:space="preserve">
2274+
<value>Validating plugin security and manifest</value>
2275+
</data>
2276+
<data name="PluginRegistry_PluginLoadingProgress_FailedValidationNotTrustedOrInvalidManifest" xml:space="preserve">
2277+
<value>Failed validation (not trusted or invalid manifest)</value>
2278+
</data>
2279+
<data name="PluginRegistry_PluginLoadingProgress_LoadingPluginAssembly" xml:space="preserve">
2280+
<value>Loading plugin assembly</value>
2281+
</data>
2282+
<data name="PluginRegistry_PluginLoadingProgress_FailedToLoadPluginAssemblyTimeoutOrError" xml:space="preserve">
2283+
<value>Failed to load plugin assembly (timeout or error)</value>
2284+
</data>
22732285
</root>

src/LogExpert.Tests/PluginRegistry/PluginManifestVersionParsingTests.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
using NUnit.Framework;
2-
31
using LogExpert.PluginRegistry;
42

3+
using NUnit.Framework;
4+
55
namespace LogExpert.Tests.PluginRegistry;
66

77
[TestFixture]
88
public class PluginManifestVersionParsingTests
99
{
1010
[Test]
11-
public void Validate_WithVersionRequirementWithSpaces_ShouldPass()
11+
public void Validate_WithVersionRequirementWithSpaces_ShouldPass ()
1212
{
1313
// Arrange
1414
var manifest = new PluginManifest
@@ -31,7 +31,7 @@ public void Validate_WithVersionRequirementWithSpaces_ShouldPass()
3131
}
3232

3333
[Test]
34-
public void Validate_WithVersionRequirementWithoutSpaces_ShouldPass()
34+
public void Validate_WithVersionRequirementWithoutSpaces_ShouldPass ()
3535
{
3636
// Arrange
3737
var manifest = new PluginManifest
@@ -66,7 +66,7 @@ public void Validate_WithVersionRequirementWithoutSpaces_ShouldPass()
6666
[TestCase("~1.10.0")]
6767
[TestCase("^ 1.10.0")]
6868
[TestCase("^1.10.0")]
69-
public void Validate_WithVariousVersionRequirementFormats_ShouldPass(string requirement)
69+
public void Validate_WithVariousVersionRequirementFormats_ShouldPass (string requirement)
7070
{
7171
// Arrange
7272
var manifest = new PluginManifest
@@ -89,7 +89,7 @@ public void Validate_WithVariousVersionRequirementFormats_ShouldPass(string requ
8989
}
9090

9191
[Test]
92-
public void IsCompatibleWith_WithVersionRequirementWithSpaces_ShouldWorkCorrectly()
92+
public void IsCompatibleWith_WithVersionRequirementWithSpaces_ShouldWorkCorrectly ()
9393
{
9494
// Arrange
9595
var manifest = new PluginManifest
@@ -111,7 +111,7 @@ public void IsCompatibleWith_WithVersionRequirementWithSpaces_ShouldWorkCorrectl
111111
}
112112

113113
[Test]
114-
public void IsCompatibleWith_WithCaretRange_ShouldAllowMinorUpdates()
114+
public void IsCompatibleWith_WithCaretRange_ShouldAllowMinorUpdates ()
115115
{
116116
// Arrange - ^ allows minor and patch updates but not major
117117
var manifest = new PluginManifest
@@ -134,7 +134,7 @@ public void IsCompatibleWith_WithCaretRange_ShouldAllowMinorUpdates()
134134
}
135135

136136
[Test]
137-
public void IsCompatibleWith_WithTildeRange_ShouldAllowPatchUpdates()
137+
public void IsCompatibleWith_WithTildeRange_ShouldAllowPatchUpdates ()
138138
{
139139
// Arrange - ~ allows patch updates but not minor or major
140140
var manifest = new PluginManifest
@@ -157,7 +157,7 @@ public void IsCompatibleWith_WithTildeRange_ShouldAllowPatchUpdates()
157157
}
158158

159159
[Test]
160-
public void IsCompatibleWith_WithGreaterThan_ShouldExcludeEqualVersion()
160+
public void IsCompatibleWith_WithGreaterThan_ShouldExcludeEqualVersion ()
161161
{
162162
// Arrange
163163
var manifest = new PluginManifest
@@ -178,7 +178,7 @@ public void IsCompatibleWith_WithGreaterThan_ShouldExcludeEqualVersion()
178178
}
179179

180180
[Test]
181-
public void IsCompatibleWith_WithLessThan_ShouldExcludeEqualVersion()
181+
public void IsCompatibleWith_WithLessThan_ShouldExcludeEqualVersion ()
182182
{
183183
// Arrange
184184
var manifest = new PluginManifest
@@ -200,7 +200,7 @@ public void IsCompatibleWith_WithLessThan_ShouldExcludeEqualVersion()
200200
}
201201

202202
[Test]
203-
public void IsCompatibleWith_WithNoRequirement_ShouldAlwaysBeCompatible()
203+
public void IsCompatibleWith_WithNoRequirement_ShouldAlwaysBeCompatible ()
204204
{
205205
// Arrange
206206
var manifest = new PluginManifest
@@ -222,7 +222,7 @@ public void IsCompatibleWith_WithNoRequirement_ShouldAlwaysBeCompatible()
222222
}
223223

224224
[Test]
225-
public void IsCompatibleWith_WithEmptyRequirement_ShouldAlwaysBeCompatible()
225+
public void IsCompatibleWith_WithEmptyRequirement_ShouldAlwaysBeCompatible ()
226226
{
227227
// Arrange
228228
var manifest = new PluginManifest
@@ -242,7 +242,7 @@ public void IsCompatibleWith_WithEmptyRequirement_ShouldAlwaysBeCompatible()
242242
}
243243

244244
[Test]
245-
public void DebugVersionParsing_WithExactInputFromUser()
245+
public void DebugVersionParsing_WithExactInputFromUser ()
246246
{
247247
// Arrange - Test the EXACT input that's causing the issue
248248
var requirement = ">= 1.10.0";
@@ -273,7 +273,7 @@ public void DebugVersionParsing_WithExactInputFromUser()
273273
}
274274

275275
[Test]
276-
public void Manifest_Validate_WithSpacesInRequirement_ShouldNotThrow()
276+
public void Manifest_Validate_WithSpacesInRequirement_ShouldNotThrow ()
277277
{
278278
// Arrange
279279
var manifest = new PluginManifest

0 commit comments

Comments
 (0)