Class PluginStatus
[Obfuscation(Exclude = true, ApplyToMembers = true)]
[Serializable]
public class PluginStatus
Inheritance
Inherited Members
Namespace: HomeSeer.PluginSdk
Assembly: PluginSdk.dll
Represents the current operational state of a HomeSeer plugin.
Remarks
This is the expected return type when HomeSeer calls a plugin's implementation of OnStatusCheck()
Examples
public void BeforeReturnStatus() {
//Analyze the current state of the plugin
//...
//The plugin is operating as expected
Status = PluginStatus.Ok();
}
Constructors
View SourcePluginStatus(PluginStatus.EPluginStatus, String)
Creates a new PluginStatus with the specified PluginStatus.EPluginStatus and status text
Declaration
public PluginStatus(PluginStatus.EPluginStatus status, string statusText)
Parameters
Type | Name | Description |
---|---|---|
PluginStatus.EPluginStatus | status | The PluginStatus.EPluginStatus representing the current state of the plugin |
System.String | statusText | A detailed explanation of the status |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if no status text was supplied when the status is not OK |
Properties
View SourceStatus
The status of the plugin as an PluginStatus.EPluginStatus
Declaration
public PluginStatus.EPluginStatus Status { get; }
Property Value
Type | Description |
---|---|
PluginStatus.EPluginStatus |
StatusText
A detailed explanation of the status of the plugin
Declaration
public string StatusText { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
View SourceCritical(String)
Creates a new PluginStatus with the status of Critical and the specified description
Declaration
public static PluginStatus Critical(string statusText)
Parameters
Type | Name | Description |
---|---|---|
System.String | statusText | A detailed explanation of the status |
Returns
Type | Description |
---|---|
PluginStatus | A PluginStatus with a status of Critical |
Fatal(String)
Creates a new PluginStatus with the status of Fatal and the specified description
Declaration
public static PluginStatus Fatal(string statusText)
Parameters
Type | Name | Description |
---|---|---|
System.String | statusText | A detailed explanation of the status |
Returns
Type | Description |
---|---|
PluginStatus | A PluginStatus with a status of Fatal |
Info(String)
Creates a new PluginStatus with the status of Info and the specified description
Declaration
public static PluginStatus Info(string statusText)
Parameters
Type | Name | Description |
---|---|---|
System.String | statusText | A detailed explanation of the status |
Returns
Type | Description |
---|---|
PluginStatus | A PluginStatus with a status of Info |
Ok()
Creates a new PluginStatus of OK
Declaration
public static PluginStatus Ok()
Returns
Type | Description |
---|---|
PluginStatus | A PluginStatus with a status of OK |
Warning(String)
Creates a new PluginStatus with the status of Warning and the specified description
Declaration
public static PluginStatus Warning(string statusText)
Parameters
Type | Name | Description |
---|---|---|
System.String | statusText | A detailed explanation of the status |
Returns
Type | Description |
---|---|
PluginStatus | A PluginStatus with a status of Warning |