Skip to main content

FileSystemTrigger.ChangeFileSystemToggleStatus

Description

The API changes the File System Trigger with toggle status for provided id from the connected Control Room.

Signature [C#]

Task ChangeFileSystemToggleStatus(int scheduleId, bool isDisable)

Properties

Input

PropertyDescription
scheduleIdThe filesystem trigger Id to change the toggle status
isDisableSets the value that indicates whether the filesystem trigger is enabled.

Remarks

Use ChangeFileSystemToggleStatus API to change the toggle status of the filesystem trigger from the connected Control Room.

Example

C#
public void ChangeEmailTriggerToggleStatus()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");
int triggerId = 1;
bool isDisabled = true;

Task.Run(() => context.FileSystemTriggers.ChangeFileSystemToggleStatus(triggerId, isDisabled)).Wait();
}
C#
public IControlRoomContext LoginControlRoom()
{
IControlRoomContext context;
string connectionString;

connectionString = "ServerUrl=https://demo.onnitellibuddies.com;UserName=demoadmin;Password=password";
context = new ControlRoomContext(connectionString);

context.Open();
return context;
}