mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-27 12:41:06 -04:00
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>
20 lines
777 B
C#
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);
|
|
}
|
|
}
|