Skip to content

PluginToolErrors

Static class in Oadm.Sdk.Plugins · Oadm.Sdk.dll

What a tool method of a plugin answers when the arguments are not valid: the host turns it into the refusal of the call, one entry per field (the texts of the plugin’s page: “Enter a name.”). A method that fails for another reason throws InvalidOperationException with the text to show.

public static class PluginToolErrors
static string Answer(IEnumerable<KeyValuePair<string, string>> errors)

The answer of a tool method for invalid arguments: {"errors": [{"field": "...", "error": "..."}]}.

Parameters

  • errors: The fields and what to enter instead; the key is the JSON name of the argument, nested with dots.