Skip to main content

FileSystemTrigger.UpdateFileSystemTriggerAsync

Description

Updates the File System Trigger with provided FileSystemTrigger instance from the connected Control Room.

Signature [C#]

Task UpdateFileSystemTriggerAsync(FileSystemTrigger fileSystemTrigger)

Properties

Input

PropertyDescription
FileSystemTriggerUpdate detail of filesystem trigger.

Remarks

Use UpdateFileSystemTriggerAsync API to update details of FileSystem Trigger from the connected Control Room.

Example

C#
public void UpdateFileSystemTrigger()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");

string updateTriggerName = "updateTestFSTrigger";

FileSystemTrigger fileSystemTrigger = new FileSystemTrigger()
{
Id = 1,
Name = updateTriggerName,
ExpiresOn = DateTime.UtcNow.AddMinutes(2)
};

Task.Run(() => context.FileSystemTriggers.UpdateFileSystemTriggerAsync(fileSystemTrigger)).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;
}