Files
OpenNest/OpenNest.Core/IJsonConfigPostProcessor.cs
T
ajandClaude Opus 5.5 9f3c22dc4f feat(posts): let posts load and save their settings as JSON
IJsonConfigPostProcessor lets a host keep a post's settings somewhere other
than the JSON file beside the post DLL. The CL-707, CI Fiber and Gravograph
posts implement it; LoadConfig keeps the current settings when the JSON is
unusable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 20:02:08 -04:00

20 lines
777 B
C#

namespace OpenNest
{
/// <summary>
/// A configurable post whose settings travel as JSON, so a host can keep them somewhere other
/// than the post's own file (the nest server's shared copy, for one).
/// </summary>
public interface IJsonConfigPostProcessor : IConfigurablePostProcessor
{
/// <summary>The settings as the post's own file holds them.</summary>
string SerializeConfig();
/// <summary>
/// Replaces the settings with <paramref name="json"/>, in the post's file format; the
/// file itself is not written. Throws <see cref="System.Text.Json.JsonException"/> and
/// keeps the current settings when the JSON is not usable.
/// </summary>
void LoadConfig(string json);
}
}