Show / Hide Table of Contents

Class SentryAgent

Proxy class for the Sentry Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Inheritance
object
SentryAgent
Implements
ISentryAgent
IAgent
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.Implementation.dll
Syntax
public class SentryAgent : ISentryAgent, IAgent

Constructors

SentryAgent(ISentryImplementation, ISoRequestItemsAccessor)

Proxy class for the Sentry Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Declaration
public SentryAgent(ISentryImplementation sentryImplementation, ISoRequestItemsAccessor accessor)
Parameters
Type Name Description
ISentryImplementation sentryImplementation
ISoRequestItemsAccessor accessor

SentryAgent(ISentryImplementation, ISoRequestItemsAccessor, IDebugUser, IServiceCallsRepository, IScriptingConfiguration, IOnlineConfiguration)

Proxy class for the Sentry Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Declaration
public SentryAgent(ISentryImplementation sentryImplementation, ISoRequestItemsAccessor accessor, IDebugUser debugUser, IServiceCallsRepository serviceCallsRepository, ConfigFile.IScriptingConfiguration scriptingConfiguration, ConfigFile.IOnlineConfiguration onlineConfiguration)
Parameters
Type Name Description
ISentryImplementation sentryImplementation
ISoRequestItemsAccessor accessor
IDebugUser debugUser
IServiceCallsRepository serviceCallsRepository
IScriptingConfiguration scriptingConfiguration
IOnlineConfiguration onlineConfiguration

Methods

CanCreateAppointmentInAllDiariesAsync(CancellationToken)

CanCreateAppointmentInAllDiaries will check if the current associate can create appointments in diaries belonging all other associates. CanCreateAppointmentInAssociateDiaries will only check against associates that are diary owners.

Declaration
public Task<bool> CanCreateAppointmentInAllDiariesAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<bool>

Returns true if the current associate can create appointments in the diary of all the other associates, otherwise false.

CanCreateAppointmentInAssociateDiariesAsync(int[], CancellationToken)

CanCreateAppointmentInAssociateDiaries will check if the current associate can create appointments in diaries belonging to the associates listed in associateIds. CanCreateAppointmentInAssociateDiaries will only check against associates that are diary owners. If none of the associates listed in the associateIds parameter is a diary owner, the method will return true.

Declaration
public Task<bool> CanCreateAppointmentInAssociateDiariesAsync(int[] associateIds, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int[] associateIds

Array of associate ids to check.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<bool>

Returns true if the current associate can create appointments in the diary of all the other associates, otherwise false.

CanCreateAppointmentInEachAssociatesDiaryAsync(int[], CancellationToken)

CanCreateAppointmentInEachAssociateDiary will check if the current associate can create appointments in diaries belonging to the associates listed in associateIds. CanCreateAppointmentInEachAssociateDiary will only check against associates that are diary owners. If none of the associates listed in the associateIds parameter is a diary owner, the method will return true.

Declaration
public Task<bool[]> CanCreateAppointmentInEachAssociatesDiaryAsync(int[] associateIds, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int[] associateIds

Array of associate ids to check.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<bool[]>

Returns true if for each given associate if the current associate can create appointments in that diary, otherwise false.

GetFunctionRightsAsync(CancellationToken)

Get a string array of all functions rights for the role of the current associate.

Declaration
public Task<string[]> GetFunctionRightsAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<string[]>

String array with the technical names of assigned function rights

GetNewTableRightAsync(string, CancellationToken)

Returns a TableRight for a new row based on tableName parameter.

Declaration
public Task<TableRight> GetNewTableRightAsync(string tableName, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string tableName

Name of the table to get the TableRights from

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<TableRight>

The TableRight

GetTableRightByContactOwnershipAsync(string, int, CancellationToken)

Return the TableRight from the relationship between the current user and the given user and group.

Declaration
public Task<TableRight> GetTableRightByContactOwnershipAsync(string tableName, int contactId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string tableName

Name of the table to get the TableRights from.

int contactId

The owner contact.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<TableRight>

The TableRight

GetTableRightByOwnershipAsync(string, int, int, CancellationToken)

Return the TableRight from the relationship between the current user and the given user and group.

Declaration
public Task<TableRight> GetTableRightByOwnershipAsync(string tableName, int contactGroupId, int contactAssociateId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string tableName

Name of the table to get the TableRights from.

int contactGroupId

The user-group that the associate id is part of.

int contactAssociateId

The associate id of the owner of the record

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<TableRight>

The TableRight

HasFunctionRightAsync(string, CancellationToken)

Get a boolean value indicating if the current user has the functional right.

Declaration
public Task<bool> HasFunctionRightAsync(string functionRight, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string functionRight

Function right to check.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<bool>

Implements

ISentryAgent
IAgent
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top