Class ForeignSystemAgent
Proxy class for the ForeignSystem 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 ForeignSystemAgent : IForeignSystemAgent, IAgent
Constructors
ForeignSystemAgent(IForeignAppEntityImplementation, IForeignDeviceImplementation, IForeignKeyImplementation, IForeignKeyListImplementation, ISoRequestItemsAccessor)
Proxy class for the ForeignSystem Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public ForeignSystemAgent(IForeignAppEntityImplementation foreignAppEntityImplementation, IForeignDeviceImplementation foreignDeviceImplementation, IForeignKeyImplementation foreignKeyImplementation, IForeignKeyListImplementation foreignKeyListImplementation, ISoRequestItemsAccessor accessor)
Parameters
Type | Name | Description |
---|---|---|
IForeignAppEntityImplementation | foreignAppEntityImplementation | |
IForeignDeviceImplementation | foreignDeviceImplementation | |
IForeignKeyImplementation | foreignKeyImplementation | |
IForeignKeyListImplementation | foreignKeyListImplementation | |
ISoRequestItemsAccessor | accessor |
ForeignSystemAgent(IForeignAppEntityImplementation, IForeignDeviceImplementation, IForeignKeyImplementation, IForeignKeyListImplementation, ISoRequestItemsAccessor, IDebugUser, IServiceCallsRepository)
Proxy class for the ForeignSystem Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public ForeignSystemAgent(IForeignAppEntityImplementation foreignAppEntityImplementation, IForeignDeviceImplementation foreignDeviceImplementation, IForeignKeyImplementation foreignKeyImplementation, IForeignKeyListImplementation foreignKeyListImplementation, ISoRequestItemsAccessor accessor, IDebugUser debugUser, IServiceCallsRepository serviceCallsRepository)
Parameters
Type | Name | Description |
---|---|---|
IForeignAppEntityImplementation | foreignAppEntityImplementation | |
IForeignDeviceImplementation | foreignDeviceImplementation | |
IForeignKeyImplementation | foreignKeyImplementation | |
IForeignKeyListImplementation | foreignKeyListImplementation | |
ISoRequestItemsAccessor | accessor | |
IDebugUser | debugUser | |
IServiceCallsRepository | serviceCallsRepository |
Methods
AddDeviceByIdentifierAsync(string, string, string, CancellationToken)
Adds a new ForeignDevice with deviceName that belongs to the application with applicationName, with an optional device-specific identifier.
Declaration
public Task<ForeignDevice> AddDeviceByIdentifierAsync(string applicationName, string deviceName, string deviceIdentifier, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
string | deviceIdentifier | Unique id of device (Palm pilot device ID, version number, etc) |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignDevice> | The ForeignDevice. |
AddForeignKeyAsync(ForeignKey, string, string, string, CancellationToken)
Add a new key belonging to the ForeignApp and ForeignDevice specified.
Declaration
public Task<ForeignKey> AddForeignKeyAsync(ForeignKey foreignKey, string applicationName, string deviceName, string deviceIdentifier, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ForeignKey | foreignKey | Foreign key to save |
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
string | deviceIdentifier | The device identifier. Optional if device identifier is not used. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignKey> | The new or updated ForeignKey |
CreateDefaultForeignAppEntityAsync(CancellationToken)
Loading default values into a new ForeignAppEntity. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
public Task<ForeignAppEntity> CreateDefaultForeignAppEntityAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<ForeignAppEntity> | New ForeignAppEntity with default values |
DeleteDeviceByIdentifierAsync(string, string, string, CancellationToken)
Delete a ForeignDevice with deviceName and deviceIdentifier that belongs to the application with applicationName.
Declaration
public Task DeleteDeviceByIdentifierAsync(string applicationName, string deviceName, string deviceIdentifier, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
string | deviceIdentifier | Unique id of device (Palm pilot device ID, version number, etc) |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task | This method has no return value |
DeleteForeignAppEntityAsync(int, CancellationToken)
Deletes the ForeignAppEntity
Declaration
public Task DeleteForeignAppEntityAsync(int foreignAppEntityId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | foreignAppEntityId | The identity of the ForeignAppEntity |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
DeleteForeignDeviceAsync(ForeignDevice, string, CancellationToken)
Deletes a foreign device from an application
Declaration
public Task DeleteForeignDeviceAsync(ForeignDevice foreignDevice, string applicationName, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ForeignDevice | foreignDevice | foreign device to delete |
string | applicationName | Name of application to delete from |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task |
DeleteForeignKeyAsync(ForeignKey, string, string, string, string, int, CancellationToken)
Deletes all specified occurrences of a key, belonging to the ForeignApp and ForeignDevice, table and record specified. Specifying a blank table name will delete ALL keys of the given name; specifying a recordId of 0 will delete ALL keys of the given name for the given table.
Declaration
public Task DeleteForeignKeyAsync(ForeignKey foreignKey, string applicationName, string deviceName, string deviceIdentifier, string tableName, int recordId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ForeignKey | foreignKey | Key name to delete. |
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
string | deviceIdentifier | The device identifier. Optional if device identifier is not used. |
string | tableName | Table name, transformed to and from numeric table id by the service layer.<p/>Use an empty string to delete ALL keys that otherwise match; this may be dangerous and can take a long time if there are many items to delete. |
int | recordId | Id of record that this key refers to. If the table name was blank, then this parameter must be 0. It can also be 0 to mean that the foreign key record was not bound to any particular record of the target table.<p/>Specifying a zero recordId will remove the recordId restriction and delete all keys that otherwise match. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task | This method has no return value |
DeleteForeignKeyOnNameAsync(string, string, string, string, string, int, CancellationToken)
Deletes all specified occurrences of a key, belonging to the ForeignApp and ForeignDevice, table and record specified. Specifying a blank table name will delete ALL keys of the given name; specifying a recordId of 0 will delete ALL keys of the given name for the given table.
Declaration
public Task DeleteForeignKeyOnNameAsync(string applicationName, string deviceName, string deviceIdentifier, string keyName, string tableName, int recordId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
string | deviceIdentifier | The device identifier. Optional if device identifier is not used. |
string | keyName | The name of the foreign key to delete. |
string | tableName | Table name, transformed to and from numeric table id by the service layer.<p/>Use an empty string to delete ALL keys that otherwise match; this may be dangerous and can take a long time if there are many items to delete. |
int | recordId | Id of record that this key refers to. If the table name was blank, then this parameter must be 0. It can also be 0 to mean that the foreign key record was not bound to any particular record of the target table.<p/>Specifying a zero recordId will remove the recordId restriction and delete all keys that otherwise match. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task | This method has no return value |
GetAllForeignKeysOnEntityAsync(string, int, CancellationToken)
Get a list of foreignkeys ('app.device.key') and their values ('123') that belong to the specified entity.
Declaration
public Task<StringDictionary> GetAllForeignKeysOnEntityAsync(string entityType, int entityId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | entityType | Entity type (table name): 'contact', 'project' etc. |
int | entityId | Primary key of Entity |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<StringDictionary> | Dictionary of 'appname.deviceid.keyname' = '123' key values |
GetAppByNameAsync(string, CancellationToken)
Gets the ForeignApp with the given name.
Declaration
public Task<ForeignAppEntity> GetAppByNameAsync(string applicationName, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignAppEntity> | The ForeignApp that matches the name. |
GetApplicationDevicesAsync(string, CancellationToken)
Gets all devices that belong to a foreign application.
Declaration
public Task<ForeignDevice[]> GetApplicationDevicesAsync(string applicationName, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The foreign application name |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignDevice[]> | Array of ForeignDevices |
GetApplicationKeysAsync(string, CancellationToken)
Returns all ForeignKeys that belong to an application.
Declaration
public Task<ForeignKey[]> GetApplicationKeysAsync(string applicationName, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignKey[]> | Array of all ForeignKeys in the ForeignApp. |
GetDeviceByIdentifierAsync(string, string, string, CancellationToken)
Gets a ForeignDevice with deviceName and deviceIdentifier that belongs to the application with applicationName.
Declaration
public Task<ForeignDevice> GetDeviceByIdentifierAsync(string applicationName, string deviceName, string deviceIdentifier, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
string | deviceIdentifier | Optional unique id of device (Palm pilot device ID, version number, etc) |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignDevice> | The ForeignDevice. |
GetDeviceByNameAsync(string, string, CancellationToken)
Gets a ForeignDevice with deviceName that belongs to the application with applicationName.
Declaration
public Task<ForeignDevice> GetDeviceByNameAsync(string applicationName, string deviceName, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignDevice> | The ForeignDevice. |
GetDeviceKeysAsync(string, string, CancellationToken)
Returns all ForeignKeys that belong to a device.
Declaration
public Task<ForeignKey[]> GetDeviceKeysAsync(string applicationName, string deviceName, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignKey[]> | Array of all ForeignKeys in the ForeignDevice. |
GetDeviceKeysOnDeviceIdentifierAsync(string, string, string, CancellationToken)
Returns all ForeignKeys that belong to a device with a given deviceIdentifier.
Declaration
public Task<ForeignKey[]> GetDeviceKeysOnDeviceIdentifierAsync(string applicationName, string deviceName, string deviceIdentifier, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
string | deviceIdentifier | Identifier for a unique grouping of keys within a device. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignKey[]> | Array of all ForeignKeys in the ForeignDevice that belong to the DeviceIdentifier. |
GetDeviceKeysOnDeviceIdentifierTableAsync(string, string, string, string, CancellationToken)
Returns all ForeignKeys that belong to a device with a given deviceIdentifier and table name.
Declaration
public Task<ForeignKey[]> GetDeviceKeysOnDeviceIdentifierTableAsync(string applicationName, string deviceName, string deviceIdentifier, string tableName, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
string | deviceIdentifier | Identifier for a unique grouping of keys within a device. |
string | tableName | Table name, transformed to and from numeric table id by the service layer.<p/>Use an empty string to indicate that your key is not bound to any specific table. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignKey[]> | Array of all ForeignKeys in the ForeignDevice that belong to the DeviceIdentifier. |
GetDeviceKeysOnDeviceIdentifierTableRecordIdAsync(string, string, string, string, int, CancellationToken)
Returns all ForeignKeys that belong to a device with a given deviceIdentifier and table name, as well as record id.
Declaration
public Task<ForeignKey[]> GetDeviceKeysOnDeviceIdentifierTableRecordIdAsync(string applicationName, string deviceName, string deviceIdentifier, string tableName, int recordId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
string | deviceIdentifier | Identifier for a unique grouping of keys within a device. |
string | tableName | Table name, transformed to and from numeric table id by the service layer.<p/>Use an empty string to indicate that your key is not bound to any specific table. |
int | recordId | Id of record that this key refers to. If the table name was blank, then this parameter must be 0. It can also be 0 to mean that the foreign key record was not bound to any particular record of the target table. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignKey[]> | Array of all ForeignKeys in the ForeignDevice that match the criteria |
GetForeignAppEntityAsync(int, CancellationToken)
Gets a ForeignAppEntity object.
Declaration
public Task<ForeignAppEntity> GetForeignAppEntityAsync(int foreignAppEntityId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | foreignAppEntityId | The identifier of the ForeignAppEntity object |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<ForeignAppEntity> | ForeignAppEntity |
GetForeignDeviceAsync(int, CancellationToken)
Gets a ForeignDevice object.
Declaration
public Task<ForeignDevice> GetForeignDeviceAsync(int foreignDeviceId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | foreignDeviceId | The identifier of the ForeignDevice object |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<ForeignDevice> | ForeignDevice |
GetKeyAsync(string, string, string, string, int, CancellationToken)
Returning a foreign key by its key name, that belongs to the specified device and application. A table name and record ID can also be specified.
Declaration
public Task<ForeignKey> GetKeyAsync(string applicationName, string deviceName, string keyName, string tableName, int recordId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
string | keyName | The name of the foreign key. |
string | tableName | Table name, transformed to and from numeric table id by the service layer.<p/>Use an empty string to indicate that your key is not bound to any specific table. |
int | recordId | Id of record that this key refers to. If the table name was blank, then this parameter must be 0. It can also be 0 to mean that the foreign key record was not bound to any particular record of the target table. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignKey> | The ForeignKey. |
GetKeyByValueAndIdentifierAsync(string, string, string, string, string, string, CancellationToken)
Get a foreignkey based on its name and value, that belongs to the specified deviceId, device, and application.
Declaration
public Task<ForeignKey> GetKeyByValueAndIdentifierAsync(string applicationName, string deviceName, string deviceIdentifier, string keyName, string keyValue, string tableName, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
string | deviceIdentifier | The device identifier. Optional if device identifier is not used. |
string | keyName | The name of the foreign key. |
string | keyValue | Foreignkey value |
string | tableName | Table name, transformed to and from numeric table id by the service layer.<p/>Use an empty string to indicate that your key is not bound to any specific table. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignKey> | The ForeignKey. |
GetKeyByValueAsync(string, string, string, string, string, CancellationToken)
Get a foreignkey based on its name and value, that belongs to the specified device and application.
Declaration
public Task<ForeignKey> GetKeyByValueAsync(string applicationName, string deviceName, string keyName, string keyValue, string tableName, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
string | keyName | The name of the foreign key. |
string | keyValue | Foreignkey value |
string | tableName | Table name, transformed to and from numeric table id by the service layer.<p/>Use an empty string to indicate that your key is not bound to any specific table. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignKey> | The ForeignKey. |
GetKeyOnDeviceIdentifierAsync(string, string, string, string, string, int, CancellationToken)
Returning a foreign key by its key name and device identifier, that belongs to the specified device and application. A table name and record ID can also be specified.
Declaration
public Task<ForeignKey> GetKeyOnDeviceIdentifierAsync(string applicationName, string deviceName, string deviceIdentifier, string keyName, string tableName, int recordId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
string | deviceIdentifier | The device identifier. |
string | keyName | The name of the foreign key. |
string | tableName | Table name, transformed to and from numeric table id by the service layer.<p/>Use an empty string to indicate that your key is not bound to any specific table. |
int | recordId | Id of record that this key refers to. If the table name was blank, then this parameter must be 0. It can also be 0 to mean that the foreign key record was not bound to any particular record of the target table. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignKey> | The ForeignKey. |
GetKeyValueAsync(string, string, string, string, int, CancellationToken)
Gets the string value of a ForeignKey, that belongs to the specified device and application. The table name and record ID must also be specified.
Declaration
public Task<string> GetKeyValueAsync(string applicationName, string deviceName, string keyName, string tableName, int recordId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
string | keyName | The name of the foreign key. |
string | tableName | Table name, transformed to and from numeric table id by the service layer.<p/>Use an empty string to indicate that your key is not bound to any specific table. |
int | recordId | Id of record that this key refers to. If the table name was blank, then this parameter must be 0. It can also be 0 to mean that the foreign key record was not bound to any particular record of the target table. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<string> | The ForeignKey value as string. |
GetKeyValueOnDeviceIdentifierAsync(string, string, string, string, string, int, CancellationToken)
Returning a foreign key string value by its key name and device identifier, that belongs to the specified device and application. A table name and record ID can also be specified.
Declaration
public Task<string> GetKeyValueOnDeviceIdentifierAsync(string applicationName, string deviceName, string deviceIdentifier, string keyName, string tableName, int recordId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
string | deviceIdentifier | The device identifier. |
string | keyName | The name of the foreign key. |
string | tableName | Table name, transformed to and from numeric table id by the service layer.<p/>Use an empty string to indicate that your key is not bound to any specific table. |
int | recordId | Id of record that this key refers to. If the table name was blank, then this parameter must be 0. It can also be 0 to mean that the foreign key record was not bound to any particular record of the target table. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<string> | The ForeignKey's string value. |
SaveDeviceByIdentifierAsync(string, string, string, ForeignDevice, CancellationToken)
Updates a ForeignDevice with deviceName that belongs to the application with applicationName.
Declaration
public Task<ForeignDevice> SaveDeviceByIdentifierAsync(string applicationName, string deviceName, string deviceIdentifier, ForeignDevice foreignDevice, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
string | deviceIdentifier | Unique id of device (Palm pilot device ID, version number, etc) |
ForeignDevice | foreignDevice | Foreign device to save. Can be null if adding new device. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignDevice> | The ForeignDevice. |
SaveForeignAppEntityAsync(ForeignAppEntity, CancellationToken)
Updates the existing ForeignAppEntity or creates a new ForeignAppEntity if the id parameter is empty
Declaration
public Task<ForeignAppEntity> SaveForeignAppEntityAsync(ForeignAppEntity foreignAppEntity, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ForeignAppEntity | foreignAppEntity | The ForeignAppEntity that is saved. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<ForeignAppEntity> | New or updated ForeignAppEntity |
SaveForeignDeviceAsync(ForeignDevice, string, CancellationToken)
Saves a foreign device for an foreign application
Declaration
public Task<ForeignDevice> SaveForeignDeviceAsync(ForeignDevice foreignDevice, string applicationName, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ForeignDevice | foreignDevice | Foreign device to save |
string | applicationName | The name of the foreign application. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignDevice> | Returns the saved foreign device |
SaveForeignKeyAsync(ForeignKey, string, string, string, CancellationToken)
Saves a key belonging to the ForeignApp and ForeignDevice specified.
Declaration
public Task<ForeignKey> SaveForeignKeyAsync(ForeignKey foreignKey, string applicationName, string deviceName, string deviceIdentifier, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ForeignKey | foreignKey | Foreign key to save |
string | applicationName | The name of the foreign application. |
string | deviceName | The name of the foreign device. |
string | deviceIdentifier | The device identifier. Optional if device identifier is not used. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<ForeignKey> | The new or updated ForeignKey |