From 48071f784b19ea8ed2859fb03642b8cc856406b1 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 14 Jan 2018 15:49:39 +0200 Subject: Added code comments for: MachineStudio.UI --- .../DefaultAuthenticationProvider.cs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs index a30cf0f92..80e5e9762 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs @@ -10,10 +10,17 @@ using Tango.MachineStudio.Common.Authentication; namespace Tango.MachineStudio.UI.Authentication { + /// + /// Represents the default Machine Studio Authentication provider + /// + /// + /// public class DefaultAuthenticationProvider : ExtendedObject, IAuthenticationProvider { private User _currentUser; - + /// + /// Gets the current logged-in user. + /// public User CurrentUser { get { return _currentUser; } @@ -25,8 +32,18 @@ namespace Tango.MachineStudio.UI.Authentication } } + /// + /// Occurs when the current logged-in user has changed. + /// public event EventHandler CurrentUserChanged; + /// + /// Performs a user login by the specified email and password. + /// + /// The email. + /// The password. + /// + /// Login failed for user " + email public User Login(string email, string password) { User user = ObservablesEntitiesAdapter.Instance.Users.SingleOrDefault(x => x.Email.ToLower() == email.ToLower() && x.Password == password); @@ -40,6 +57,9 @@ namespace Tango.MachineStudio.UI.Authentication return user; } + /// + /// Logs-out the current logged-in user. + /// public void Logout() { CurrentUser = null; -- cgit v1.3.1