Interface ICustomFunctions
A set of custom functions that can be run against the IEntityUpdater
Namespace: LemonEdge.Core
Assembly: API.dll
Syntax
public interface ICustomFunctions
Methods
AggregateTransactionValue(Nullable<Guid>, Nullable<DateTimeOffset>, Guid, Nullable<Guid>, Nullable<Guid>, Nullable<Guid>, Boolean, Nullable<DateTimeOffset>, DateTimeOffset, DateTimeOffset)
Retrieves the results of aggregating the specified transaction value transactionTypeValueID
Declaration
Task<IEnumerable<ITransactionAggregateResult>> AggregateTransactionValue(Guid? canvasID, DateTimeOffset? lastUpdated, Guid transactionTypeValueID, Guid? instrumentSetID, Guid? ignoreParentTypeID, Guid? ignoreParentID, bool groupByInstrument, DateTimeOffset? startDate, DateTimeOffset effectiveDate, DateTimeOffset financialDate)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | canvasID | The id of any Canvas you want this query to run in. Null indicates the current main system |
System.Nullable<System.DateTimeOffset> | lastUpdated | The as of date you want this query to run for. Null indicates the query should run on the latest current data. |
System.Guid | transactionTypeValueID | This specific value should be aggregated across all transactions |
System.Nullable<System.Guid> | instrumentSetID | The set of instruments you would like the transactions for to be aggregated |
System.Nullable<System.Guid> | ignoreParentTypeID | If you want to ignore transactions against a specified parent item, you need both this type entity id and |
System.Nullable<System.Guid> | ignoreParentID | If you want to ignore transactions against a specified parent item, you need both this item id and |
System.Boolean | groupByInstrument | Indicates the results returned should be grouped by InstrumentID, or should be aggregated in total |
System.Nullable<System.DateTimeOffset> | startDate | Optional - Indicates the aggregated transactions should all have a transaction date greater than or equal to this date |
System.DateTimeOffset | effectiveDate | Indicates the aggregated transactions should all have a transaction date less than or equal to this date |
System.DateTimeOffset | financialDate | Indicates the aggregated transactions, and gl postings, should have financial dates less than or equal to this date |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ITransactionAggregateResult>> | Returns a task holding a set of ITransactionAggregateResult containing the aggregate transaction values specified, by instrument or in total depending on |
AggregateTransactionValues(Nullable<Guid>, Nullable<DateTimeOffset>, Guid, Guid, Nullable<Guid>, Nullable<Guid>, Nullable<Guid>, Boolean, Nullable<DateTimeOffset>, DateTimeOffset, DateTimeOffset)
Retrieves the results of aggregating the specified transaction values
Declaration
Task<IEnumerable<ITransactionAggregateResult>> AggregateTransactionValues(Guid? canvasID, DateTimeOffset? lastUpdated, Guid transactionMatcherID, Guid transactionAggregatorID, Guid? instrumentSetID, Guid? ignoreParentTypeID, Guid? ignoreParentID, bool groupByInstrument, DateTimeOffset? startDate, DateTimeOffset effectiveDate, DateTimeOffset financialDate)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | canvasID | The id of any Canvas you want this query to run in. Null indicates the current main system |
System.Nullable<System.DateTimeOffset> | lastUpdated | The as of date you want this query to run for. Null indicates the query should run on the latest current data. |
System.Guid | transactionMatcherID | The ID of a ITransactionMatcher |
System.Guid | transactionAggregatorID | The ID a ITransactionAggregator |
System.Nullable<System.Guid> | instrumentSetID | The set of instruments you would like the transactions for to be aggregated |
System.Nullable<System.Guid> | ignoreParentTypeID | If you want to ignore transactions against a specified parent item, you need both this type entity id and |
System.Nullable<System.Guid> | ignoreParentID | If you want to ignore transactions against a specified parent item, you need both this item id and |
System.Boolean | groupByInstrument | Indicates the results returned should be grouped by InstrumentID, or should be aggregated in total |
System.Nullable<System.DateTimeOffset> | startDate | Optional - Indicates the aggregated transactions should all have a transaction date greater than or equal to this date |
System.DateTimeOffset | effectiveDate | Indicates the aggregated transactions should all have a transaction date less than or equal to this date |
System.DateTimeOffset | financialDate | Indicates the aggregated transactions, and gl postings, should have financial dates less than or equal to this date |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ITransactionAggregateResult>> | Returns a task holding a set of ITransactionAggregateResult containing the aggregate transaction values specified, by instrument or in total depending on |
AllowsCLRSQLFunctions()
Returns true if the database is configured to allow custom .net framework clr functions to be loaded as assemblies
Declaration
Task<bool> AllowsCLRSQLFunctions()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A task holding true if the database is configured to allow custom .net framework clr functions to be loaded as assemblies |
DoesUserExist(String, Guid)
Indicates if the specified emailID
already exists as a user in the system
Declaration
Task<bool> DoesUserExist(string emailID, Guid ignore)
Parameters
Type | Name | Description |
---|---|---|
System.String | emailID | The email to check and see if it already exists in the database across accounts. Emails for users must be globally unique |
System.Guid | ignore | Indicates the specified user ID should be ignored. This way you can check for an email ignoring the email the user currently has |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A task indicating if a user with the specified |
GetAuditData(Nullable<Guid>, Guid, Guid, String)
Returns the audit history (IAuditData) of a specified particular item, including old values, new values, type of change, who made it and when
Declaration
Task<IEnumerable<IAuditData>> GetAuditData(Guid? canvasID, Guid typeID, Guid id, string base64SerializedQueryExecuter)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | canvasID | The id of any Canvas you want this query to run in. Null indicates the current main system |
System.Guid | typeID | The ID of the entity type you want to run this query against |
System.Guid | id | The id of the actual item you want the audit history of |
System.String | base64SerializedQueryExecuter | A QueryableExecuter<T> of type IAuditData with any custom query for further filtering the results |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<IAuditData>> | A task holding an enumerable list of results detailing the entire audit history of a specified item |
Remarks
This type of functionality can also be achieved by creating a SQLWrapper that runs your own custom sql process, a type that can hold the results, and calling that using GetSQLResults<T>(Guid, String, String)
GetAuditDataCount(Nullable<Guid>, Guid, Guid, String)
Returns the count of all audit changes (IAuditData) of a specified particular item
Declaration
Task<int> GetAuditDataCount(Guid? canvasID, Guid typeID, Guid id, string base64SerializedQueryExecuter)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | canvasID | The id of any Canvas you want this query to run in. Null indicates the current main system |
System.Guid | typeID | The ID of the entity type you want to run this query against |
System.Guid | id | The id of the actual item you want the audit history of |
System.String | base64SerializedQueryExecuter | A QueryableExecuter<T> of type IAuditData with any custom query for further filtering the results |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> | A task holding the count of results detailing the entire audit history of a specified item |
Remarks
This type of functionality can also be achieved by creating a SQLWrapper that runs your own custom sql process, a type that can hold the results, and calling that using GetSQLResultsCount<T>(Guid, String, String)
GetCacheLastModification()
Returns the last modified database date/time of any standing data item that is automatically cached by the client on loading
Declaration
Task<DateTimeOffset> GetCacheLastModification()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.DateTimeOffset> | A task holding the last modified database date/time of any standing data item that is automatically cached by the client on loading |
GetCurrentDBTime()
Returns the current database time from the database server
Declaration
Task<DateTimeOffset> GetCurrentDBTime()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.DateTimeOffset> | A task holding the current database time from the database server |
GetDuplicateMappedLots(Nullable<Guid>, Guid)
Returns all instruments that are involved in more than one path through mappings against a specified entitySetID
Declaration
Task<IEnumerable<IAllocationMapping>> GetDuplicateMappedLots(Guid? canvasID, Guid entitySetID)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | canvasID | The id of any Canvas you want this query to run in. Null indicates the current main system |
System.Guid | entitySetID | The id of the entity set you want to find a list of all instruments mapped to multiple paths |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<IAllocationMapping>> | A task holding all instruments that are mapped to more than one path within the specified |
Remarks
This is used in conjunction with IAllocationRule, IAllocationPath and IAllocationMapping
See https://web.lemonedge.com/help/financial-services-allocations/ for more information
GetFromStorage(Guid, Nullable<Guid>, String, String, Boolean)
Returns the specifed file from the storage on the server. This storage is dependant on how LemonEdge is configured, it could be a network path, or azure blob container or other cloud storage system. This is needed to be known in order to retrieve the specified files.
The files are automatically stored by appropriate server tasks and can be accessed by client applications through this method
Files can be stored against entity types, and individual items
Declaration
Task<byte[]> GetFromStorage(Guid typeID, Guid? id, string fileName, string folder, bool restricted)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | typeID | The type of entity the file is stored against |
System.Nullable<System.Guid> | id | Optional - The id of the item the file is stored against |
System.String | fileName | The name of the file to retrieve |
System.String | folder | Any sub-folder path this file resides within |
System.Boolean | restricted | Indicates it is a file specific to this individual user. For instance the result of queries (ISQLWrapper) are stored by user |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Byte[]> | A task holding a byte array of the specified file contents |
GetItemInfo(Guid, Guid)
Returns a user description tooltip about the specified item in the system. You can use CustomFunctionsHelper to parse the results
This includes basic item information such as the item user friendly name, when it was created and by whom. Also when it was last updated and by whom.
Declaration
Task<string> GetItemInfo(Guid itemType, Guid itemID)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | itemType | The type of item we want to retrieve user friendly information on |
System.Guid | itemID | The id of the item we want to retrieve user friendly information on |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | A task holding a string |
Remarks
For example, this function can be used like so:
var (Created, Modified, createdBy, modifiedBy, createdByLabel, modifiedByLabel) =
LemonEdge.API.CustomFunctionsHelper.ParseItemInfo(await entityUpdateContext.GetCustomFunctions.GetItemInfo(typeID, item.ID));
Returns information about that item, where:
- entityUpdateContext: Holds an instance of IEntityUpdater
- typeID: Holds the id of the entity type we want to return information on
- item: Holds an instance of an item from IBaseEntity
See Also
GetMatchingDataSources(Nullable<Guid>, String, Boolean, Nullable<Guid>, Nullable<Guid>, String)
Executes a system function that searches across all datasources (IDataSource) for any matching datasource with the specified searchID
Declaration
Task<IEnumerable<IDataSourceResult>> GetMatchingDataSources(Guid? canvasID, string searchID, bool matchExactly, Guid? dataSourceTypeID, Guid? entityTypeID, string base64SerializedQueryExecuter)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | canvasID | The id of any Canvas you want this query to run in. Null indicates the current main system |
System.String | searchID | The text you want to search for across all DataSources |
System.Boolean | matchExactly | Indicates the |
System.Nullable<System.Guid> | dataSourceTypeID | The search can be restricted to a specific IDataSourceType, or can be run accross all data sources by passing null |
System.Nullable<System.Guid> | entityTypeID | The search can be restricted to only running on a particular type, and thus the datasources only associated with that type |
System.String | base64SerializedQueryExecuter | A QueryableExecuter<T> of type IDataSourceResult with any custom query for further filtering the results |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<IDataSourceResult>> | A task holding an enumerable list of results detailing all datasources that match the specified search critera |
Remarks
This type of functionality can also be achieved by creating a SQLWrapper that runs your own custom sql process, a type that can hold the results, and calling that using GetSQLResults<T>(Guid, String, String)
GetMatchingDataSourcesCount(Nullable<Guid>, String, Boolean, Nullable<Guid>, Nullable<Guid>, String)
Executes a system function that searches across all datasources (IDataSource) for any matching datasource with the specified searchID
and returns the count of matching rows
Declaration
Task<int> GetMatchingDataSourcesCount(Guid? canvasID, string searchID, bool matchExactly, Guid? dataSourceTypeID, Guid? entityTypeID, string base64SerializedQueryExecuter)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | canvasID | The id of any Canvas you want this query to run in. Null indicates the current main system |
System.String | searchID | The text you want to search for across all DataSources |
System.Boolean | matchExactly | Indicates the |
System.Nullable<System.Guid> | dataSourceTypeID | The search can be restricted to a specific IDataSourceType, or can be run accross all data sources by passing null |
System.Nullable<System.Guid> | entityTypeID | The search can be restricted to only running on a particular type, and thus the datasources only associated with that type |
System.String | base64SerializedQueryExecuter | A QueryableExecuter<T> of type IDataSourceResult with any custom query for further filtering the results |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> | A task holding the count of results detailing all datasources that match the specified search critera |
Remarks
This type of functionality can also be achieved by creating a SQLWrapper that runs your own custom sql process, a type that can hold the results, and calling that using GetSQLResultsCount<T>(Guid, String, String)
GetNextID(Guid, String)
Some integer properties are marked with the EntityAutoIncrementColumnAttribute which indicates whenever new items of this type are created the system should assign a unique auto-incrementing id
This function gets the next id for the specified type and column name. This is only called by the system within a save transaction. You won't see the values assigned to new items until they have been saved and refreshed.
Declaration
Task<long> GetNextID(Guid typeID, string columnName)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | typeID | The type of item to get a unique next auto increment value for |
System.String | columnName | The name of the column to get the auto increment value for |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int64> | A task holding the unique new auto-increment value for this type of item |
GetNotificationData(Nullable<Guid>, Nullable<Guid>, Nullable<Guid>, String)
Returns system notifications (INotification) for the current logged in user that have not been dismissed by them
Declaration
Task<IEnumerable<INotification>> GetNotificationData(Guid? canvasID, Guid? typeID, Guid? id, string base64SerializedQueryExecuter)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | canvasID | The id of any Canvas you want this query to run in. Null indicates the current main system |
System.Nullable<System.Guid> | typeID | The ID of the entity type you want to run this query against if running against a specific item for notifications relating just to it. Null for all notifiactions. |
System.Nullable<System.Guid> | id | The id of the actual item you want notifications related to. Null for all notifications. |
System.String | base64SerializedQueryExecuter | A QueryableExecuter<T> of type INotification with any custom query for further filtering the results |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<INotification>> | A task holding all notifications for this user that have not been dismissed by them that relate to a particualr specified item, or globally |
Remarks
This type of functionality can also be achieved by creating a SQLWrapper that runs your own custom sql process, a type that can hold the results, and calling that using GetSQLResults<T>(Guid, String, String)
GetNotificationDataCount(Nullable<Guid>, Nullable<Guid>, Nullable<Guid>, String)
Returns the count of system notifications (INotification) for the current logged in user that have not been dismissed by them
Declaration
Task<int> GetNotificationDataCount(Guid? canvasID, Guid? typeID, Guid? id, string base64SerializedQueryExecuter)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | canvasID | The id of any Canvas you want this query to run in. Null indicates the current main system |
System.Nullable<System.Guid> | typeID | The ID of the entity type you want to run this query against if running against a specific item for notifications relating just to it. Null for all notifiactions. |
System.Nullable<System.Guid> | id | The id of the actual item you want notifications related to. Null for all notifications. |
System.String | base64SerializedQueryExecuter | A QueryableExecuter<T> of type INotification with any custom query for further filtering the results |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> | A task holding the count of all notifications for this user that have not been dismissed by them that relate to a particualr specified item, or globally |
Remarks
This type of functionality can also be achieved by creating a SQLWrapper that runs your own custom sql process, a type that can hold the results, and calling that using GetSQLResultsCount<T>(Guid, String, String)
GetSQLProcInfo(Guid, String)
Returns the schema of the specified sql function or stored procedure in the database.
The function, or stored procedure, must actually exist for this to return anything.
Declaration
Task<IEnumerable<ISQLTypeWrapper>> GetSQLProcInfo(Guid forID, string sqlProcName)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | forID | The id of the ISQLWrapper this is being generated for |
System.String | sqlProcName | The name of the stored procedure or function you would like the call to return parameters (and results in the case of a function) for |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ISQLTypeWrapper>> | A task holding the schema of the specified sql function or stored procedure in the database |
Remarks
This enables you to create custom sql stored procedures, or functions, and just import them into LemonEdge for use by others, or our various integrated query tools
The ISQLWrapper tool uses this functionality to auto populate the schema of any custom sql you would like to use in the system
GetUnmappedLots(Nullable<Guid>, Guid)
Returns all unmapped instruments against a specified entitySetID
Declaration
Task<IEnumerable<IInstrument>> GetUnmappedLots(Guid? canvasID, Guid entitySetID)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | canvasID | The id of any Canvas you want this query to run in. Null indicates the current main system |
System.Guid | entitySetID | The id of the entity set you want to find a list of all instruments that are unmapped within this entity set |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<IInstrument>> | A task holding all instruments that are not mapped to any path within the specified |
Remarks
This is used in conjunction with IAllocationRule, IAllocationPath and IAllocationMapping
See https://web.lemonedge.com/help/financial-services-allocations/ for more information
GetVersion()
Returns a string of the current internal version for the service. The client and service should match with this version number, otherwise they may not be compatabile
Declaration
Task<string> GetVersion()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | A task holding a string of the current internal version for the service. The client and service should match with this version number, otherwise they may not be compatabile |
IsLicenseValid()
Indicates if the license for the account of the logged in user is valid or not
Declaration
Task<bool> IsLicenseValid()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | True if the license is valid |
PromoteItemsFromCanvas(Guid, Guid, Guid)
Taks the changes that have been made in a canvas from that canvas itself and applies them into the main system
A promotion can only occur if the change in the canvas was made later than any changes to that item in the main system itself
This will promote changes that have been made to related child items too
This method should only be called when running in the main system itself. You can not call this when running in a canvas. This is used by the system when viewing a canvas and the changes within it.
Declaration
Task<bool> PromoteItemsFromCanvas(Guid canvasID, Guid typeID, Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | canvasID | The canvas you want to promote a change from |
System.Guid | typeID | The type of item you want to promote from the canvas |
System.Guid | id | The id of the item that has been changed in the canvas, and that you want promoted into the main system |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A task indicating the sucessfull completion of the operation |
RefreshServers()
Invalidates all local caches on the web and task services forcing them to reload on next requests
Declaration
Task<bool> RefreshServers()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A task indicating the sucessfull completion of the operation |
RemoveItemsFromCanvas(Guid, Guid, Guid)
Removes changes that have been made in a canvas from that canvas itself, reverting it to the copy of the original main system.
This does not delete the actual item (unless it was only created in the canvas and never existed in the main system), it simply removes the changes to that item that have been made in the canvas
This will remove changes that have been made to related child items too
This method should only be called when running in the main system itself. You can not call this when running in a canvas. This is used by the system when viewing a canvas and the changes within it.
Declaration
Task<bool> RemoveItemsFromCanvas(Guid canvasID, Guid typeID, Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | canvasID | The canvas you want to remove a change from |
System.Guid | typeID | The type of item you want to remove from the canvas |
System.Guid | id | The id of the item that has been changed in the canvas, and that you wan removed from the canvas |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A task indicating the sucessfull completion of the operation |
ResetMyPassword(String, String)
Resets the current users password to a new password. The user does not need read-write permissions to their own user, this can be performed anyway as long as the current password matches
Declaration
Task<bool> ResetMyPassword(string hashedCurrentPassword, string hashedNewPassword)
Parameters
Type | Name | Description |
---|---|---|
System.String | hashedCurrentPassword | The current password for this user. If this does not not match the operation will fail. |
System.String | hashedNewPassword | The new password for this user. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A task indicating the sucessfull completion of the operation |
ResetUserPassword(Guid, String)
Resets the specified users password to the new hashed password value
This operation can only be performed by someone with read-write access to the specified user
Declaration
Task<bool> ResetUserPassword(Guid userID, string hashedNewPassword)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | userID | The user ID to reset the password for the specified user to |
System.String | hashedNewPassword | The new hashed password for the specified user |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A task indicating the sucessfull completion of the operation |
RevertTransactionToInProgress(Guid, Guid)
Reverts the specified transaction from Finalized to InProgress
All associated records with this transaction are change to InProgress
Declaration
Task<bool> RevertTransactionToInProgress(Guid type, Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | type | The type of the transaction object to revert |
System.Guid | id | The ID of the transaction object to revert |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A task indicating the sucessfull completion of the operation |
RunInCanvas(Nullable<Guid>)
Updates the current canvas for the currently logged in user to the specified canvasID
. Null indicates running in the main system.
Declaration
Task<bool> RunInCanvas(Guid? canvasID)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | canvasID | A canvas that the current logged in user can access, or null to indicate running in the main system again withut a canvas. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A task indicating if the operation was succesfull |
Remarks
This can only be a canvas that is private to them or public. Is used by the system when users simply switch canvases.
This process works even if the user doesn't have permissions to update their user, as it should always be allowed for them to switch to valid canvases
UpdateCurrentDefaultTeam(Guid)
Updates the current team for the currently logged in user to the specified teamID
Declaration
Task<bool> UpdateCurrentDefaultTeam(Guid teamID)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | teamID | A team that the current logged in user is a member of |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A task indicating if the operation was succesfull |
Remarks
This can only be a team they are a valid member of. Is used by the system when users simply switch teams.
This process works even if the user doesn't have permissions to update their user, as it should always be allowed for them to switch to valid teams they are members of
UpdateCurrentRole(Guid)
Updates the current role for the currently logged in user to the specified roleID
Declaration
Task<bool> UpdateCurrentRole(Guid roleID)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | roleID | A role that the current logged in user is a member of |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A task indicating if the operation was succesfull |
Remarks
This can only be a role they are a valid member of. Is used by the system when users simply switch roles.
This process works even if the user doesn't have permissions to update their user, as it should always be allowed for them to switch to valid roles they are members of
UpdateCurrentTheme(Theme)
Updates the current role for the currently logged in user to the specified roleID
Declaration
Task<bool> UpdateCurrentTheme(Theme theme)
Parameters
Type | Name | Description |
---|---|---|
Theme | theme |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A task indicating if the operation was succesfull |
Remarks
This can only be a rold they are a valid member of. Is used by the system when users simply switch roles.
This process works even if the user doesn't have permissions to update their user, as it should always be allowed for them to switch to valid roles they are members of
UpdateUserSettings(String, String, Theme)
Updates the current users name
, emailLogin
and theme
Declaration
Task<bool> UpdateUserSettings(string name, string emailLogin, Theme theme)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of this user |
System.String | emailLogin | The globally unique email address used for them to logon to the system |
Theme | theme | The colour theme the applications use |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A task indicating the sucessfull completion of the operation |