Search Results for

    Show / Hide Table of Contents

    Class LoginController

    The controller for logging into the LemonEdge platform that manipulates the ILoginWindow window.

    Inheritance
    System.Object
    LoginController
    Implements
    IController
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: LemonEdge.Client.Core.Authentication
    Assembly: ClientCore.dll
    Syntax
    public class LoginController : IController

    Constructors

    LoginController(ILoginWindow)

    Creates a new instance of the login controller for the specified login window instance

    Declaration
    public LoginController(ILoginWindow window)
    Parameters
    Type Name Description
    ILoginWindow window

    The window this controller should be for

    Properties

    GetValidConnectionTypes

    Returns a list of all the valid connection types this application can login with. There are two current connections; database and web service. Most applications allow both, but for instance the web app can only connect via the web service.

    Declaration
    public IEnumerable<ConnectionType> GetValidConnectionTypes { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<ConnectionType>

    OwningWindow

    The owning login window (ILoginWindow) this controller operates against

    Declaration
    public IWindow OwningWindow { get; }
    Property Value
    Type Description
    IWindow

    Methods

    EnsureLoggedInUserHasRole()

    If this is the first time the user has logged in, this ensures the users LastLoggedInRoleID is set to a role they can login with

    Declaration
    public static Task EnsureLoggedInUserHasRole()
    Returns
    Type Description
    System.Threading.Tasks.Task

    A task indicating the completion of the operation

    InformUserIfNoSettingsConfig()

    Informs the user if there is no associated settings.config file with this running process

    Declaration
    public Task InformUserIfNoSettingsConfig()
    Returns
    Type Description
    System.Threading.Tasks.Task

    A task indicating the completion of the operation

    LoadDatabaseAliases(String)

    Fo a given service uri will attempt to connect to the LemonEdge service and return a list of valid database aliases that service has that we can connect to

    Declaration
    public Task<IEnumerable<string>> LoadDatabaseAliases(string serviceURI)
    Parameters
    Type Name Description
    System.String serviceURI

    The uri of a valid LemonEdge web service

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.String>>

    A task holding a list of valid database aliases the specified web service has that we can connect to

    Login(LoginSettings)

    Attempts to login to the LemonEdge platform using the specified login settings

    If the login is successful this also stores those login settings locally for re-use next time (if the setting includes RememberMe).

    Declaration
    public Task<bool> Login(LoginSettings settings)
    Parameters
    Type Name Description
    LoginSettings settings

    The settings to use to login to the LemonEdge platform

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    A task holding a flag indicating if the login was successful or not

    OpenHelp()

    Opens the LemonEdge help documentation for the login dialog window

    Declaration
    public void OpenHelp()

    RefreshDisplay(Boolean)

    First verifies if there is a later version of this application to download, and provides the user the option to do so if there is

    Otherwise refreshes the login window with the latest login settings

    Declaration
    public Task<bool> RefreshDisplay(bool promptIfSettingsMissing)
    Parameters
    Type Name Description
    System.Boolean promptIfSettingsMissing

    Prompts to the user if the settings.config file is not found/corrupt

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    A task indicating if the login window was refreshed. False if they downloaded a new version of the application instead.

    Implements

    IController

    Extension Methods

    MiscExtensions.SetIfNotEqual<T, P>(T, Expression<Func<T, P>>, P)
    ReflectionExtensions.ClearEventInvocations(Object, String)
    StringExtensions.ToCSVFormatString(Object, Type)
    SQLExtensions.ToSQLValue(Object, Boolean)
    In This Article
    Back to top © LemonTree Software Ltd. All rights reserved.