Class SaintAgent
Proxy class for the Saint Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Inherited Members
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.Implementation.dll
Syntax
public class SaintAgent : ISaintAgent, IAgent
Constructors
SaintAgent(ISaintConfigurationImplementation, IStatusMonitorImplementation, IStatusMonitorPeriodsImplementation, ISoRequestItemsAccessor)
Proxy class for the Saint Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public SaintAgent(ISaintConfigurationImplementation saintConfigurationImplementation, IStatusMonitorImplementation statusMonitorImplementation, IStatusMonitorPeriodsImplementation statusMonitorPeriodsImplementation, ISoRequestItemsAccessor accessor)
Parameters
| Type | Name | Description |
|---|---|---|
| ISaintConfigurationImplementation | saintConfigurationImplementation | |
| IStatusMonitorImplementation | statusMonitorImplementation | |
| IStatusMonitorPeriodsImplementation | statusMonitorPeriodsImplementation | |
| ISoRequestItemsAccessor | accessor |
SaintAgent(ISaintConfigurationImplementation, IStatusMonitorImplementation, IStatusMonitorPeriodsImplementation, ISoRequestItemsAccessor, IDebugUser, IServiceCallsRepository, IScriptingConfiguration, IOnlineConfiguration)
Proxy class for the Saint Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public SaintAgent(ISaintConfigurationImplementation saintConfigurationImplementation, IStatusMonitorImplementation statusMonitorImplementation, IStatusMonitorPeriodsImplementation statusMonitorPeriodsImplementation, ISoRequestItemsAccessor accessor, IDebugUser debugUser, IServiceCallsRepository serviceCallsRepository, ConfigFile.IScriptingConfiguration scriptingConfiguration, ConfigFile.IOnlineConfiguration onlineConfiguration)
Parameters
| Type | Name | Description |
|---|---|---|
| ISaintConfigurationImplementation | saintConfigurationImplementation | |
| IStatusMonitorImplementation | statusMonitorImplementation | |
| IStatusMonitorPeriodsImplementation | statusMonitorPeriodsImplementation | |
| ISoRequestItemsAccessor | accessor | |
| IDebugUser | debugUser | |
| IServiceCallsRepository | serviceCallsRepository | |
| IScriptingConfiguration | scriptingConfiguration | |
| IOnlineConfiguration | onlineConfiguration |
Methods
CreateDefaultSaintConfigurationAsync(CancellationToken)
Loading default values into a new SaintConfiguration.
Declaration
public Task<SaintConfiguration> CreateDefaultSaintConfigurationAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SaintConfiguration> | New SaintConfiguration with default values |
CreateDefaultStatusMonitorAsync(CancellationToken)
Loading default values into a new StatusMonitor.
Declaration
public Task<StatusMonitor> CreateDefaultStatusMonitorAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<StatusMonitor> | New StatusMonitor with default values |
CreateDefaultStatusMonitorPeriodsAsync(CancellationToken)
Loading default values into a new StatusMonitorPeriods.
Declaration
public Task<StatusMonitorPeriods> CreateDefaultStatusMonitorPeriodsAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<StatusMonitorPeriods> | New StatusMonitorPeriods with default values |
GetSaintConfigurationsAsync(CancellationToken)
Returns the StatusMonitorPeriods entity.
Declaration
public Task<SaintConfiguration[]> GetSaintConfigurationsAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SaintConfiguration[]> | The SaintConfiguration for all entities |
GetStatusMonitorAsync(int, CancellationToken)
Get a single status monitor based on its identity
Declaration
public Task<StatusMonitor> GetStatusMonitorAsync(int id, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | id | Identity of status monitor |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<StatusMonitor> | The requested status monitor |
GetStatusMonitorPeriodsAsync(CancellationToken)
Returns the StatusMonitorPeriods entity.
Declaration
public Task<StatusMonitorPeriods> GetStatusMonitorPeriodsAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<StatusMonitorPeriods> | The StatusMonitorEntity |
GetStatusMonitorsAsync(int, string, CancellationToken)
Get all active status monitors for a specified target
Declaration
public Task<StatusMonitor[]> GetStatusMonitorsAsync(int id, string type, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | id | Identity of target type(contact identity, project identity etc.) |
| string | type | Type to get status monitors for("contact", "project", etc.) |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<StatusMonitor[]> | Active status monitors |
RegenerateCountersAsync(bool, CancellationToken)
Regenerate the Saint counters - this can take several minutes
Declaration
public Task<BatchTaskInfo> RegenerateCountersAsync(bool runAsBatch, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | runAsBatch | If true, then execute the regeneration as a Batch Task; the service call will return immediately. Otherwise wait until the task completes, may cause a timeout if called as a Web Service |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<BatchTaskInfo> | Information about the batch task, if batch execution was requested. Otherwise null |
RegenerateStatusMonitorAsync(int, CancellationToken)
Regenerate the given status monitor
Declaration
public Task RegenerateStatusMonitorAsync(int statusMonitorId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | statusMonitorId | The id of the statusmonitor to regenerate |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task | This method has no return value |
RegenerateStatusMonitorsAsync(bool, CancellationToken)
Regenerate status monitors
Declaration
public Task<BatchTaskInfo> RegenerateStatusMonitorsAsync(bool runAsBatch, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | runAsBatch | If true, then execute the regeneration as a Batch Task; the service call will return immediately. Otherwise wait until the task completes, may cause a timeout if called as a Web Service |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<BatchTaskInfo> | Information about the batch task, if batch execution was requested. Otherwise null |
SaveSaintConfigurationAsync(SaintConfiguration, CancellationToken)
Updates the existing SaintConfiguration or creates a new SaintConfiguration if the id parameter is 0.
Declaration
public Task<SaintConfiguration> SaveSaintConfigurationAsync(SaintConfiguration saintConfiguration, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| SaintConfiguration | saintConfiguration | The SaintConfiguration that is saved |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SaintConfiguration> | New or updated SaintConfiguration |
SaveStatusMonitorAsync(StatusMonitor, CancellationToken)
Updates the existing StatusMonitor or creates a new StatusMonitor if the id parameter is 0.
Declaration
public Task<StatusMonitor> SaveStatusMonitorAsync(StatusMonitor statusMonitor, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| StatusMonitor | statusMonitor | The StatusMonitor that is saved |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<StatusMonitor> | New or updated StatusMonitor |
SaveStatusMonitorPeriodsAsync(StatusMonitorPeriods, CancellationToken)
Updates the existing StatusMonitorPeriods or creates a new StatusMonitorPeriods if the id parameter is 0.
Declaration
public Task<StatusMonitorPeriods> SaveStatusMonitorPeriodsAsync(StatusMonitorPeriods statusMonitorPeriods, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| StatusMonitorPeriods | statusMonitorPeriods | The StatusMonitorPeriods that is saved |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<StatusMonitorPeriods> | New or updated StatusMonitorPeriods |
SetRankOnStatusMonitorsAsync(string, int[], CancellationToken)
Set rank order on status monitors
Declaration
public Task SetRankOnStatusMonitorsAsync(string type, int[] itemsIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | type | Type of status monitors to reorder ("contact", "project", etc.) |
| int[] | itemsIds | The ids of the items in the order you want |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task | This method has no return value |