<PackageReference Include="Relativity.Server.Agent.SDK" Version="5000.0.2" />

AgentBase

public abstract class AgentBase
Describes basic properties, methods and events related to agent instances.

public sealed delegate OnMessageEventHandler : MulticastDelegate

public int AgentID { get; }

Read-only property returning unique ID of an agent.

public string AssemblyPath { get; }

Read-only property returning assembly path.

public string ClassName { get; }

Read-only property returning class name.

public bool? DidWork { get; set; }

public bool Enabled { get; set; }

Gets and sets the flag to mark an agent instance as enabled or disabled.

public bool Executing { get; }

Read-only property returning Boolean flag indicating whether agent is currently executing.

public IAgentHelper Helper { get; }

Gets the Relativity.API.IAgentHelper object

public double Interval { get; }

Read-only property returning double number indicating the interval at which the agent instance runs.

public bool IsHealthy { get; }

Get whether the agent is healthy to do work

public DateTime LastExecutionTime { get; }

Read-only property returning time when agent instance last checked its execution.

public AgentMessage LastMessage { get; }

Read-only property returning last message logged by agent instance.

public int LoggingLevel { get; set; }

Gets and sets logging level of an agent instance.

public abstract string Name { get; }

Read-only property which is overridden in a derived class.

public Uri ServicesAPIUri { get; }

Gets or sets the URL to the nearest Services API endpoint

public AgentType ServiceType { get; }

public DateTime StartTime { get; }

Records the current time of the agent execution.

public bool ToBeRemoved { get; set; }

When true, this means the agent is marked for removal, and will not take any new jobs. Note that this value should never be set to false.

public bool UseFixedInterval { get; set; }

Sets an agent instance to check in on a fixed time interval.

Raised when agent instance changes its status to Disabled.

Raised when agent instance changes its status to Enabled.

Raised when agent instance experiences an exception while executing.

Raised when agent instance starts executing.

Raised when agent instance stops executing.

Raised when agent instance attempts to log message.

public AgentBase()

Instantiates an object of AgentBase type.

public abstract void Execute()

Sub which is overridden in a derived class.

protected int GetAgentServerID()

Gets the workspace server.

public SqlConnection GetDatabaseConnection(int workspaceID)

Returns database connection based on the workspace ID passed in as a parameter.

Returns an IEnumerable<T> containing all ResourceGroupIDs this agent is a part of.

public bool IsBetweenTimes(DateTime startTime, DateTime endTime)

Returns whether the current time is between two specified DateTime times.

public bool IsOffHours()

Indicates whether the current time is during the off hours for an agent.

public virtual void KillTimer()

Calls Dispose() on timer object and releases its resources.

public virtual void RaiseError(string message, string detailMessage)

Raises an error during agent execution.

public virtual void RaiseMessage(string message, int level)

Raises a message during agent execution.

public virtual void RaiseMessageNoLogging(string message, int level)

Raises a message during agent execution but does not log to Relativity.Logging framework.

public virtual void RaiseWarning(string message)

Raises a warning during agent execution.

public virtual void RaiseWarning(string message, string detailMessage)

Raises a warning during agent execution.

public double SetInterval(double value)

Sets the run interval of an agent instance.