TaskSupportReasons
Static class in Oadm.Sdk.Plugins · Oadm.Sdk.dll
Plain-language texts for ITaskPlugin.NotSupportedReason: what is missing and what to do. The context menu shows a task the selection cannot run greyed out with the reason as tooltip, e.g. “Needs AXIS OS 11.11 or later (this device has 10.12.338)” for one device, “Needs AXIS OS 11.11 or later: 3 of 5 selected devices” for several. Only claim a firmware version where the check really is a version; otherwise name the missing function.
public static class TaskSupportReasonsGuide: Task plugins
Methods
Section titled “Methods”FirmwareDetail
Section titled “FirmwareDetail”static string FirmwareDetail(IDeviceInfo device)“ (this device has 10.12.338)” or empty when the firmware version is unknown.
ForStatus
Section titled “ForStatus”static string? ForStatus(DeviceStatus status, bool requireOk = false)Why a device with this status cannot run a task, or null when the status allows it (Ok; Unknown too unless requireOk).
General
Section titled “General”static string General(string reason)The reason without its trailing device detail (for a summary over several devices).
NeedsApi
Section titled “NeedsApi”static string NeedsApi(string what, IDeviceInfo device)“Needs the network settings API (this device has 5.51.7)” for a device whose API list does not have it, or TaskSupportReasons.ApisNotRead while the list is empty. what names the function in plain words.
NeedsFirmware
Section titled “NeedsFirmware”static string NeedsFirmware(string minimumVersion, IDeviceInfo device)“Needs AXIS OS 11.11 or later (this device has 10.12.338)”; without a known firmware version only the first part.
static string Of(ITaskPlugin plugin, IDeviceInfo device, out Exception? error)The plugin’s reason for the device, as the host shows it: trimmed, at most TaskSupportReasons.MaxLength characters, TaskSupportReasons.Default when the plugin gives none or throws (error is then the exception).
ThisDevice
Section titled “ThisDevice”static string ThisDevice(string detail)A detail about one device, appended at the end of a reason: “ (this device has 10.12.338)“.
Fields
Section titled “Fields”ApisNotRead
Section titled “ApisNotRead”const string ApisNotRead = "Not read yet: refresh the device"The device’s API list was not read yet (a device added a moment ago, or never reached).
Default
Section titled “Default”const string Default = "Not supported on this device"Shown when a plugin gives no reason (null, empty or throwing).
MaxLength
Section titled “MaxLength”const int MaxLength = 160Longest reason the host passes on; longer ones are shortened with “…”.
ThisDevicePrefix
Section titled “ThisDevicePrefix”const string ThisDevicePrefix = " (this device "Start of a device-specific detail at the end of a reason, see TaskSupportReasons.ThisDevice.