PluginAttribute
class cAlgo.API
DesktopCLICloud
Sealed class PluginAttribute.
Definition
public sealed class PluginAttribute : Attribute
Namespace: cAlgo.API · Group: Attributes
Remarks
Marks a class as a Plugin. The Plugin attribute cannot be omitted.
Examples
using cAlgo.API;
namespace cAlgo.Plugins
{
// config.json declares the plugin settings, the class holds only the code
public partial class PluginAttributeSample : Plugin
{
protected override void OnStart()
{
Print("Plugin started, time zone: {0}", TimeZone.DisplayName);
}
}
}
class PluginAttributeSample():
def on_start(self):
api.Print(f"Plugin started, time zone: {api.TimeZone.DisplayName}")
{
"AccessRights": "None",
"TimeZone": "UTC"
}
Constructors
| Name | Description |
|---|---|
| PluginAttributeDesktopCLICloud | Initializes a new PluginAttribute instance. |
Properties
| Name | Description |
|---|---|
AccessRightsDesktopCLICloudAccessRights | Gets or sets the access rights required for the Plugin. |
AdditionalInfoUrlDesktopCLICloudstring | Gets or sets additional info url. |
TimeZoneDesktopCLICloudstring | Sets the timezone for all the Plugin datetime references |