Interface IConnector
This connection class provides the functionality for connecting to and logging into the LemonEdge system.
When any client application has logged into the system, either directly or through a web service, this also holds all the connection information for the client
Inherited Members
Namespace: LemonEdge.API.Client.CommonUI
Assembly: LemonEdge.API.dll
Syntax
public interface IConnector : IUpdateServiceConnection
Properties
IsUserFromRootAccount
Indicates if the current logged in user is part of the root account of the connected database.
Root accounts have greater access to what can be modified in the system
Declaration
bool IsUserFromRootAccount { get; }
Property Value
Type | Description |
---|---|
bool |
Licenser
Returns the ILicenser to validate the application license.
Declaration
ILicenser Licenser { get; init; }
Property Value
Type | Description |
---|---|
ILicenser |
LoggedInUser
The user information for the current logged in user
Declaration
UserInfo LoggedInUser { get; set; }
Property Value
Type | Description |
---|---|
UserInfo |
Type
The type of connection that the underlying provider is supporting.
Declaration
ConnectionType Type { get; }
Property Value
Type | Description |
---|---|
ConnectionType |
Methods
Create()
If the system has logged in this will create and return an IEntityUpdaterUI for querying, retrieving and modifying all entities in the system
Declaration
Task<IEntityUpdaterUI> Create()
Returns
Type | Description |
---|---|
Task<IEntityUpdaterUI> | An IEntityUpdaterUI for querying, retrieving and modifying all entities in the system |
CreateAuthenticator()
Creates an IAuthenticator to allow user login.
Declaration
IAuthenticator CreateAuthenticator()
Returns
Type | Description |
---|---|
IAuthenticator | The IAuthenticator. |
CreateDatabaseStatusProxy()
Creates an IDatabaseStatusProxy to check database status.
Declaration
IDatabaseStatusProxy CreateDatabaseStatusProxy()
Returns
Type | Description |
---|---|
IDatabaseStatusProxy | The IAuthenticator. |
CreateStorageManager()
Creates the appropriate IStorageManager for the current connection type
Declaration
IStorageManager CreateStorageManager()
Returns
Type | Description |
---|---|
IStorageManager |
LoggedInUniqueConnection()
Returns the unique connection for the current login
Used for verifying local stored caches can be reused for the correct connections
Declaration
string LoggedInUniqueConnection()
Returns
Type | Description |
---|---|
string | The unique connection for the current login |
LoggedInUserFriendlyConnection(IReadOnlyCache, bool)
Returns a user friendly string of the current connection, including any currently active canvas, and invalid license info
Declaration
Task<(string Title, Color? HighlightColour, Color? HighlightColour2)> LoggedInUserFriendlyConnection(IReadOnlyCache cache, bool shortVersion = false)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyCache | cache | The current local cache |
bool | shortVersion | Indicates if the string returned should be a short version for smaller restricted screens such as mobiles |
Returns
Type | Description |
---|---|
Task<(string Title, Color? HighlightColour, Color? HighlightColour2)> | A user friendly string of the current connection, including any currently active canvas, and invalid license info |
Login(string, string, bool)
Logs into the LemonEdge system using the specified user and password
Declaration
Task<UserInfo> Login(string userName, string password, bool reloadDynamicEntities = false)
Parameters
Type | Name | Description |
---|---|---|
string | userName | The username to login with |
string | password | The plain text password of the user to login with. The plain text is encrypted by this function before being sent anywhere. |
bool | reloadDynamicEntities | Flag for reloading add-ins and custom objects/lists |
Returns
Type | Description |
---|---|
Task<UserInfo> | The UserInfo for the logged in user if login was successful. An error is thrown otherwise. |
LoginExternal(bool)
Logs into the LemonEdge system using the current external token
Declaration
Task<UserInfo> LoginExternal(bool reloadDynamicEntities = false)
Parameters
Type | Name | Description |
---|---|---|
bool | reloadDynamicEntities | Flag for reloading add-ins and custom objects/lists |
Returns
Type | Description |
---|---|
Task<UserInfo> | The UserInfo for the logged in user if login was successful. An error is thrown otherwise. |
LoginWindows(bool)
Logs into the LemonEdge system using the current windows domain name user
Declaration
Task<UserInfo> LoginWindows(bool reloadDynamicEntities = false)
Parameters
Type | Name | Description |
---|---|---|
bool | reloadDynamicEntities | Flag for reloading add-ins and custom objects/lists |
Returns
Type | Description |
---|---|
Task<UserInfo> | The UserInfo for the logged in user if login was successful. An error is thrown otherwise. |
Logout()
Sets the Logged In User to null.
Declaration
void Logout()
RefreshUser()
when doing a refresh all we should refresh the user. It's possible the user logs in to two clients on the same pc this would ensure if they switch canvas/team/etc that they are consistent across clients with the server version.
Declaration
Task RefreshUser()
Returns
Type | Description |
---|---|
Task |