Class PhoneListAgent
Proxy class for the PhoneList 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 PhoneListAgent : IPhoneListAgent, IAgent
Constructors
PhoneListAgent(IPhoneListImplementation, IPhoneListPreferencesImplementation, ISoRequestItemsAccessor)
Proxy class for the PhoneList Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public PhoneListAgent(IPhoneListImplementation phoneListImplementation, IPhoneListPreferencesImplementation phoneListPreferencesImplementation, ISoRequestItemsAccessor accessor)
Parameters
Type | Name | Description |
---|---|---|
IPhoneListImplementation | phoneListImplementation | |
IPhoneListPreferencesImplementation | phoneListPreferencesImplementation | |
ISoRequestItemsAccessor | accessor |
PhoneListAgent(IPhoneListImplementation, IPhoneListPreferencesImplementation, ISoRequestItemsAccessor, IDebugUser, IServiceCallsRepository)
Proxy class for the PhoneList Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public PhoneListAgent(IPhoneListImplementation phoneListImplementation, IPhoneListPreferencesImplementation phoneListPreferencesImplementation, ISoRequestItemsAccessor accessor, IDebugUser debugUser, IServiceCallsRepository serviceCallsRepository)
Parameters
Type | Name | Description |
---|---|---|
IPhoneListImplementation | phoneListImplementation | |
IPhoneListPreferencesImplementation | phoneListPreferencesImplementation | |
ISoRequestItemsAccessor | accessor | |
IDebugUser | debugUser | |
IServiceCallsRepository | serviceCallsRepository |
Methods
AddToFavoritesAsync(int, CancellationToken)
Adds a new contact to the history/favorites. Returns the rank of the new history item. If the contact already existed in the history, it isn't added but the rank is updated.
Declaration
public Task<int> AddToFavoritesAsync(int contactId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | contactId | The contact id |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<int> | The rank of the history item |
GetContactPhonesAsync(int, CancellationToken)
Returns an array of phone list items for all the persons belonging to a contact (company). The in-parameter must be a valid contact-id.
Declaration
public Task<PhoneListItem[]> GetContactPhonesAsync(int contactId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | contactId | The contact id |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<PhoneListItem[]> | The contacts phone list. |
GetDepartmentPhonesAsync(int, CancellationToken)
Returns an array of phone list items with the in-parameter as restriction. The in-parameter must be a valid department id (UserGroupId).
Declaration
public Task<PhoneListItem[]> GetDepartmentPhonesAsync(int departmentId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | departmentId | The department to get the phone list for |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<PhoneListItem[]> | The department phone list |
GetFavoritesPhonesAsync(CancellationToken)
Returns an array of phone list items with the Contacts in the users favorites dropdown list.
Declaration
public Task<PhoneListItem[]> GetFavoritesPhonesAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<PhoneListItem[]> | The favorite contact phone list |
GetPreferencesAsync(CancellationToken)
Getting Phone List Preferences from the CRM 5 user preferences
Declaration
public Task<PhoneListPreferences> GetPreferencesAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<PhoneListPreferences> | The Phone List Preferences |
SearchAsync(string, CancellationToken)
Searching the phone list. Using default search preferences or the preferences already set by the PhoneListPreferences Service
Declaration
public Task<PhoneListItem[]> SearchAsync(string searchString, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | searchString | The search string |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<PhoneListItem[]> | The resulting phone list |
SearchWithPreferencesAsync(string, PhoneListPreferences, CancellationToken)
Searching the phone list. Search is based on the supplied preferences.
Declaration
public Task<PhoneListItem[]> SearchWithPreferencesAsync(string searchString, PhoneListPreferences preferences, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | searchString | The search string. |
PhoneListPreferences | preferences | The search preferences |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<PhoneListItem[]> | The resulting phone list. |
SetPreferencesAsync(PhoneListPreferences, CancellationToken)
Setting Phone List Preferences to the CRM 5 user preferences
Declaration
public Task SetPreferencesAsync(PhoneListPreferences preferences, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
PhoneListPreferences | preferences | The preference that is set as user preferences |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task |