Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

K3UL/API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

154 Commits

Repository files navigation

AnyStatus API

A library that contains the classes, interfaces and utilities needed for developing AnyStatus plugins.

Build status NuGet Join the chat at https://gitter.im/AnyStatus

How it works

AnyStatus communicates with plugins using the API library. During startup, AnyStatus scans assemblies in the installation directory and registers all plugins.

A plugin is a set of classes that instruct AnyStatus how to display it in the dashboard and which features the plugin supports.


AnyStatus Components

Plugins Library

Check out the complete plugins library at https://github.com/AnyStatus/Plugins

Plugin Example

A class that defines the plugin.

[DisplayName("Ping")]
[DisplayColumn("Network")]
[Description("Test the reachability of a host")]
public class Ping : Plugin, IMonitored
{
 [Required]
 [Category("Ping")]
 [Description("Host Name or IP Address")]
 public string Host { get; set; }
}

A class that handles a monitor health check.

public class Pong : IMonitor<Ping>
{
 public void Handle(Ping myPing)
 {
 using (var ping = new System.Net.NetworkInformation.Ping())
 {
 var pong = ping.Send(myPing.Host);
 
 if (pong.Status == IPStatus.Success)
 ping.State = State.Ok;
 else
 ping.State = State.Failed;
 }
 }
}

In addition to the IMonitored and IMonitor<T> interfaces, you can also implement interfaces such as ICanStart, ICanStop, ICanRestart and others, to let AnyStatus know which features are supported by the plugin.

About

An API class library needed for developing plugins and other extensions for AnyStatus

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

  • C# 99.2%
  • Batchfile 0.8%

AltStyle によって変換されたページ (->オリジナル) /